Example #1
0
 public override void _initControl()
 {
     if (null == mDockFrame || mDockFrame.IsDisposed)
     {
         PlatformSingleton platformSingleton_ = __singleton<PlatformSingleton>._instance();
         mDockFrame = new DockFrame(null);
         mDockFrame.Text = mCaption;
         mDockFrame.Icon = platformSingleton_._findIcon(mIcon) as Icon;
         if (string.Compare(mDockStyle, @"DockBottom") == 0)
         {
             mDockFrame.DockAreas = DockAreas.DockBottom;
         }
         else if (string.Compare(mDockStyle, @"DockLeft") == 0)
         {
             mDockFrame.DockAreas = DockAreas.DockLeft;
         }
         else if (string.Compare(mDockStyle, @"DockRight") == 0)
         {
             mDockFrame.DockAreas = DockAreas.DockRight;
         }
         else if (string.Compare(mDockStyle, @"DockTop") == 0)
         {
             mDockFrame.DockAreas = DockAreas.DockTop;
         }
         else
         {
             mDockFrame.DockAreas = DockAreas.DockLeft;
         }
         base._initControl();
     }
 }
Example #2
0
 public DockPad()
 {
     mDockStyle = @"None";
     mDockFrame = null;
     mCaption = null;
     mContain = null;
     mIcon = null;
     mPadName = null;
 }
Example #3
0
 public void _initControl()
 {
     if (null == mDockFrame || mDockFrame.IsDisposed)
     {
         mDockFrame = new DockFrame(mDockUrl);
         mDockFrame.DockAreas = WeifenLuo.WinFormsUI.Docking.DockAreas.Document;
         List<IDockWidget> dockWidgets_ = mDockUrl._getControl();
         if (dockWidgets_.Count > 1)
         {
             TabControl tabControl_ = new TabControl();
             tabControl_.Alignment = TabAlignment.Bottom;
             tabControl_.Dock = DockStyle.Fill;
             tabControl_.Selected += _dockTabPageSelected;
             bool initWidget_ = false;
             foreach (IDockWidget i in dockWidgets_)
             {
                 IWidget widget_ = i._getControl();
                 widget_._initControl();
                 if (false == initWidget_)
                 {
                     mWidget = widget_;
                     initWidget_ = true;
                 }
                 DockTabPage dockTabPage_ = new DockTabPage(widget_);
                 dockTabPage_.Text = i._dockName();
                 System.Windows.Forms.Control control_ = widget_._getControl() as System.Windows.Forms.Control;
                 dockTabPage_.Controls.Add(control_);
                 tabControl_.Controls.Add(dockTabPage_);
             }
             mDockFrame.Controls.Add(tabControl_);
         }
         else if (dockWidgets_.Count == 1)
         {
             IDockWidget dockWidget_ = dockWidgets_[0];
             IWidget widget_ = dockWidget_._getControl();
             mWidget = widget_;
             widget_._initControl();
             System.Windows.Forms.Control control_ = widget_._getControl() as System.Windows.Forms.Control;
             mDockFrame.Controls.Add(control_);
         }
         else
         {
         }
     }
 }
Example #4
0
 public DockContent()
 {
     mDockFrame = null;
     mDockUrl = null;
     mWidget = null;
 }