public DocumentLayoutSystem(SizeF workingSize, DockControl[] windows, DockControl selectedWindow) : this()
		{
			WorkingSize = workingSize;
			Controls.AddRange(windows);
		    if (selectedWindow != null)
		        SelectedControl = selectedWindow;
		}
Beispiel #2
0
 public void AddRange(DockControl[] controls)
 {
     bool_0 = true;
     foreach (var control in controls)
         Add(control);
     bool_0 = false;
     _parent.CalculateAllMetricsAndLayout();
 }
Beispiel #3
0
 public int Add(DockControl control)
 {
     if (List.Contains(control))
         throw new InvalidOperationException("The DockControl already belongs to this ControlLayoutSystem.");
     var count = Count;
     Insert(count, control);
     return count;
 }
		private void method_20(RendererBase renderer, Graphics graphics, Font font_0, DockControl dockControl_2)
		{
			DrawItemState drawItemState = DrawItemState.Default;
			if (this.SelectedControl == dockControl_2)
			{
				drawItemState |= DrawItemState.Selected;
				if (base.DockContainer.Manager != null)
				{
					if (base.DockContainer.Manager.ActiveTabbedDocument == dockControl_2)
					{
						drawItemState |= DrawItemState.Focus;
					}
				}
			}
			if (this.dockControl_1 == dockControl_2)
			{
				drawItemState |= DrawItemState.HotLight;
			}
			if (!dockControl_2.Enabled)
			{
				drawItemState |= DrawItemState.Disabled;
			}
			bool drawSeparator = true;
			if (this.SelectedControl != null)
			{
				if (base.Controls.IndexOf(dockControl_2) == base.Controls.IndexOf(this.SelectedControl) - 1)
				{
					drawSeparator = false;
				}
			}
			Rectangle tabBounds = dockControl_2.TabBounds;
			if (this.Boolean_2 && dockControl_2.AllowClose)
			{
				tabBounds.Width -= 17;
			}
			if ((drawItemState & DrawItemState.Focus) != DrawItemState.Focus)
			{
				renderer.DrawDocumentStripTab(graphics, dockControl_2.TabBounds, tabBounds, dockControl_2.TabImage, dockControl_2.TabText, font_0, dockControl_2.BackColor, dockControl_2.ForeColor, drawItemState, drawSeparator);
			}
			else
			{
				using (Font font = new Font(font_0, FontStyle.Bold))
				{
					renderer.DrawDocumentStripTab(graphics, dockControl_2.TabBounds, tabBounds, dockControl_2.TabImage, dockControl_2.TabText, font, dockControl_2.BackColor, dockControl_2.ForeColor, drawItemState, drawSeparator);
				}
			}
		}
Beispiel #5
0
		internal static void smethod_11(DockControl control)
		{
		    if (control == null)
		        throw new ArgumentNullException();
		    var layoutSystem = control.LayoutSystem;
		    if (layoutSystem == null) return;
		    var arg_1A_0 = layoutSystem.DockContainer;
			var containsFocus= control.ContainsFocus;
			if (containsFocus)
			{
                var form = control.FindForm();
			    if (form != null)
			        form.ActiveControl = null;
			}
			layoutSystem.Controls.Remove(control);
		    if (layoutSystem.Controls.Count == 0)
		        smethod_10(layoutSystem);
		    if (containsFocus && control.Manager != null)
			{
				var dockControl = control.Manager.FindMostRecentlyUsedWindow(DockSituation.Document, control) ??control.Manager.FindMostRecentlyUsedWindow((DockSituation)(-1), control);
			    dockControl?.method_12(true);
			}
		}
Beispiel #6
0
 public DockControl[] GetDockControls()
 {
     var array = new DockControl[_windows.Count];
     _windows.Values.CopyTo(array, 0);
     return array;
 }
Beispiel #7
0
 internal ShowControlContextMenuEventArgs(DockControl dockControl, Point position, ContextMenuContext context) : base(dockControl)
 {
     Position = position;
     Context = context;
 }
Beispiel #8
0
		internal void method_7(DockControl dockControl_0, bool bool_1, bool bool_2)
		{
		    if (dockControl_0.LayoutSystem == LayoutSystem && dockControl_0.LayoutSystem.SelectedControl == dockControl_0)
		    {
		        if (bool_2)
		        {
		            dockControl_0.Activate();
		        }
		        return;
		    }
		    bool_1 = (bool_1 || !method_5());
			dockControl_0.LayoutSystem.SelectedControl = dockControl_0;
			if (dockControl_0.LayoutSystem.SelectedControl == dockControl_0)
			{
				try
				{
					if (LayoutSystem != dockControl_0.LayoutSystem)
					{
						method_6(true);
						Rectangle rectangle;
						rectangle_0 = method_8(dockControl_0.LayoutSystem.PopupSize, out rectangle);
						PopupContainer control = new PopupContainer(this);
						foreach (DockControl dockControl in dockControl_0.LayoutSystem.Controls)
						{
							if (dockControl.Parent != null)
							{
								LayoutUtilities.smethod_8(dockControl);
							}
							dockControl.Parent = control;
						}
						control.ControlLayoutSystem_0 = dockControl_0.LayoutSystem;
						control.Visible = false;
						Parent.Controls.Add(control);
						control.Bounds = rectangle_0;
						control.SuspendLayout();
						control.Bounds = rectangle;
						control.Visible = true;
						control.BringToFront();
						if (!bool_1)
						{
							method_4(control, rectangle, rectangle_0);
						}
						control.Bounds = rectangle_0;
						control.ResumeLayout();
						if (!control.IsDisposed && control.Parent != null)
						{
							_popupContainer = control;
							LayoutSystem = dockControl_0.LayoutSystem;
							timer_1.Enabled = true;
							dockControl_0.OnAutoHidePopupOpened(EventArgs.Empty);
						}
					}
				}
				finally
				{
					if (bool_2 && LayoutSystem == dockControl_0.LayoutSystem)
					{
						dockControl_0.Activate();
					}
				}
			}
		}
Beispiel #9
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
     this.sbmBars = new TD.SandBar.SandBarManager();
     this.leftSandBarDock = new TD.SandBar.ToolBarContainer();
     this.rightSandBarDock = new TD.SandBar.ToolBarContainer();
     this.bottomSandBarDock = new TD.SandBar.ToolBarContainer();
     this.topSandBarDock = new TD.SandBar.ToolBarContainer();
     this.menuBar1 = new TD.SandBar.MenuBar();
     this.menuBarItem1 = new TD.SandBar.MenuBarItem();
     this.mbiFileNew = new TD.SandBar.MenuButtonItem();
     this.mbiFileOpen = new TD.SandBar.MenuButtonItem();
     this.mbiFileClose = new TD.SandBar.MenuButtonItem();
     this.mbiFileSave = new TD.SandBar.MenuButtonItem();
     this.mbiFileSaveAs = new TD.SandBar.MenuButtonItem();
     this.mbiFileExit = new TD.SandBar.MenuButtonItem();
     this.menuBarItem2 = new TD.SandBar.MenuBarItem();
     this.menuBarItem3 = new TD.SandBar.MenuBarItem();
     this.menuBarItem4 = new TD.SandBar.MenuBarItem();
     this.menuBarItem5 = new TD.SandBar.MenuBarItem();
     this.mbiHelpAbout = new TD.SandBar.MenuButtonItem();
     this.toolBar1 = new TD.SandBar.ToolBar();
     this.ofdSelectFile = new System.Windows.Forms.OpenFileDialog();
     this.sdmDocks = new TD.SandDock.SandDockManager();
     this.leftSandDock = new TD.SandDock.DockContainer();
     this.bottomSandDock = new TD.SandDock.DockContainer();
     this.topSandDock = new TD.SandDock.DockContainer();
     this.rightSandDock = new TD.SandDock.DockContainer();
     this.dcExplorer = new TD.SandDock.DockControl();
     this.tvContents = new System.Windows.Forms.TreeView();
     this.toolBar2 = new TD.SandBar.ToolBar();
     this.biRefresh = new TD.SandBar.ButtonItem();
     this.topSandBarDock.SuspendLayout();
     this.rightSandDock.SuspendLayout();
     this.dcExplorer.SuspendLayout();
     this.SuspendLayout();
     //
     // sbmBars
     //
     this.sbmBars.OwnerForm = this;
     //
     // leftSandBarDock
     //
     this.leftSandBarDock.Dock = System.Windows.Forms.DockStyle.Left;
     this.leftSandBarDock.Guid = new System.Guid("afce231c-b6c2-4e2e-878c-4d634b1fb218");
     this.leftSandBarDock.Location = new System.Drawing.Point(0, 43);
     this.leftSandBarDock.Manager = this.sbmBars;
     this.leftSandBarDock.Name = "leftSandBarDock";
     this.leftSandBarDock.Size = new System.Drawing.Size(0, 552);
     this.leftSandBarDock.TabIndex = 0;
     //
     // rightSandBarDock
     //
     this.rightSandBarDock.Dock = System.Windows.Forms.DockStyle.Right;
     this.rightSandBarDock.Guid = new System.Guid("c78bf1f0-0b19-4707-ba6b-117a611959d0");
     this.rightSandBarDock.Location = new System.Drawing.Point(892, 43);
     this.rightSandBarDock.Manager = this.sbmBars;
     this.rightSandBarDock.Name = "rightSandBarDock";
     this.rightSandBarDock.Size = new System.Drawing.Size(0, 552);
     this.rightSandBarDock.TabIndex = 1;
     //
     // bottomSandBarDock
     //
     this.bottomSandBarDock.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.bottomSandBarDock.Guid = new System.Guid("3a1f20aa-8337-4a26-953f-fca697dbf2b5");
     this.bottomSandBarDock.Location = new System.Drawing.Point(0, 595);
     this.bottomSandBarDock.Manager = this.sbmBars;
     this.bottomSandBarDock.Name = "bottomSandBarDock";
     this.bottomSandBarDock.Size = new System.Drawing.Size(892, 0);
     this.bottomSandBarDock.TabIndex = 2;
     //
     // topSandBarDock
     //
     this.topSandBarDock.Controls.Add(this.menuBar1);
     this.topSandBarDock.Controls.Add(this.toolBar1);
     this.topSandBarDock.Dock = System.Windows.Forms.DockStyle.Top;
     this.topSandBarDock.Guid = new System.Guid("a4256977-d6be-4b30-b25f-105f7cb24240");
     this.topSandBarDock.Location = new System.Drawing.Point(0, 0);
     this.topSandBarDock.Manager = this.sbmBars;
     this.topSandBarDock.Name = "topSandBarDock";
     this.topSandBarDock.Size = new System.Drawing.Size(892, 43);
     this.topSandBarDock.TabIndex = 3;
     //
     // menuBar1
     //
     this.menuBar1.Guid = new System.Guid("2553478c-d099-475b-be89-0bdfaefe94ba");
     this.menuBar1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] {
                                                                       this.menuBarItem1,
                                                                       this.menuBarItem2,
                                                                       this.menuBarItem3,
                                                                       this.menuBarItem4,
                                                                       this.menuBarItem5});
     this.menuBar1.Location = new System.Drawing.Point(2, 0);
     this.menuBar1.Name = "menuBar1";
     this.menuBar1.OwnerForm = this;
     this.menuBar1.Size = new System.Drawing.Size(890, 25);
     this.menuBar1.TabIndex = 0;
     this.menuBar1.Text = "menuBar1";
     //
     // menuBarItem1
     //
     this.menuBarItem1.Items.AddRange(new TD.SandBar.ToolbarItemBase[] {
                                                                           this.mbiFileNew,
                                                                           this.mbiFileOpen,
                                                                           this.mbiFileClose,
                                                                           this.mbiFileSave,
                                                                           this.mbiFileSaveAs,
                                                                           this.mbiFileExit});
     this.menuBarItem1.Text = "&File";
     //
     // mbiFileNew
     //
     this.mbiFileNew.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
     this.mbiFileNew.Text = "New";
     this.mbiFileNew.Activate += new System.EventHandler(this.mbiFileNew_Activate);
     //
     // mbiFileOpen
     //
     this.mbiFileOpen.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
     this.mbiFileOpen.Text = "&Open...";
     this.mbiFileOpen.Activate += new System.EventHandler(this.mbiFileOpen_Activate);
     //
     // mbiFileClose
     //
     this.mbiFileClose.Text = "Close";
     this.mbiFileClose.Activate += new System.EventHandler(this.mbiFileClose_Activate);
     //
     // mbiFileSave
     //
     this.mbiFileSave.BeginGroup = true;
     this.mbiFileSave.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
     this.mbiFileSave.Text = "&Save";
     this.mbiFileSave.Visible = false;
     //
     // mbiFileSaveAs
     //
     this.mbiFileSaveAs.Text = "Save &As...";
     this.mbiFileSaveAs.Visible = false;
     //
     // mbiFileExit
     //
     this.mbiFileExit.BeginGroup = true;
     this.mbiFileExit.Text = "E&xit";
     this.mbiFileExit.Activate += new System.EventHandler(this.mbiFileExit_Activate);
     //
     // menuBarItem2
     //
     this.menuBarItem2.Text = "&Edit";
     this.menuBarItem2.Visible = false;
     //
     // menuBarItem3
     //
     this.menuBarItem3.Text = "&View";
     this.menuBarItem3.Visible = false;
     //
     // menuBarItem4
     //
     this.menuBarItem4.MdiWindowList = true;
     this.menuBarItem4.Text = "&Window";
     //
     // menuBarItem5
     //
     this.menuBarItem5.Items.AddRange(new TD.SandBar.ToolbarItemBase[] {
                                                                           this.mbiHelpAbout});
     this.menuBarItem5.Text = "&Help";
     //
     // mbiHelpAbout
     //
     this.mbiHelpAbout.Text = "&About...";
     //
     // toolBar1
     //
     this.toolBar1.DockLine = 1;
     this.toolBar1.Guid = new System.Guid("9143a79b-d608-4d18-90f4-389e26f1c27a");
     this.toolBar1.Location = new System.Drawing.Point(2, 25);
     this.toolBar1.Name = "toolBar1";
     this.toolBar1.Size = new System.Drawing.Size(24, 18);
     this.toolBar1.TabIndex = 1;
     this.toolBar1.Text = "toolBar1";
     //
     // ofdSelectFile
     //
     this.ofdSelectFile.DefaultExt = "eu2map";
     //
     // sdmDocks
     //
     this.sdmDocks.DockingManager = TD.SandDock.DockingManager.Whidbey;
     this.sdmDocks.OwnerForm = this;
     //
     // leftSandDock
     //
     this.leftSandDock.Dock = System.Windows.Forms.DockStyle.Left;
     this.leftSandDock.Guid = new System.Guid("d38c2649-e16f-40ac-a442-a259d51fc390");
     this.leftSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400);
     this.leftSandDock.Location = new System.Drawing.Point(0, 43);
     this.leftSandDock.Manager = this.sdmDocks;
     this.leftSandDock.Name = "leftSandDock";
     this.leftSandDock.Size = new System.Drawing.Size(0, 552);
     this.leftSandDock.TabIndex = 9;
     //
     // bottomSandDock
     //
     this.bottomSandDock.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.bottomSandDock.Guid = new System.Guid("863a86b3-7faa-443e-8a15-fdbe1aa1f0eb");
     this.bottomSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400);
     this.bottomSandDock.Location = new System.Drawing.Point(0, 595);
     this.bottomSandDock.Manager = this.sdmDocks;
     this.bottomSandDock.Name = "bottomSandDock";
     this.bottomSandDock.Size = new System.Drawing.Size(892, 0);
     this.bottomSandDock.TabIndex = 11;
     //
     // topSandDock
     //
     this.topSandDock.Dock = System.Windows.Forms.DockStyle.Top;
     this.topSandDock.Guid = new System.Guid("132e5ede-a377-4df1-a798-e8e876b05a1f");
     this.topSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400);
     this.topSandDock.Location = new System.Drawing.Point(0, 43);
     this.topSandDock.Manager = this.sdmDocks;
     this.topSandDock.Name = "topSandDock";
     this.topSandDock.Size = new System.Drawing.Size(892, 0);
     this.topSandDock.TabIndex = 12;
     //
     // rightSandDock
     //
     this.rightSandDock.Controls.Add(this.dcExplorer);
     this.rightSandDock.Dock = System.Windows.Forms.DockStyle.Right;
     this.rightSandDock.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.rightSandDock.Guid = new System.Guid("5917f22a-97ca-4ca9-8eb9-30674bdd07a4");
     this.rightSandDock.LayoutSystem = new TD.SandDock.SplitLayoutSystem(250, 400, System.Windows.Forms.Orientation.Horizontal, new TD.SandDock.LayoutSystemBase[] {
                                                                                                                                                                       new TD.SandDock.ControlLayoutSystem(250, 552, new TD.SandDock.DockControl[] {
                                                                                                                                                                                                                                                       this.dcExplorer}, this.dcExplorer)});
     this.rightSandDock.Location = new System.Drawing.Point(638, 43);
     this.rightSandDock.Manager = this.sdmDocks;
     this.rightSandDock.Name = "rightSandDock";
     this.rightSandDock.Size = new System.Drawing.Size(254, 552);
     this.rightSandDock.TabIndex = 10;
     //
     // dcExplorer
     //
     this.dcExplorer.Controls.Add(this.tvContents);
     this.dcExplorer.Controls.Add(this.toolBar2);
     this.dcExplorer.Guid = new System.Guid("19f5c70c-c553-466a-a004-c7c26a52ec34");
     this.dcExplorer.Location = new System.Drawing.Point(4, 18);
     this.dcExplorer.Name = "dcExplorer";
     this.dcExplorer.Size = new System.Drawing.Size(250, 511);
     this.dcExplorer.TabImage = ((System.Drawing.Image)(resources.GetObject("dcExplorer.TabImage")));
     this.dcExplorer.TabIndex = 0;
     this.dcExplorer.Text = "Project Explorer";
     //
     // tvContents
     //
     this.tvContents.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tvContents.ImageIndex = -1;
     this.tvContents.Location = new System.Drawing.Point(0, 24);
     this.tvContents.Name = "tvContents";
     this.tvContents.SelectedImageIndex = -1;
     this.tvContents.Size = new System.Drawing.Size(250, 487);
     this.tvContents.TabIndex = 3;
     //
     // toolBar2
     //
     this.toolBar2.Guid = new System.Guid("ad8c68f1-221e-4e23-9bdd-dc8e02d68020");
     this.toolBar2.Items.AddRange(new TD.SandBar.ToolbarItemBase[] {
                                                                       this.biRefresh});
     this.toolBar2.Location = new System.Drawing.Point(0, 0);
     this.toolBar2.Name = "toolBar2";
     this.toolBar2.Renderer = new TD.SandBar.Office2002Renderer();
     this.toolBar2.Size = new System.Drawing.Size(250, 24);
     this.toolBar2.TabIndex = 2;
     this.toolBar2.Text = "toolBar2";
     //
     // biRefresh
     //
     this.biRefresh.Image = ((System.Drawing.Image)(resources.GetObject("biRefresh.Image")));
     //
     // MainForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
     this.ClientSize = new System.Drawing.Size(892, 595);
     this.Controls.Add(this.leftSandDock);
     this.Controls.Add(this.rightSandDock);
     this.Controls.Add(this.bottomSandDock);
     this.Controls.Add(this.topSandDock);
     this.Controls.Add(this.leftSandBarDock);
     this.Controls.Add(this.rightSandBarDock);
     this.Controls.Add(this.bottomSandBarDock);
     this.Controls.Add(this.topSandBarDock);
     this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.IsMdiContainer = true;
     this.Name = "MainForm";
     this.Text = "Map Explorer";
     this.Load += new System.EventHandler(this.MainForm_Load);
     this.topSandBarDock.ResumeLayout(false);
     this.rightSandDock.ResumeLayout(false);
     this.dcExplorer.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Beispiel #10
0
 public ControlLayoutSystem CreateNewLayoutSystem(DockControl control, SizeF size) => CreateNewLayoutSystem(new[] { control }, size);
Beispiel #11
0
 private void OnDoubleClick(object sender, EventArgs e)
 {
     var controls = LayoutSystem.DockControls;
     var selected = SelectedControl;
     if (controls[0].MetaData.LastFixedDockSituation == DockSituation.Docked && !LayoutSystem.vmethod_3(selected.MetaData.LastFixedDockSide))
         return;
     if (controls[0].MetaData.LastFixedDockSituation == DockSituation.Document && !LayoutSystem.vmethod_3(ContainerDockLocation.Center))
         return;
     LayoutSystem = new SplitLayoutSystem();
     Dispose();
     if (selected.MetaData.LastFixedDockSituation == DockSituation.Docked)
         controls[0].OpenDocked(WindowOpenMethod.OnScreenActivate);
     else
         controls[0].OpenDocument(WindowOpenMethod.OnScreenActivate);
     var array = new DockControl[controls.Length - 1];
     Array.Copy(controls, 1, array, 0, controls.Length - 1);
     controls[0].LayoutSystem.Controls.AddRange(array);
     controls[0].LayoutSystem.SelectedControl = selected;
 }
Beispiel #12
0
 internal void UnregisterWindow(DockControl control)
 {
     _windows.Remove(control.Guid);
     OnDockControlRemoved(new DockControlEventArgs(control));
 }
Beispiel #13
0
 private void SaveWindowLayout(DockControl control, XmlTextWriter writer)
 {
     Class22.smethod_3(control, writer);
 }
Beispiel #14
0
 public Class7(SandDockManager manager, DockContainer container, LayoutSystemBase sourceControlSystem, DockControl sourceControl, int dockedSize, Point startPoint, DockingHints dockingHints) : base(container, dockingHints, true, container.Renderer.TabStripMetrics.Height)
 {
     Manager = manager;
     Container = container;
     SourceControlSystem = sourceControlSystem;
     SourceControl = sourceControl;
     DockedSize = dockedSize;
     if (container is DocumentContainer)
     {
         cursor_0 = new Cursor(GetType().Assembly.GetManifestResourceStream("TD.SandDock.Resources.splitting.cur"));
         cursor_1 = new Cursor(GetType().Assembly.GetManifestResourceStream("TD.SandDock.Resources.splittingno.cur"));
     }
     if (sourceControlSystem is SplitLayoutSystem)
     {
         size_0 = ((FloatingContainer)container).FloatingSize;
     }
     else if (sourceControl == null)
     {
         size_0 = (sourceControlSystem as ControlLayoutSystem)?.SelectedControl?.FloatingSize ?? sourceControlSystem.Bounds.Size;
     }
     else
     {
         size_0 = sourceControl.FloatingSize;
     }
     var bounds = sourceControlSystem.Bounds;
     if (bounds.Width <= 0)
     {
         startPoint.X = size_0.Width / 2;
     }
     else
     {
         startPoint.X -= bounds.Left;
         startPoint.X = Convert.ToInt32(startPoint.X / (float)bounds.Width * size_0.Width);
     }
     point_0 = sourceControl == null ? new Point(startPoint.X, startPoint.Y - bounds.Top) : new Point(startPoint.X, size_0.Height - (bounds.Bottom - startPoint.Y));
     point_0.Y = Math.Max(point_0.Y, 0);
     point_0.Y = Math.Min(point_0.Y, size_0.Height);
     ControlLayoutSystem_0 = method_10();
     Container.OnDockingStarted(EventArgs.Empty);
 }
Beispiel #15
0
 public Class8(SandDockManager manager, DockContainer container, LayoutSystemBase sourceControlSystem, DockControl sourceControl, int dockedSize, Point startPoint, DockingHints dockingHints) : base(manager, container, sourceControlSystem, sourceControl, dockedSize, startPoint, dockingHints)
 {
     arrayList_0 = new ArrayList();
     if (Manager?.DockSystemContainer != null)
         method_22();
 }
Beispiel #16
0
 internal void method_0(SandDockManager manager, DockContainer container, LayoutSystemBase layoutSystem, DockControl control, int int_2, Point point_0, DockingHints dockingHints, DockingManager dockingManager_0)
 {
     if (dockingManager_0 == DockingManager.Whidbey && AbstractManager.smethod_0())
     {
         class7_0 = new Class8(manager, DockContainer, this, control, int_2, point_0, dockingHints);
     }
     else
     {
         class7_0 = new Class7(manager, DockContainer, this, control, int_2, point_0, dockingHints);
     }
     class7_0.DockingManagerFinished += OnDockingManagerFinished;
     class7_0.Cancalled += OnCancalled;
     class7_0.OnMouseMove(Cursor.Position);
 }
Beispiel #17
0
		private void sandDockManager1_DockControlActivated(object sender, TD.SandDock.DockControlEventArgs e)
		{
			AppendLog("Activated: " + e.DockControl.Text);

			lastActivatedWindow = e.DockControl;
		}
Beispiel #18
0
			public ActiveFileMenuItem(DockControl window)
				: base(window.Text)
			{
				this.window = window;
			}
Beispiel #19
0
 internal void RegisterWindow(DockControl control)
 {
     _windows[control.Guid] = control;
     OnDockControlAdded(new DockControlEventArgs(control));
 }
Beispiel #20
0
 private static void smethod_1(DockControl dockControl_0, XmlNode xmlNode_0, DockingState dockingState0, string string_0)
 {
     TypeConverter converter = TypeDescriptor.GetConverter(typeof(int));
     if (xmlNode_0.Attributes[string_0 + "WorkingSize"] != null)
     {
         dockingState0.Size = SandDockManager.ConvertStringToSizeF(xmlNode_0.Attributes[string_0 + "WorkingSize"].Value);
     }
     if (xmlNode_0.Attributes[string_0 + "WindowGroupGuid"] != null)
     {
         dockingState0.Guid = new Guid(xmlNode_0.Attributes[string_0 + "WindowGroupGuid"].Value);
     }
     if (xmlNode_0.Attributes[string_0 + "IndexInWindowGroup"] != null)
     {
         dockingState0.Int32_1 = (int)converter.ConvertFromString(null, CultureInfo.InvariantCulture, xmlNode_0.Attributes[string_0 + "IndexInWindowGroup"].Value);
     }
     if (xmlNode_0.Attributes[string_0 + "SplitPath"] != null)
     {
         dockingState0.Int32_0 = Class22.smethod_2(xmlNode_0.Attributes[string_0 + "SplitPath"].Value);
     }
 }
Beispiel #21
0
 internal void ReRegisterWindow(DockControl control, Guid oldGuid)
 {
     if (_windows.Contains(oldGuid))
         _windows.Remove(oldGuid);
     _windows[control.Guid] = control;
 }
Beispiel #22
0
 internal static void smethod_3(DockControl dockControl_0, XmlTextWriter xmlTextWriter_0)
 {
     TypeConverter converter = TypeDescriptor.GetConverter(typeof(long));
     TypeConverter converter2 = TypeDescriptor.GetConverter(typeof(int));
     TypeConverter converter3 = TypeDescriptor.GetConverter(typeof(Size));
     TypeConverter converter4 = TypeDescriptor.GetConverter(typeof(Point));
     xmlTextWriter_0.WriteStartElement("Window");
     xmlTextWriter_0.WriteAttributeString("Guid", dockControl_0.Guid.ToString());
     xmlTextWriter_0.WriteAttributeString("LastFocused", converter.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.MetaData.LastFocused.ToFileTime()));
     xmlTextWriter_0.WriteAttributeString("DockedSize", converter2.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.MetaData.DockedContentSize));
     xmlTextWriter_0.WriteAttributeString("PopupSize", converter2.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.PopupSize));
     xmlTextWriter_0.WriteAttributeString("FloatingLocation", converter4.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.FloatingLocation));
     xmlTextWriter_0.WriteAttributeString("FloatingSize", converter3.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.FloatingSize));
     xmlTextWriter_0.WriteAttributeString("LastOpenDockSituation", dockControl_0.MetaData.LastOpenDockSituation.ToString());
     xmlTextWriter_0.WriteAttributeString("LastFixedDockSituation", dockControl_0.MetaData.LastFixedDockSituation.ToString());
     xmlTextWriter_0.WriteAttributeString("LastFixedDockLocation", dockControl_0.MetaData.LastFixedDockSide.ToString());
     xmlTextWriter_0.WriteAttributeString("LastFloatingWindowGuid", dockControl_0.MetaData.LastFloatingWindowGuid.ToString());
     xmlTextWriter_0.WriteAttributeString("LastDockContainerCount", converter2.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.MetaData.DockedState.Int32_3));
     xmlTextWriter_0.WriteAttributeString("LastDockContainerIndex", converter2.ConvertToString(null, CultureInfo.InvariantCulture, dockControl_0.MetaData.DockedState.Int32_2));
     Class22.smethod_4(dockControl_0, xmlTextWriter_0, dockControl_0.MetaData.DockedState, "Docked");
     Class22.smethod_4(dockControl_0, xmlTextWriter_0, dockControl_0.MetaData.DocumentState, "Document");
     Class22.smethod_4(dockControl_0, xmlTextWriter_0, dockControl_0.MetaData.FloatingState, "Floating");
     xmlTextWriter_0.WriteEndElement();
 }
Beispiel #23
0
        private void SetActiveTabbedDocument(DockControl value)
        {
            if (value != null && value.DockSituation != DockSituation.Document)
                throw new ArgumentException("The specified window is not currently being displayed as a document, therefore it cannot be set as the active document.", "value");
            if (value == ActiveTabbedDocument) return;

            if (ActiveTabbedDocument != null)
            {
                ActiveTabbedDocument.DockSituationChanged -= OnActiveTabbedDocumentDockSituationChanged;
                ActiveTabbedDocument.CalculateAllMetricsAndLayout();
            }
            ActiveTabbedDocument = value;
            if (ActiveTabbedDocument != null)
            {
                ActiveTabbedDocument.DockSituationChanged += OnActiveTabbedDocumentDockSituationChanged;
                ActiveTabbedDocument.CalculateAllMetricsAndLayout();
            }
            OnActiveTabbedDocumentChanged(EventArgs.Empty);
        }
Beispiel #24
0
 public int IndexOf(DockControl control) => List.IndexOf(control);
Beispiel #25
0
        public ControlLayoutSystem CreateNewLayoutSystem(DockControl[] controls, SizeF size)
        {
            if (controls == null)
                throw new ArgumentNullException(nameof(controls));

            var layout = vmethod_1();
            layout.WorkingSize = size;
            if (controls.Length != 0)
                layout.Controls.AddRange(controls);
            return layout;
        }
Beispiel #26
0
 internal ActiveFilesListEventArgs(DockControl[] windows, Control control, Point position)
 {
     Windows = windows;
     Control = control;
     Position = position;
 }
Beispiel #27
0
 private void OnSelectionChanged(DockControl oldSelection, DockControl newSelection)
 {
     UnderlyingForm.Text = newSelection == null ? "" : newSelection.Text;
 }
Beispiel #28
0
 internal DockControl FindMostRecentlyUsedWindow(DockSituation dockSituation, DockControl notThisOne)
 {
     var t = DateTime.MinValue;
     DockControl result = null;
     foreach (var control in GetDockControls().Where(dockControl => dockControl != notThisOne && dockControl.MetaData.LastFocused >= t && (dockSituation == (DockSituation)(-1) || dockControl.DockSituation == dockSituation)))
     {
         t = control.MetaData.LastFocused;
         result = control;
     }
     return result;
 }
Beispiel #29
0
 private static void smethod_4(DockControl dockControl_0, XmlTextWriter xmlTextWriter_0, DockingState dockingState0, string string_0)
 {
     TypeConverter converter = TypeDescriptor.GetConverter(typeof(int));
     xmlTextWriter_0.WriteAttributeString(string_0 + "WorkingSize", SandDockManager.ConvertSizeFToString(dockingState0.Size));
     xmlTextWriter_0.WriteAttributeString(string_0 + "WindowGroupGuid", dockingState0.Guid.ToString());
     xmlTextWriter_0.WriteAttributeString(string_0 + "IndexInWindowGroup", converter.ConvertToString(null, CultureInfo.InvariantCulture, dockingState0.Int32_1));
     xmlTextWriter_0.WriteAttributeString(string_0 + "SplitPath", smethod_5(dockingState0.Int32_0));
 }
Beispiel #30
0
            public void Insert(int index, DockControl control)
            {
                if (control == null) return;
                if (control.LayoutSystem == _parent && (IndexOf(control) == index || Count == 1))
                    return;

                if (control.LayoutSystem != null)
                {
                    if (Contains(control) && IndexOf(control) < index)
                    {
                        index--;
                    }
                    control.LayoutSystem.Controls.Remove(control);
                }
                List.Insert(index, control);
            }