Esempio n. 1
0
        private void timer1_Tick(object sender, System.EventArgs e)
        {
            // Flash Item to attract attention...
            ButtonItem item = dotNetBarManager1.GetItem("bThemes") as ButtonItem;

            if (item.ForeColor == Color.Red)
            {
                item.ForeColor = Color.Empty;
            }
            else
            {
                item.ForeColor = Color.Red;
            }

            ProgressBarItem progress = dotNetBarManager1.GetItem("itemProgressBar") as ProgressBarItem;

            if (progress.Value == progress.Maximum)
            {
                progress.Value = progress.Minimum;
            }
            else
            {
                progress.Increment(10);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 进度条设置,默认进度 10
        /// </summary>
        /// <param name="incrementValue"></param>
        private void ProgressBarIncrement(int incrementValue = 10)
        {
            ProgressBarItem progress = itemProgressBar;

            if (progress.Value == progress.Maximum)
            {
                progress.Value = progress.Minimum;
            }
            else
            {
                progress.Increment(incrementValue);
            }
        }