Exemplo n.º 1
0
        private void switchPanel(PanelPosition panelPosition)
        {
            SlidePanel.Slide slideType;

            if (panelPosition == actualPosition)
            {
                return;
            }

            MetroPanel panel = new ListViewPanel((int)panelPosition);

            if (panelPosition > actualPosition)
            {
                slideType = SlidePanel.Slide.Up;
            }
            else
            {
                slideType = SlidePanel.Slide.Down;
            }

            this.Controls.Add(panel);
            SlidePanel.setPanel(slideType, panel, this.panel_clinicInside);
            this.Controls.Remove(panel_clinicInside);
            panel_clinicInside.Dispose();
            panel_clinicInside = panel;
            actualPosition     = panelPosition;
        }
Exemplo n.º 2
0
 public void switchLateralPanel(MetroPanel panel, SlidePanel.Slide slideType)
 {
     this.Controls.Add(panel);
     SlidePanel.setPanel(slideType, panel, this.panel_clinicInside);
     this.Controls.Remove(panel_clinicInside);
     panel_clinicInside.Dispose();
     panel_clinicInside = panel;
 }
        private void btn_goClinic_Click(object sender, EventArgs e)
        {
            MetroPanel newPanel = new Panel.ClinicPanel();

            Controls.Add(newPanel);
            SlidePanel.setPanel(Slide.Right, newPanel, actualPanel);
            Controls.Remove(actualPanel);
            actualPanel.Dispose();
            actualPanel = newPanel;
        }
Exemplo n.º 4
0
        private void Btn_clinicBack_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            Clinic_SPA temp         = new Clinic_SPA();
            MetroPanel initialPanel = temp.panel_initialPanel;
            //temp.Dispose();
            Clinic_SPA clinic_SPAForm = Clinic_SPA.get();

            clinic_SPAForm.Controls.Add(initialPanel);
            SlidePanel.setPanel(Slide.Left, initialPanel, this);
            clinic_SPAForm.Controls.Remove(this);
            clinic_SPAForm.actualPanel = initialPanel;
            this.Dispose();
        }