ARCed.UI.DockPanel.DockDragHandler.DockIndicator.RefreshChanges C# (CSharp) Method

RefreshChanges() private method

private RefreshChanges ( ) : void
return void
                private void RefreshChanges()
                {
                    var region = new Region(Rectangle.Empty);
                    Rectangle rectDockArea = this.FullPanelEdge ? this.DockPanel.DockArea : this.DockPanel.DocumentWindowBounds;

                    rectDockArea = RectangleToClient(this.DockPanel.RectangleToScreen(rectDockArea));
                    if (this.ShouldPanelIndicatorVisible(DockState.DockLeft))
                    {
                        this.PanelLeft.Location = new Point(rectDockArea.X + PANEL_INDICATOR_MARGIN, rectDockArea.Y + (rectDockArea.Height - this.PanelRight.Height) / 2);
                        this.PanelLeft.Visible = true;
                        region.Union(this.PanelLeft.Bounds);
                    }
                    else
                        this.PanelLeft.Visible = false;

                    if (this.ShouldPanelIndicatorVisible(DockState.DockRight))
                    {
                        this.PanelRight.Location = new Point(rectDockArea.X + rectDockArea.Width - this.PanelRight.Width - PANEL_INDICATOR_MARGIN, rectDockArea.Y + (rectDockArea.Height - this.PanelRight.Height) / 2);
                        this.PanelRight.Visible = true;
                        region.Union(this.PanelRight.Bounds);
                    }
                    else
                        this.PanelRight.Visible = false;

                    if (this.ShouldPanelIndicatorVisible(DockState.DockTop))
                    {
                        this.PanelTop.Location = new Point(rectDockArea.X + (rectDockArea.Width - this.PanelTop.Width) / 2, rectDockArea.Y + PANEL_INDICATOR_MARGIN);
                        this.PanelTop.Visible = true;
                        region.Union(this.PanelTop.Bounds);
                    }
                    else
                        this.PanelTop.Visible = false;

                    if (this.ShouldPanelIndicatorVisible(DockState.DockBottom))
                    {
                        this.PanelBottom.Location = new Point(rectDockArea.X + (rectDockArea.Width - this.PanelBottom.Width) / 2, rectDockArea.Y + rectDockArea.Height - this.PanelBottom.Height - PANEL_INDICATOR_MARGIN);
                        this.PanelBottom.Visible = true;
                        region.Union(this.PanelBottom.Bounds);
                    }
                    else
                        this.PanelBottom.Visible = false;

                    if (this.ShouldPanelIndicatorVisible(DockState.Document))
                    {
                        Rectangle rectDocumentWindow = RectangleToClient(this.DockPanel.RectangleToScreen(this.DockPanel.DocumentWindowBounds));
                        this.PanelFill.Location = new Point(rectDocumentWindow.X + (rectDocumentWindow.Width - this.PanelFill.Width) / 2, rectDocumentWindow.Y + (rectDocumentWindow.Height - this.PanelFill.Height) / 2);
                        this.PanelFill.Visible = true;
                        region.Union(this.PanelFill.Bounds);
                    }
                    else
                        this.PanelFill.Visible = false;

                    if (this.ShouldPaneDiamondVisible())
                    {
                        Rectangle rect = RectangleToClient(this.DockPane.RectangleToScreen(this.DockPane.ClientRectangle));
                        this.PaneDiamond.Location = new Point(rect.Left + (rect.Width - this.PaneDiamond.Width) / 2, rect.Top + (rect.Height - this.PaneDiamond.Height) / 2);
                        this.PaneDiamond.Visible = true;
                        using (var graphicsPath = PaneIndicator.DisplayingGraphicsPath.Clone() as GraphicsPath)
                        {
                            var pts = new[]
                        {
                            new Point(this.PaneDiamond.Left, this.PaneDiamond.Top),
                            new Point(this.PaneDiamond.Right, this.PaneDiamond.Top),
                            new Point(this.PaneDiamond.Left, this.PaneDiamond.Bottom)
                        };
                            using (var matrix = new Matrix(this.PaneDiamond.ClientRectangle, pts))
                            {
                                graphicsPath.Transform(matrix);
                            }
                            region.Union(graphicsPath);
                        }
                    }
                    else
                        this.PaneDiamond.Visible = false;

                    Region = region;
                }