Ignore:
Timestamp:
Jan 6, 2011, 4:25:38 AM (13 years ago)
Author:
Sam Habiel
Message:

Progress Bar on Splash Screen and supporting code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/DSplash.cs

    r1050 r1051  
    1717        private Label lblVersion;
    1818        private Label label2;
     19        private ProgressBar progressBar1;
    1920                /// <summary>
    2021                /// Required designer variable.
     
    6263            this.lblVersion = new System.Windows.Forms.Label();
    6364            this.label2 = new System.Windows.Forms.Label();
     65            this.progressBar1 = new System.Windows.Forms.ProgressBar();
    6466            this.SuspendLayout();
    6567            //
     
    110112            this.label2.Text = "VISTA";
    111113            //
     114            // progressBar1
     115            //
     116            this.progressBar1.Location = new System.Drawing.Point(18, 207);
     117            this.progressBar1.Name = "progressBar1";
     118            this.progressBar1.Size = new System.Drawing.Size(458, 14);
     119            this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
     120            this.progressBar1.TabIndex = 7;
     121            //
    112122            // DSplash
    113123            //
     
    116126            this.ClientSize = new System.Drawing.Size(488, 252);
    117127            this.ControlBox = false;
     128            this.Controls.Add(this.progressBar1);
    118129            this.Controls.Add(this.label2);
    119130            this.Controls.Add(this.lblVersion);
     
    135146        public delegate void dSetStatus(string sStatus);
    136147        public delegate void dAny();
     148        public delegate void dProgressBarSet(int number);
    137149               
    138150        public void SetStatus(string sStatus)
     
    145157            }
    146158           
    147             System.Diagnostics.Debug.Assert(this.InvokeRequired == false);
    148159                        this.lblStatus.Text = sStatus;
    149             this.Refresh();
    150160                }
    151161
     
    166176            this.Invoke(d);
    167177        }
     178
     179        public void RemoteProgressBarMaxSet(int max)
     180        {
     181            if (this.InvokeRequired == true)
     182            {
     183                dProgressBarSet d = new dProgressBarSet(RemoteProgressBarMaxSet);
     184                this.Invoke(d, new object[] { max });
     185                return;
     186            }
     187
     188            this.progressBar1.Maximum = max;
     189        }
     190
     191        public void RemoteProgressBarValueSet(int val)
     192        {
     193            if (this.InvokeRequired == true)
     194            {
     195                dProgressBarSet d = new dProgressBarSet(RemoteProgressBarValueSet);
     196                this.Invoke(d, new object[] { val });
     197                return;
     198            }
     199
     200            this.progressBar1.Value = val;
     201        }
     202
    168203        }
    169204
Note: See TracChangeset for help on using the changeset viewer.