Ejemplo n.º 1
0
        /// <summary>Initializes a new instance of the <see cref="ViewDockGrid"/> class.</summary>
        public ViewDockGrid()
        {
            _dockMarkers = new GridDockMarkers(this);
            var bounds = ClientRectangle;

            bounds.X      += ViewConstants.Spacing;
            bounds.Y      += ViewConstants.Spacing;
            bounds.Width  -= ViewConstants.Spacing * 2;
            bounds.Height -= ViewConstants.Spacing * 2;
            RootHost       = new ViewHost(this, true, true, null)
            {
                Bounds = bounds,
                Anchor = ViewConstants.AnchorAll,
            };
            RootControl        = RootHost;
            _floatingViewForms = new LinkedList <FloatingViewForm>();
            PopupsStack        = new PopupNotificationsStack();

            SetStyle(ControlStyles.ContainerControl, true);

            SuspendLayout();
            RootHost.Parent = this;
            ResumeLayout(true);

            lock (_grids)
            {
                _grids.AddLast(this);
            }

            BackColor = ViewManager.Renderer.BackgroundColor;
        }
Ejemplo n.º 2
0
        /// <summary>Initializes a new instance of the <see cref="ViewDockGrid"/> class.</summary>
        public ViewDockGrid()
        {
            _dockMarkers = new GridDockMarkers(this);
            var bounds = ClientRectangle;
            bounds.X += ViewConstants.Spacing;
            bounds.Y += ViewConstants.Spacing;
            bounds.Width -= ViewConstants.Spacing * 2;
            bounds.Height -= ViewConstants.Spacing * 2;
            _rootHost = new ViewHost(this, true, true, null)
            {
                Bounds = bounds,
                Anchor = ViewConstants.AnchorAll,
            };
            _rootControl = _rootHost;
            _floatingViewForms = new LinkedList<FloatingViewForm>();
            _popupsStack = new PopupNotificationsStack();

            SetStyle(ControlStyles.ContainerControl, true);

            SuspendLayout();
            _rootHost.Parent = this;
            ResumeLayout(true);

            lock(_grids)
            {
                _grids.AddLast(this);
            }

            BackColor = ViewManager.Renderer.BackgroundColor;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.Control"/> and its child controls and optionally releases the managed resources.
 /// </summary>
 /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
 protected override void Dispose(bool disposing)
 {
     lock (_grids)
     {
         _grids.Remove(this);
     }
     if (disposing)
     {
         _dockMarkers.Dispose();
         if (_left != null)
         {
             _left.Dispose();
             _left = null;
         }
         if (_top != null)
         {
             _top.Dispose();
             _top = null;
         }
         if (_right != null)
         {
             _right.Dispose();
             _right = null;
         }
         if (_bottom != null)
         {
             _bottom.Dispose();
             _bottom = null;
         }
         if (_popupsStack != null)
         {
             _popupsStack.Dispose();
             _popupsStack = null;
         }
         _rootControl = null;
         _floatingViewForms.Clear();
     }
     base.Dispose(disposing);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.Control"/> and its child controls and optionally releases the managed resources.
 /// </summary>
 /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
 protected override void Dispose(bool disposing)
 {
     lock(_grids)
     {
         _grids.Remove(this);
     }
     if(disposing)
     {
         _dockMarkers.Dispose();
         if(_left != null)
         {
             _left.Dispose();
             _left = null;
         }
         if(_top != null)
         {
             _top.Dispose();
             _top = null;
         }
         if(_right != null)
         {
             _right.Dispose();
             _right = null;
         }
         if(_bottom != null)
         {
             _bottom.Dispose();
             _bottom = null;
         }
         if(_popupsStack != null)
         {
             _popupsStack.Dispose();
             _popupsStack = null;
         }
         _rootControl = null;
         _floatingViewForms.Clear();
     }
     base.Dispose(disposing);
 }