Beispiel #1
0
 protected override void OnMouseUp(MouseEventArgs e)
 {
     if (null != mMouseDownTab)
     {
         mSideBar._setActiveTab(mMouseDownTab);
         mMouseDownTab._setSideTabStatus(SideTabStatus_.mNormal_);
         mMouseDownTab = null;
     }
     this.Refresh();
     base.OnMouseUp(e);
 }
Beispiel #2
0
 public SideBar()
 {
     mSideTabs = new List<SideTab>();
     mSideBarControl = null;
     mDockStyle = @"None";
     mSideBarUrl = null;
     mActiveTab = null;
     mInitCommand = null;
     mInitCmd = null;
     mContain = null;
 }
Beispiel #3
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     if (e.Button == MouseButtons.Left)
     {
         int itemHeight_ = Font.Height + 5;
         SideTab sideTab_ = mSideBar._getTabAt(e.X, e.Y, Height, itemHeight_);
         if (null != sideTab_)
         {
             mMouseDownTab = sideTab_;
             sideTab_._setSideTabStatus(SideTabStatus_.mSelected_);
             this.Refresh();
         }
     }
 }
Beispiel #4
0
        public SideBarControl(SideBar nSideBar)
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.CacheText, true);
            AllowDrop = true;

            mMouseWheelHandler = new MouseWheelHandler();
            mSideTabContent = new SideTabContent(nSideBar);
            mScrollBar = new VScrollBar();
            mScrollBar.Scroll += new ScrollEventHandler(_scrollBarScrolled);
            mSideBar = nSideBar;
            mMouseDownTab = null;
            Controls.Add(mScrollBar);
            Controls.Add(mSideTabContent);
        }
Beispiel #5
0
 public void _setActiveTab(SideTab nSideTab)
 {
     nSideTab._runReset();
     if (null != mActiveTab)
     {
         mActiveTab._runReset();
     }
     mActiveTab = nSideTab;
 }
Beispiel #6
0
 public void _resetActiveTab()
 {
     if (null == mActiveTab)
     {
         return;
     }
     mActiveTab._runReset();
     if (null == mActiveTab)
     {
         return;
     }
     bool visible_ = mActiveTab._isVisible();
     if (!visible_)
     {
         mActiveTab = null;
     }
 }