Beispiel #1
0
        private void InitForms()
        {
            //MenuForm frm = new MenuForm();
            //frm.MdiParent = this;
            //Forms.Add(frm);

            int progress = 0;

            mSplash.SetMaxProgress(140);
            Forms.Add((int)Enums.FormsNames.Menu, new MenuForm() { MdiParent = this, FormName = Enums.FormsNames.Menu });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.Twinligh, new TwinlightFrom() { MdiParent = this, FormName = Enums.FormsNames.Twinligh });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.Monopolar, new MonopolarForm() { MdiParent = this, FormName = Enums.FormsNames.Monopolar });
            //progress += 10;
            mSplash.SetProgress(progress);
            //Forms.Add((int)Enums.FormsNames.Infections, new InfectionsForm() { MdiParent = this, FormName = Enums.FormsNames.Infections });
            //progress += 10;
            mSplash.SetProgress(progress);
            //Forms.Add((int)Enums.FormsNames.FastHair, new FastHairForm() { MdiParent = this, FormName = Enums.FormsNames.FastHair });
               // progress += 10;
            mSplash.SetProgress(progress);
            //Forms.Add((int)Enums.FormsNames.Acne, new AcneForm() { MdiParent = this, FormName = Enums.FormsNames.Acne });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.Rejuvenation, new RejuvenationForm() { MdiParent = this, FormName = Enums.FormsNames.Rejuvenation });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.RFSetup, new RFSetupForm() { MdiParent = this, FormName = Enums.FormsNames.RFSetup });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.LayserLedSetup, new LayserLedSetupForm() { MdiParent = this, FormName = Enums.FormsNames.LayserLedSetup });
            progress += 10;
            mSplash.SetProgress(progress);
            //Forms.Add((int)Enums.FormsNames.Skin, new SkinForm() { MdiParent = this, FormName = Enums.FormsNames.Skin });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.TimerSetup, new TimerSetupForm() { MdiParent = this, FormName = Enums.FormsNames.TimerSetup });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.SoftLaserSetup, new SoftLaserSetupForm() { MdiParent = this, FormName = Enums.FormsNames.SoftLaserSetup });
            progress += 10;
            mSplash.SetProgress(progress);
            //            Forms.Add((int)Enums.FormsNames.Epilation, new EpilationForm() { MdiParent = this, FormName = Enums.FormsNames.Epilation });
            Forms.Add((int)Enums.FormsNames.Wrinkles, new WrinklesForm() { MdiParent = this, FormName = Enums.FormsNames.Wrinkles });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.Coagulate, new CoagulateForm() { MdiParent = this, FormName = Enums.FormsNames.Coagulate });
            progress += 10;
            mSplash.SetProgress(progress);
            Forms.Add((int)Enums.FormsNames.Couperose, new CouperoseForm() { MdiParent = this, FormName = Enums.FormsNames.Couperose });
            //            progress += 10;
            mSplash.SetProgress(progress);
            //            Forms.Add((int)Enums.FormsNames.Logger, new Form1() { MdiParent = this, FormName = Enums.FormsNames.Logger });

            foreach (Control c in Forms.Values)
            {
                if (c is BaseScreen)
                {
                    ((BaseScreen)c).Initialize();
                }
            }

            m_ActivePanel = Forms[(int)Enums.FormsNames.Menu];
            //m_ActivePanel.Size = new Size(480, 480);
            //m_ActivePanel.BringToFront();
            //m_ActivePanel.Show();
            ShowActivePanel(Enums.FormsNames.Menu);
        }
Beispiel #2
0
        public void ShowActivePanelFromCommand(Enums.FormsNames FormName)
        {
            if (InvokeRequired)
            {
                this.Invoke(new EventHandler(delegate { ShowActivePanel(FormName); }));
            }
            else
            {

                m_LastActivePanel = m_ActivePanel;
                m_LastActivePanel.BeforeHide();

                // go to the right virtual form
                //m_ActivePanel = Forms[(int)FormName];
                m_ActivePanel = Forms[(int)mVirtualForm];

                mMainPanel.Controls.Clear();
                mMainPanel.Controls.Add(m_ActivePanel);
                mMainPanel.Dock = DockStyle.Fill;
            //                m_ActivePanel.Dock = DockStyle.Fill;
                mTimer_Tick(this, EventArgs.Empty);
                m_ActivePanel.BeforeShow();
                m_ActivePanel.Show();
                Application.DoEvents();
                m_ActivePanel.Focus();
                m_ActivePanel.AfterShow();

                m_ActivePanel.InvokeUpdateUI();
            }
        }