예제 #1
0
        // in RTL, we parent a transparent control over the grip to support mirroring.
        private void EnsureRightToLeftGrip()
        {
            if (SizingGrip && RightToLeft == RightToLeft.Yes)
            {
                RTLGrip.Bounds = SizeGripBounds;
                if (!this.Controls.Contains(RTLGrip))
                {
                    WindowsFormsUtils.ReadOnlyControlCollection controlCollection = this.Controls as WindowsFormsUtils.ReadOnlyControlCollection;

                    if (controlCollection != null)
                    {
                        controlCollection.AddInternal(RTLGrip);
                    }
                }
            }
            else if (rtlLayoutGrip != null)
            {
                if (this.Controls.Contains(rtlLayoutGrip))
                {
                    WindowsFormsUtils.ReadOnlyControlCollection controlCollection = this.Controls as WindowsFormsUtils.ReadOnlyControlCollection;

                    if (controlCollection != null)
                    {
                        controlCollection.RemoveInternal(rtlLayoutGrip);
                    }
                    rtlLayoutGrip.Dispose();
                    rtlLayoutGrip = null;
                }
            }
        }
 private void EnsureRightToLeftGrip()
 {
     if (this.SizingGrip && (this.RightToLeft == RightToLeft.Yes))
     {
         this.RTLGrip.Bounds = this.SizeGripBounds;
         if (!base.Controls.Contains(this.RTLGrip))
         {
             WindowsFormsUtils.ReadOnlyControlCollection controls = base.Controls as WindowsFormsUtils.ReadOnlyControlCollection;
             if (controls != null)
             {
                 controls.AddInternal(this.RTLGrip);
             }
         }
     }
     else if ((this.rtlLayoutGrip != null) && base.Controls.Contains(this.rtlLayoutGrip))
     {
         WindowsFormsUtils.ReadOnlyControlCollection controls2 = base.Controls as WindowsFormsUtils.ReadOnlyControlCollection;
         if (controls2 != null)
         {
             controls2.RemoveInternal(this.rtlLayoutGrip);
         }
         this.rtlLayoutGrip.Dispose();
         this.rtlLayoutGrip = null;
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing && (this.rtlLayoutGrip != null))
     {
         this.rtlLayoutGrip.Dispose();
         this.rtlLayoutGrip = null;
     }
     base.Dispose(disposing);
 }
예제 #4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (rtlLayoutGrip != null)
         {
             rtlLayoutGrip.Dispose();
             rtlLayoutGrip = null;
         }
     }
     base.Dispose(disposing);
 }
예제 #5
0
     // in RTL, we parent a transparent control over the grip to support mirroring.
     private void EnsureRightToLeftGrip() {
        if (SizingGrip && RightToLeft == RightToLeft.Yes) {
            RTLGrip.Bounds = SizeGripBounds;
            if (!this.Controls.Contains(RTLGrip)) {
                 WindowsFormsUtils.ReadOnlyControlCollection  controlCollection = this.Controls as WindowsFormsUtils.ReadOnlyControlCollection;
 
                 if (controlCollection != null) {
                     controlCollection.AddInternal(RTLGrip);
                 }
            }                
        }
        else if (rtlLayoutGrip != null) {
           if (this.Controls.Contains(rtlLayoutGrip)) {
               WindowsFormsUtils.ReadOnlyControlCollection  controlCollection = this.Controls as WindowsFormsUtils.ReadOnlyControlCollection;
               
                if (controlCollection != null) {
                    controlCollection.RemoveInternal(rtlLayoutGrip);
                }
                rtlLayoutGrip.Dispose();
                rtlLayoutGrip = null;
           }
             
        }
 
     }
예제 #6
0
 protected override void Dispose( bool disposing ) {
      if (disposing) {
          if (rtlLayoutGrip != null) {
              rtlLayoutGrip.Dispose();
              rtlLayoutGrip = null;
          }
      }
      base.Dispose(disposing);
 }