Ejemplo n.º 1
0
 private void AddToPanel(System.Type type, BaseView view)
 {
     view.set_Visible(false);
     view.set_Location(new System.Drawing.Point(8, 8));
     this.panel.Controls.Add(view);
     view.set_TabIndex(1);
     this.views.Add(type, view);
 }
Ejemplo n.º 2
0
 private void AddViewToPanel(BaseView view)
 {
     this.panel.SuspendLayout();
     view.set_Visible(false);
     view.set_TabIndex(1);
     this.panel.Controls.Add(view);
     view.set_Location(new System.Drawing.Point());
     if (view.ExtendHorizontally && view.ExtendVertically)
     {
         view.set_Width(this.panel.ClientSize.get_Width());
         if (view.ShowSaveButton)
         {
             view.set_Height((int) ((this.panel.ClientSize.get_Height() - this.btnSave.get_Height()) - 0x10));
         }
         else
         {
             view.set_Height(this.panel.ClientSize.get_Height());
         }
         view.set_Anchor(System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Top);
     }
     else
     {
         if (view.ExtendHorizontally)
         {
             view.set_Width(this.panel.ClientSize.get_Width());
             view.set_Anchor(System.Windows.Forms.AnchorStyles.Right | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Top);
         }
         if (view.ExtendVertically)
         {
             if (view.ShowSaveButton)
             {
                 view.set_Height((int) ((this.panel.ClientSize.get_Height() - this.btnSave.get_Height()) - 0x10));
             }
             else
             {
                 view.set_Height(this.panel.ClientSize.get_Height());
             }
             view.set_Anchor(System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Top);
         }
     }
     this.panel.ResumeLayout(false);
 }
Ejemplo n.º 3
0
 private void ShowView(BaseView view)
 {
     if ((this.showView != null) && !this.showView.Equals(view))
     {
         this.UnvisibleShowView();
     }
     view.set_Visible(true);
     view.set_TabIndex(1);
     this.showView = view;
     this.btnSave.set_Location(new System.Drawing.Point(0x10, (int) (view.get_Height() + 8)));
     this.btnSave.set_Visible(view.ShowSaveButton);
 }
Ejemplo n.º 4
0
 private void ShowView(BaseView view)
 {
     Manager.ChiefMainForm.SuspendLayout();
     if ((this.showView != null) && !this.showView.Equals(view))
     {
         this.UnvisibleShowView();
     }
     view.set_TabIndex(1);
     view.set_Visible(true);
     this.showView = view;
     this.btnSave.set_Location(new System.Drawing.Point(0x10, (int) (view.get_Height() + 8)));
     this.btnSave.set_Visible(view.ShowSaveButton);
     Manager.ChiefMainForm.ResumeLayout(false);
 }