Ejemplo n.º 1
0
        private void SetStateInTB()
        {
            if (ownerForm == null)
            {
                return;
            }

            ThumbnailProgressState thmState = ThumbnailProgressState.Normal;

            if (!showInTaskbar)
            {
                thmState = ThumbnailProgressState.NoProgress;
            }
            else if (Style == ProgressBarStyle.Marquee)
            {
                thmState = ThumbnailProgressState.Indeterminate;
            }
            else if (m_State == ProgressBarState.Error)
            {
                thmState = ThumbnailProgressState.Error;
            }
            else if (m_State == ProgressBarState.Pause)
            {
                thmState = ThumbnailProgressState.Paused;
            }

            Windows7Taskbar.SetProgressState(ownerForm.Handle, thmState);
        }
Ejemplo n.º 2
0
        private void SetValueInTB()
        {
            if (showInTaskbar)
            {
                ulong maximum  = (ulong)(Maximum - Minimum);
                ulong progress = (ulong)(Value - Minimum);

                Windows7Taskbar.SetProgressValue(ownerForm.Handle, progress, maximum);
            }
        }