TaskbarProgress.SetValue C# (CSharp) Method

SetValue() public static method

Sets the value of the progress bar.
public static SetValue ( IntPtr windowHandle, double progressValue, double progressMax ) : void
windowHandle IntPtr The handle of the window.
progressValue double The value of the progress bar.
progressMax double The maximum value of the progress bar.
return void
    public static void SetValue(IntPtr windowHandle, double progressValue, double progressMax)
    {
        if (useTaskbar) taskbarInstance.SetProgressValue(windowHandle, (ulong)progressValue, (ulong)progressMax);
    }

Usage Example

Beispiel #1
0
        private void S1_Work()
        {
            while (Data.Session.Stage == 1 && Data.Session.Shortcuts.Count >= Data.Session.LastShortcut + 1)
            {
                if (Data.Session.LastShortcut >= Data.Session.Shortcuts.Count)
                {
                    break;
                }

                var item = Data.Session.Shortcuts[Data.Session.LastShortcut++];

                Invoke(new Action(() =>
                {
                    L_Shortcuts_Info.Text = item.Name;
                    TaskbarProgress.SetValue(Handle, 2500d * Data.Session.LastShortcut / Data.Session.Shortcuts.Count, 10000);
                }));

                var error = IconMatcher.Match(item);

                PGB_Shortcuts.Percentage = 100d * Data.Session.LastShortcut / Data.Session.Shortcuts.Count;

                if (error != null)
                {
                    Data.Session.StageErrors[0]++;
#if DEBUG
                    Data.Session.Exceptions.Add(error);
#endif
                }
            }

            if (Data.Session.Stage == 1)
            {
                Stage_2();
            }
        }
All Usage Examples Of TaskbarProgress::SetValue
TaskbarProgress