private void InitForms() { //MenuForm frm = new MenuForm(); //frm.MdiParent = this; //Forms.Add(frm); Forms.Add(new MenuForm() { MdiParent = this }); Forms.Add(new TwinlightFrom() { MdiParent = this }); Forms.Add(new MonopolarForm() { MdiParent = this }); Forms.Add(new InfectionsForm() { MdiParent = this }); Forms.Add(new FastHairForm() { MdiParent = this }); Forms.Add(new AcneForm() { MdiParent = this }); Forms.Add(new RejuvenationForm() { MdiParent = this }); Forms.Add(new RFSetupForm() { MdiParent = this }); Forms.Add(new LayserLedSetupForm() { MdiParent = this }); m_ActiveForm = Forms[0]; m_ActiveForm.Show(); }
public void ShowActiveForm(Enums.FormsNames FormName) { if (InvokeRequired) { this.Invoke(new MethodInvoker(() => { ShowActiveForm(FormName); })); } else { foreach (BaseScreen f in Forms) { f.Hide(); } m_ActiveForm = Forms[(int)FormName]; //frm.TopMost = true; //frm.Select(); //frm.Location = new Point(100, 100); m_ActiveForm.Size = new System.Drawing.Size(SettingsFile.Default.ScreenWidth, SettingsFile.Default.ScreenHeight); m_ActiveForm.StartPosition = FormStartPosition.Manual; m_ActiveForm.Show(); //SetActiveForm(Enums.FormsNames.Menu); m_ActiveForm.InvokeUpdateUI(); } //Forms[1].Show(); //switch (FormName) //{ // case Enums.FormsNames.Twinligh: // { // break; // } //} }