Esempio n. 1
0
 private void SplitBegin(int x, int y)
 {
     RadSplitter.SplitData splitData = this.CalcSplitBounds();
     if (splitData.target == null || this.minSize >= this.maxSize)
     {
         return;
     }
     this.anchor      = new Point(x, y);
     this.splitTarget = splitData.target;
     this.splitSize   = this.GetSplitSize(x, y);
     try
     {
         if (this.splitterMessageFilter != null)
         {
             this.splitterMessageFilter = new RadSplitter.SplitterMessageFilter(this);
         }
         Application.AddMessageFilter((IMessageFilter)this.splitterMessageFilter);
     }
     finally
     {
         CodeAccessPermission.RevertAssert();
     }
     this.Capture = true;
     this.DrawSplitBar(1);
 }
Esempio n. 2
0
 private void SplitEnd(bool accept)
 {
     this.DrawSplitBar(3);
     this.splitTarget = (Control)null;
     this.Capture     = false;
     if (this.splitterMessageFilter != null)
     {
         Application.RemoveMessageFilter((IMessageFilter)this.splitterMessageFilter);
         this.splitterMessageFilter = (RadSplitter.SplitterMessageFilter)null;
     }
     if (accept)
     {
         this.ApplySplitPosition();
     }
     else if (this.splitSize != this.initTargetSize)
     {
         this.SplitPosition = this.initTargetSize;
     }
     this.anchor = Point.Empty;
 }