public MainWindowView( System.EventHandler callbackNew, System.EventHandler callbackLoadAuto, System.EventHandler callbackLoad, System.EventHandler callbackAdd, System.EventHandler callbackSave, System.EventHandler callbackShowMessages, DragEventHandler callbackDrop ) { InitializeComponent(); this.btnStartNew.Click += callbackNew; this.btnStartLoad.Click += callbackLoad; this.btnStartLoadAuto.Click += callbackLoadAuto; this.btnAddOne.Click += callbackAdd; this.btnAddTwo.Click += callbackAdd; this.btnAddThree.Click += callbackAdd; this.btnSave.Click += callbackSave; this.btnLoad.Click += callbackLoad; this.lblMessages.Click += callbackShowMessages; this.DragDrop += callbackDrop; this.ctrlHelpText = new Label[3]; this.ctrlHelpText[0] = this.lblHelpOne; this.ctrlHelpText[1] = this.lblHelpTwo; this.ctrlHelpText[2] = this.lblHelpThree; this.ctrlAddButton = new Button[3]; this.ctrlAddButton[0] = this.btnAddOne; this.ctrlAddButton[1] = this.btnAddTwo; this.ctrlAddButton[2] = this.btnAddThree; this.loader = new Panel(); this.Controls.Add(this.loader); this.loader.Visible = false; this.loader.Location = new Point(this.tcMain.Location.X + 3, this.tcMain.Location.Y + 3); this.loader.Size = new Size(this.tcMain.Size.Width - 6, this.tcMain.Size.Height - 6); this.loader.Anchor = (AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom); this.loader.BackColor = this.BackColor; ProgressBar tmpP = new ProgressBar(); Label tmpL = new Label(); tmpL.AutoSize = true; tmpL.Text = "LOADING"; tmpL.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 15, FontStyle.Bold); tmpL.ForeColor = Color.Black; tmpP.Style = ProgressBarStyle.Marquee; tmpP.MarqueeAnimationSpeed = 25; tmpL.Center(this.loader, 0, -25); tmpP.Center(this.loader); this.loader.Controls.Add(tmpP); this.loader.Controls.Add(tmpL); this.loader.BringToFront(); this.reset(); }
public SingleModuleView(System.EventHandler callbackNew) { InitializeComponent(); this.loader = new Panel(); this.loader.Visible = false; this.loader.BackColor = this.BackColor; this.loader.Location = this.pnlAssessments.Location; this.loader.Size = this.pnlAssessments.Size; this.Controls.Add(this.loader); ProgressBar tmp = new ProgressBar(); this.loader.Controls.Add(tmp); tmp.Center(loader); tmp.Style = ProgressBarStyle.Marquee; tmp.MarqueeAnimationSpeed = 25; this.loader.BringToFront(); this.btnAdd.Click += callbackNew; }