internal void xe9a159cd1e028df2( SandDockManager x91f347c6e97f1846, DockContainer xd3311d815ca25f02, LayoutSystemBase x6e150040c8d97700, DockControl x43bec302f92080b9, int x9562cf1322eeedf1, System.Drawing.Point x6afebf16b45c02e0, DockingHints x48cee1d69929b4fe, DockingManager xab4835b6b3620991) { if (xab4835b6b3620991 == DockingManager.Whidbey) { goto label_5; } label_1: this.x531514c39973cbc6 = new xedb4922162c60d3d(x91f347c6e97f1846, this.DockContainer, this, x43bec302f92080b9, x9562cf1322eeedf1, x6afebf16b45c02e0, x48cee1d69929b4fe); label_2: this.x531514c39973cbc6.x67ecc0d0e7c9a202 += new xedb4922162c60d3d.DockingManagerFinishedEventHandler(this.x46ff430ed3944e0f); this.x531514c39973cbc6.x868a32060451dd2e += new EventHandler(this.x0ae87c4881d90427); if (true) { this.x531514c39973cbc6.OnMouseMove(Cursor.Position); return; } label_5: if (x890231ddf317379e.xca8cda6e489f8dd8()) { this.x531514c39973cbc6 = (xedb4922162c60d3d) new x31248f32f85df1dd(x91f347c6e97f1846, this.DockContainer, this, x43bec302f92080b9, x9562cf1322eeedf1, x6afebf16b45c02e0, x48cee1d69929b4fe); goto label_2; } else { goto label_1; } }
internal static int[] x27f6597db2aeb7d7(ControlLayoutSystem x5d3b2a2c534d6d79) { ArrayList arrayList = new ArrayList(); LayoutSystemBase layoutSystem = (LayoutSystemBase)x5d3b2a2c534d6d79; label_3: if (layoutSystem != null) { while (layoutSystem.Parent != null) { arrayList.Add((object)layoutSystem.Parent.LayoutSystems.IndexOf(layoutSystem)); if (true) { break; } } do { layoutSystem = (LayoutSystemBase)layoutSystem.Parent; }while (false); goto label_3; } else { arrayList.Reverse(); return((int[])arrayList.ToArray(typeof(int))); } }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); if (this.x3df31cf55a47bc37 == null) { return; } this.x3df31cf55a47bc37.OnMouseLeave(); this.x3df31cf55a47bc37 = (LayoutSystemBase)null; }
private string xa3a7472ac4e61f76(System.Drawing.Point xb9c2cfae130d9256) { LayoutSystemBase layoutSystemAt = this.GetLayoutSystemAt(xb9c2cfae130d9256); if (layoutSystemAt is ControlLayoutSystem) { return(((ControlLayoutSystem)layoutSystemAt).xe0e7b93bedab6c05(xb9c2cfae130d9256)); } return(""); }
public x8e80e1c8bce8caf7( DockContainer container, SplitLayoutSystem splitLayout, LayoutSystemBase aboveLayout, LayoutSystemBase belowLayout, System.Drawing.Point startPoint, DockingHints dockingHints) : base((Control)container, dockingHints, false) { label_7: this.xd3311d815ca25f02 = container; this.xd0bab8a0f8013a7b = splitLayout; this.xc13a8191724b6d55 = aboveLayout; this.x5aa50bbadb0a1e6c = belowLayout; this.xcb09bd0cee4909a3 = startPoint; if (splitLayout.SplitMode == Orientation.Horizontal) { goto label_5; } else { goto label_3; } label_2: this.OnMouseMove(startPoint); return; label_3: this.xffa8345bf918658d = aboveLayout.Bounds.X + 25; do { this.xb646339c3b9e735a = belowLayout.Bounds.Right - 25; if (true) { if (true) { this.x3fb8b43b602e016f = aboveLayout.WorkingSize.Width + belowLayout.WorkingSize.Width; } else { goto label_7; } } else { goto label_5; } }while (false); goto label_2; label_5: this.xffa8345bf918658d = aboveLayout.Bounds.Y + 25; this.xb646339c3b9e735a = belowLayout.Bounds.Bottom - 25; this.x3fb8b43b602e016f = aboveLayout.WorkingSize.Height + belowLayout.WorkingSize.Height; goto label_2; }
private void x5b6d1177ca7f3461(LayoutSystemBase x6e150040c8d97700) { this.x83627743ea4ce5a2.Add((object)x6e150040c8d97700); if (!(x6e150040c8d97700 is SplitLayoutSystem)) { return; } foreach (LayoutSystemBase layoutSystem in (CollectionBase)((SplitLayoutSystem)x6e150040c8d97700).LayoutSystems) { this.x5b6d1177ca7f3461(layoutSystem); } }
private void x7e9646eed248ed11(bool xaa70223940104cbe) { this.x83627743ea4ce5a2.Clear(); this.x3df31cf55a47bc37 = (LayoutSystemBase)null; if (true) { goto label_2; } label_1: this.x333d8ec4f70a6d86(); Application.Idle += new EventHandler(this.x4130a50ad5956bc2); return; label_2: this.x5b6d1177ca7f3461((LayoutSystemBase)this.x35c76d526f88c3c8); if (!xaa70223940104cbe && this.xa03963cfd21be862 == 0) { goto label_1; } }
internal void xec9697acef66c1bc(LayoutSystemBase x6e150040c8d97700, Rectangle xda73fcb97c77d998) { if (!this.IsHandleCreated) { return; } using (Graphics graphics = this.CreateGraphics()) { RendererBase x631afe05fcecf1f4 = this.x631afe05fcecf1f4; do { x631afe05fcecf1f4.StartRenderSession(HotkeyPrefix.None); if (x6e150040c8d97700 != this.x35c76d526f88c3c8) { x6e150040c8d97700.Layout(x631afe05fcecf1f4, graphics, xda73fcb97c77d998, false); } else { goto label_4; } }while (false); goto label_8; label_3: x631afe05fcecf1f4.FinishRenderSession(); return; label_4: x6e150040c8d97700.Layout(x631afe05fcecf1f4, graphics, xda73fcb97c77d998, this.IsFloating); goto label_3; label_8: if (true) { goto label_3; } } }
private void SaveLayoutSystem(LayoutSystemBase layoutSystem, XmlTextWriter writer) { if (layoutSystem is SplitLayoutSystem) { writer.WriteStartElement("SplitLayoutSystem"); } else { if (!(layoutSystem is ControlLayoutSystem)) { return; } writer.WriteStartElement("ControlLayoutSystem"); } writer.WriteAttributeString("WorkingSize", SandDockManager.ConvertSizeFToString(layoutSystem.WorkingSize)); if (!(layoutSystem is SplitLayoutSystem)) { if (layoutSystem is ControlLayoutSystem) { ControlLayoutSystem controlLayoutSystem = (ControlLayoutSystem)layoutSystem; writer.WriteAttributeString("Guid", controlLayoutSystem.Guid.ToString()); writer.WriteAttributeString("Collapsed", this.ConvertBoolToString(controlLayoutSystem.Collapsed)); if (controlLayoutSystem.SelectedControl != null && controlLayoutSystem.SelectedControl.PersistState) { writer.WriteAttributeString("SelectedControl", controlLayoutSystem.SelectedControl.Guid.ToString()); } writer.WriteStartElement("Controls"); foreach (DockControl dockControl in controlLayoutSystem.Controls) { if (dockControl.PersistState) { writer.WriteStartElement("Control"); writer.WriteAttributeString("Guid", dockControl.Guid.ToString()); writer.WriteEndElement(); } } writer.WriteEndElement(); } } else { SplitLayoutSystem splitLayoutSystem = (SplitLayoutSystem)layoutSystem; writer.WriteAttributeString("SplitMode", ((int)splitLayoutSystem.SplitMode).ToString()); foreach (LayoutSystemBase layoutSystemBase in splitLayoutSystem.LayoutSystems) { if (layoutSystemBase.PersistState) { this.SaveLayoutSystem(layoutSystemBase, writer); } } } writer.WriteEndElement(); }
public void Remove(LayoutSystemBase layoutSystem) => List.Remove(layoutSystem);
public void Insert(int index, LayoutSystemBase layoutSystem) { if (layoutSystem._parent != null) throw new ArgumentException("Layout system already has a parent. You must first remove it from its parent."); List.Insert(index, layoutSystem); }
public void CopyTo(LayoutSystemBase[] array, int index) => List.CopyTo(array, index);
public void AddRange(LayoutSystemBase[] layoutSystems) { updating = true; foreach (var layoutSystem in layoutSystems) Add(layoutSystem); updating = false; method_0(); }
public bool Optimize() { if (LayoutSystems.Count != 1 || !(LayoutSystems[0] is SplitLayoutSystem)) { IEnumerator enumerator = LayoutSystems.GetEnumerator(); bool result; try { while (enumerator.MoveNext()) { LayoutSystemBase layoutSystemBase = (LayoutSystemBase)enumerator.Current; if (layoutSystemBase is SplitLayoutSystem) { SplitLayoutSystem splitLayoutSystem = (SplitLayoutSystem)layoutSystemBase; if (splitLayoutSystem.SplitMode == SplitMode) { LayoutSystemBase[] array = new LayoutSystemBase[splitLayoutSystem.LayoutSystems.Count]; splitLayoutSystem.LayoutSystems.CopyTo(array, 0); splitLayoutSystem.LayoutSystems.updating = true; splitLayoutSystem.LayoutSystems.Clear(); int index = LayoutSystems.IndexOf(splitLayoutSystem); LayoutSystems.updating = true; LayoutSystems.Remove(splitLayoutSystem); for (int i = array.Length - 1; i >= 0; i--) { LayoutSystems.Insert(index, array[i]); } LayoutSystems.updating = false; result = true; return result; } if (splitLayoutSystem.Optimize()) { result = true; return result; } } } return false; } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } return result; } var splitLayoutSystem2 = (SplitLayoutSystem)LayoutSystems[0]; if (splitLayoutSystem2.LayoutSystems.Count == 1 && splitLayoutSystem2.LayoutSystems[0] is SplitLayoutSystem && ((SplitLayoutSystem) splitLayoutSystem2.LayoutSystems[0]).SplitMode == SplitMode) { SplitLayoutSystem splitLayoutSystem3 = (SplitLayoutSystem) splitLayoutSystem2.LayoutSystems[0]; LayoutSystemBase[] array2 = new LayoutSystemBase[splitLayoutSystem3.LayoutSystems.Count]; splitLayoutSystem3.LayoutSystems.CopyTo(array2, 0); splitLayoutSystem3.LayoutSystems.updating = true; splitLayoutSystem3.LayoutSystems.Clear(); LayoutSystems.updating = true; LayoutSystems.Clear(); LayoutSystems.AddRange(array2); LayoutSystems.updating = false; return true; } return false; }
internal void method_5(Point point_0, out LayoutSystemBase layoutSystemBase_0, out LayoutSystemBase layoutSystemBase_1) { var index = LayoutSystems.Cast<LayoutSystemBase>() .Where( layout => (!(layout is ControlLayoutSystem) || !((ControlLayoutSystem) layout).Collapsed) && ((SplitMode == Orientation.Horizontal && point_0.Y >= layout.Bounds.Bottom && point_0.Y <= layout.Bounds.Bottom + 4) || (SplitMode == Orientation.Vertical && point_0.X >= layout.Bounds.Right && point_0.X <= layout.Bounds.Right + 4))) .Select(layoutSystemBase => LayoutSystems.IndexOf(layoutSystemBase)).FirstOrDefault(); layoutSystemBase_0 = LayoutSystems[index]; layoutSystemBase_1 = layoutSystemBase_0; for (var i = index + 1; i < LayoutSystems.Count; i++) { if (!(LayoutSystems[i] is ControlLayoutSystem) || !((ControlLayoutSystem)LayoutSystems[i]).Collapsed) { layoutSystemBase_1 = LayoutSystems[i]; return; } } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!this.Capture) { goto label_21; } else { goto label_23; } label_20: this.x754f1c6f433be75d.OnMouseMove(new System.Drawing.Point(e.X, e.Y)); return; label_21: LayoutSystemBase layoutSystemAt = this.GetLayoutSystemAt(new System.Drawing.Point(e.X, e.Y)); label_17: if (layoutSystemAt != null) { goto label_18; } else { goto label_22; } label_15: layoutSystemAt.OnMouseMove(e); this.x3df31cf55a47bc37 = layoutSystemAt; return; label_18: if (this.x3df31cf55a47bc37 != null && this.x3df31cf55a47bc37 != layoutSystemAt) { this.x3df31cf55a47bc37.OnMouseLeave(); goto label_15; } else { goto label_15; } label_22: if (true) { goto label_8; } else { goto label_7; } label_1: if (!this.x59f159fe47159543.Contains(e.X, e.Y)) { Cursor.Current = Cursors.Default; return; } label_3: if (!this.x61c108cc44ef385a) { goto label_5; } label_4: Cursor.Current = Cursors.VSplit; return; label_5: Cursor.Current = Cursors.HSplit; if (true) { if (true) { return; } goto label_1; } else { goto label_4; } label_7: if (true) { goto label_1; } else { goto label_3; } label_8: if (true) { while (this.x3df31cf55a47bc37 != null) { if (true) { this.x3df31cf55a47bc37.OnMouseLeave(); goto label_12; } else if (false) { goto label_17; } } goto label_1; } label_12: this.x3df31cf55a47bc37 = (LayoutSystemBase)null; if (true) { if (false) { if (true) { goto label_20; } else { goto label_15; } } else { goto label_7; } } label_23: if (this.x3df31cf55a47bc37 == null) { if (this.x754f1c6f433be75d != null) { goto label_20; } } else { this.x3df31cf55a47bc37.OnMouseMove(e); } }
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); }
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); }
private void method_7(LayoutSystemBase layoutSystemBase_1) { layoutSystems.Add(layoutSystemBase_1); if (layoutSystemBase_1 is SplitLayoutSystem) { foreach (LayoutSystemBase layoutSystemBase_2 in ((SplitLayoutSystem)layoutSystemBase_1).LayoutSystems) { method_7(layoutSystemBase_2); } } }
internal void method_10(LayoutSystemBase layoutSystem, Rectangle bounds) { if (!IsHandleCreated) return; using (var graphics = CreateGraphics()) { Renderer.StartRenderSession(HotkeyPrefix.None); layoutSystem.Layout(Renderer, graphics, bounds, layoutSystem == _splitLayout && IsFloating); Renderer.FinishRenderSession(); } }
private void MenuItem_Activate(object sender, EventArgs e) { try { if (this.InvokeRequired) { this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { sender, e }); } else { // Get Schema and ActiveModel SchemaModel schemaModel = null; EsriModel activeModel = null; DockControl[] dockControls = this.sandDockManager1.GetDockControls(DockSituation.Document); TabbedDocument activeTab = null; if (dockControls.Length > 0) { foreach (TabbedDocument tab2 in dockControls) { if (tab2 is ITabModel) { ITabModel tabModel = (ITabModel)tab2; if (tabModel.Model.GetType() == typeof(SchemaModel)) { schemaModel = (SchemaModel)tabModel.Model; break; } } } activeTab = this.sandDockManager1.ActiveTabbedDocument as TabbedDocument; if (activeTab is ITabModel) { ITabModel tabModel = (ITabModel)activeTab; activeModel = tabModel.Model; } } // // File Menu // if (sender == this.menuButtonItemNew) { // Prompt to close the schema model (if available) if (schemaModel != null) { if (schemaModel.Dirty) { DialogResult dialogResult = MessageBox.Show( Resources.TEXT_SAVE_DOCUMENT_BEFORE_CLOSING, Resources.TEXT_ARCDIAGRAMMER, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3); switch (dialogResult) { case DialogResult.Yes: this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSaveAs, EventArgs.Empty }); break; case DialogResult.No: break; case DialogResult.Cancel: default: return; } } } // Close all tabs foreach (TabbedDocument tab in dockControls) { if (tab is ITabModel) { ITabModel tabModel = (ITabModel)tab; EsriModel model = tabModel.Model; model.SuspendLayout(); } tab.Close(); } // Clear Catalog this.catalog1.Suspend(); this.catalog1.SchemaModel = null; this.catalog1.Resume(); this.catalog1.RefreshCatalog(); // Clear Property Grid this.propertyEditor1.PropertyGrid.SelectedObjects = null; // Clear Overview this.esriOverview1.Suspend(); this.esriOverview1.Diagram = null; this.esriOverview1.Resume(); this.esriOverview1.Refresh(); // Clear Error List this.errorList1.Clear(); // Clear Schema Model in Diagrammer Environment Singleton DiagrammerEnvironment diagrammerEnvironment = DiagrammerEnvironment.Default; diagrammerEnvironment.SchemaModel = null; // Create new schema tab string filename = null; this.CreateTabbedDocument(filename); } else if (sender == this.menuButtonItemOpen) { // Prompt to close the schema model (if available) if (schemaModel != null) { if (schemaModel.Dirty) { DialogResult dialogResult = MessageBox.Show( Resources.TEXT_SAVE_DOCUMENT_BEFORE_OPENING, Resources.TEXT_ARCDIAGRAMMER, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3); switch (dialogResult) { case DialogResult.Yes: this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSaveAs, EventArgs.Empty }); break; case DialogResult.No: break; case DialogResult.Cancel: default: return; } } } // Close all tabs foreach (TabbedDocument tab in dockControls) { if (tab is ITabModel) { ITabModel tabModel = (ITabModel)tab; EsriModel model = tabModel.Model; model.SuspendLayout(); } tab.Close(); } // Clear Catalog this.catalog1.Suspend(); this.catalog1.SchemaModel = null; this.catalog1.Resume(); this.catalog1.RefreshCatalog(); // Clear Property Grid this.propertyEditor1.PropertyGrid.SelectedObjects = null; // Clear Overview this.esriOverview1.Suspend(); this.esriOverview1.Diagram = null; this.esriOverview1.Resume(); this.esriOverview1.Refresh(); // Clear Error List this.errorList1.Clear(); // Clear Schema Model in Diagrammer Environment Singleton DiagrammerEnvironment diagrammerEnvironment = DiagrammerEnvironment.Default; diagrammerEnvironment.SchemaModel = null; // Display OpenFileDialog OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.CheckFileExists = true; openFileDialog.Filter = Resources.TEXT_ALL_DIAGRAMMER_DOCUMENTS + " (*.xml; *.diagram)|*.xml;*.diagram|" + Resources.TEXT_XML_WORKSPACE_DOCUMENT + " (*.xml)|*.xml|" + Resources.TEXT_ARCGIS_DIAGRAMMER_DOCUMENT + " (*.diagram)|*.diagram"; openFileDialog.FilterIndex = 1; openFileDialog.Multiselect = false; openFileDialog.ShowHelp = true; openFileDialog.Title = Resources.TEXT_OPEN_XML_WORKSPACE_DOCUMENT; // Display Open File Dialog if (openFileDialog.ShowDialog(this) != DialogResult.OK) { return; } // Get Filename string filename = openFileDialog.FileName; if (string.IsNullOrEmpty(filename)) { return; } // Open File this.CreateTabbedDocument(filename); } else if (sender == this.menuButtonItemClose) { // Prompt to close the schema model (if available) if (schemaModel != null) { if (schemaModel.Dirty) { DialogResult dialogResult = MessageBox.Show( Resources.TEXT_SAVE_DOCUMENT_BEFORE_CLOSING, Resources.TEXT_ARCDIAGRAMMER, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3); switch (dialogResult) { case DialogResult.Yes: //this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSaveAs, EventArgs.Empty }); this.MenuItem_Activate(this.menuButtonItemSaveAs, EventArgs.Empty); break; case DialogResult.No: break; case DialogResult.Cancel: default: return; } } } // Close all tabs foreach (TabbedDocument tab in dockControls) { if (tab is ITabModel) { ITabModel tabModel = (ITabModel)tab; EsriModel model = tabModel.Model; model.SuspendLayout(); } tab.Close(); } // Clear Catalog this.catalog1.Suspend(); this.catalog1.SchemaModel = null; this.catalog1.Resume(); this.catalog1.RefreshCatalog(); // Clear Property Grid this.propertyEditor1.PropertyGrid.SelectedObjects = null; // Clear Overview this.esriOverview1.Suspend(); this.esriOverview1.Diagram = null; this.esriOverview1.Resume(); this.esriOverview1.Refresh(); // Clear Error List this.errorList1.Clear(); // Clear Schema Model in Diagrammer Environment Singleton DiagrammerEnvironment diagrammerEnvironment = DiagrammerEnvironment.Default; diagrammerEnvironment.SchemaModel = null; } else if (sender == this.menuButtonItemSave) { // Exit if no model if (schemaModel == null) { return; } // If not path then SaveAs if (string.IsNullOrEmpty(schemaModel.Document)) { this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSaveAs, EventArgs.Empty }); } else { // Get Directory string directory = Path.GetDirectoryName(schemaModel.Document); // If Directory is in if (string.IsNullOrEmpty(directory) || !Directory.Exists(directory)) { this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSaveAs, EventArgs.Empty }); } else { // Save Model schemaModel.Save(schemaModel.Document, SaveFormat.Binary); schemaModel.Dirty = false; } } // Refresh PropertyGrid this.propertyEditor1.PropertyGrid.Refresh(); } else if (sender == this.menuButtonItemSaveAs) { // Exit if no model if (schemaModel == null) { return; } // Show SaveAs Dialog SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.DefaultExt = "diagram"; saveFileDialog.FileName = schemaModel.Title; saveFileDialog.Filter = Resources.TEXT_ARCGIS_DIAGRAMMER_DOCUMENT + " (*.diagram)|*.diagram"; // + saveFileDialog.FilterIndex = 1; saveFileDialog.OverwritePrompt = true; saveFileDialog.RestoreDirectory = false; saveFileDialog.ShowHelp = true; saveFileDialog.Title = Resources.TEXT_SAVE_DIAGRAM; // Check if user pressed "Save" and File is OK. if (saveFileDialog.ShowDialog(this) != DialogResult.OK) { return; } if (string.IsNullOrEmpty(saveFileDialog.FileName)) { return; } // Save to binary file schemaModel.Save(saveFileDialog.FileName, SaveFormat.Binary); schemaModel.Document = saveFileDialog.FileName; schemaModel.Dirty = false; // Refresh PropertyGrid this.propertyEditor1.PropertyGrid.Refresh(); } else if (sender == this.menuButtonItemPublish) { // Exit if no model if (schemaModel == null) { return; } // Show SaveAs Dialog SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.DefaultExt = "xml"; saveFileDialog.FileName = schemaModel.Title; saveFileDialog.Filter = Resources.TEXT_XML_WORKSPACE_DOCUMENT + " (*.xml)|*.xml"; saveFileDialog.FilterIndex = 1; saveFileDialog.OverwritePrompt = true; saveFileDialog.RestoreDirectory = false; saveFileDialog.ShowHelp = true; saveFileDialog.Title = Resources.TEXT_SAVE_DIAGRAM_AS_XML_WORKSPACE_DOCUMENT; // Check if user pressed "Save" and File is OK. if (saveFileDialog.ShowDialog(this) != DialogResult.OK) { return; } if (string.IsNullOrEmpty(saveFileDialog.FileName)) { return; } // Save Model to an Xml Workspace Document schemaModel.PublishModel(saveFileDialog.FileName); } else if (sender == this.menuButtonItemExport) { if (activeTab is ITabModel) { // Exit if not Active Model if (activeModel == null) { return; } // Show SaveAs Dialog SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.DefaultExt = "bmp"; saveFileDialog.FileName = activeTab.Text; saveFileDialog.Filter = "Windows Bitmap" + " (*.bmp)|*.bmp|" + "Windows Metafile" + " (*.wmf)|*.wmf|" + "GIF" + " (*.gif)|*.gif|" + "JPEG" + " (*.jpg;*.jpeg)|*.jpg;*.jpeg|" + "Portable Graphics" + " (*.png)|*.png|" + "Scalar Vector Graphic" + " (*.svg)|*.svg"; saveFileDialog.FilterIndex = 1; saveFileDialog.OverwritePrompt = true; saveFileDialog.RestoreDirectory = false; saveFileDialog.ShowHelp = true; saveFileDialog.Title = Resources.TEXT_EXPORT_DIAGRAM; // Check if user pressed "Save" and File is OK. if (saveFileDialog.ShowDialog(this) != DialogResult.OK) { return; } if (string.IsNullOrEmpty(saveFileDialog.FileName)) { return; } // switch (saveFileDialog.FilterIndex) { case 1: activeModel.ExportModel(saveFileDialog.FileName, SaveFormat.Bmp); break; case 2: activeModel.ExportModel(saveFileDialog.FileName, SaveFormat.Metafile); break; case 3: activeModel.ExportModel(saveFileDialog.FileName, SaveFormat.Gif); break; case 4: activeModel.ExportModel(saveFileDialog.FileName, SaveFormat.Jpeg); break; case 5: activeModel.ExportModel(saveFileDialog.FileName, SaveFormat.Png); break; case 6: activeModel.ExportModel(saveFileDialog.FileName, SaveFormat.Svg); break; default: break; } } else if (activeTab is ITabPrinter) { ITabPrinter tabPrinter = (ITabPrinter)activeTab; tabPrinter.SaveAs(); } } else if (sender == this.menuButtonItemPrintSetup) { if (activeTab is ITabModel) { // Display Diagrammer Printer Setup Window Office2007Renderer renderer = (Office2007Renderer)this.sandBarManager1.Renderer; FormPrinterSetup form = new FormPrinterSetup(); form.BackColor = renderer.BackgroundGradientColor1; form.Font = this.Font; form.ShowDialog(this); } else if (activeTab is ITabPrinter) { ITabPrinter tabPrinter = (ITabPrinter)activeTab; tabPrinter.PageSetup(); } } else if (sender == this.menuButtonItemPrint) { if (activeTab is ITabModel) { // Exit if not Active Model if (activeModel == null) { return; } // Get Print Document Crainiate.ERM4.Printing.PrintDocument printDocument = new Crainiate.ERM4.Printing.PrintDocument(activeModel); // DiagramPrinterSettings printer = DiagramPrinterSettings.Default; // Set Printer Properties if (printer.PrinterName != string.Empty) { printDocument.PrinterSettings.PrinterName = printer.PrinterName; } if (printer.PrinterPaperSize != string.Empty) { foreach (PaperSize paperSize in printDocument.PrinterSettings.PaperSizes) { if (paperSize.PaperName == printer.PrinterPaperSize) { printDocument.DefaultPageSettings.PaperSize = paperSize; break; } } } printDocument.DefaultPageSettings.Landscape = printer.Landscape; printDocument.DefaultPageSettings.Margins = printer.Margins; // Assign Print Document to Print Dialog this.printDialog1.Document = printDocument; DialogResult dialogResult = this.printDialog1.ShowDialog(this); // If the result is OK then print the document. switch (dialogResult) { case DialogResult.OK: printDocument.Print(); break; case DialogResult.Cancel: default: break; } } else if (activeTab is ITabPrinter) { ITabPrinter tabPrinter = (ITabPrinter)activeTab; tabPrinter.Print(); } } else if (sender == this.menuButtonItemPrintPreview) { if (activeTab is ITabModel) { // Exit if not Active Model if (activeModel == null) { return; } // Preview Printing Crainiate.ERM4.Printing.PrintDocument printDocument = new Crainiate.ERM4.Printing.PrintDocument(activeModel); // DiagramPrinterSettings printer = DiagramPrinterSettings.Default; if (printer.PrinterName != string.Empty) { printDocument.PrinterSettings.PrinterName = printer.PrinterName; } if (printer.PrinterPaperSize != string.Empty) { foreach (PaperSize paperSize in printDocument.PrinterSettings.PaperSizes) { if (paperSize.PaperName == printer.PrinterPaperSize) { printDocument.DefaultPageSettings.PaperSize = paperSize; break; } } } printDocument.DefaultPageSettings.Landscape = printer.Landscape; printDocument.DefaultPageSettings.Margins = printer.Margins; // Assign Print Document to Print Dialog this.printPreviewDialog1.Font = new Font("Tahoma", 8); this.printPreviewDialog1.Icon = Resources.DIAGRAMMER; this.printPreviewDialog1.Document = printDocument; DialogResult dialogResult = this.printPreviewDialog1.ShowDialog(this); } else if (activeTab is ITabPrinter) { ITabPrinter tabPrinter = (ITabPrinter)activeTab; tabPrinter.PrintPreview(); } } else if (sender == this.menuButtonItemExit) { this.Close(); } // // Edit Menu // else if (sender == this.menuButtonItemUndo) { if (this.propertyEditor1.PropertyGrid.RectangleToScreen(this.propertyEditor1.PropertyGrid.ClientRectangle).Contains(Cursor.Position)) { SendMessage(this.propertyEditor1.PropertyGrid.Handle, WM_UNDO, IntPtr.Zero, IntPtr.Zero); } else { // Exit if no model if (activeModel == null || !activeModel.CanUndo) { return; } // Select All Elements activeModel.DoCommand("undo"); // Fire Model SelectionChanged Event activeModel.Invoke(new EventHandler(this.Model_SelectedChanged), new object[] { activeModel, EventArgs.Empty }); } } else if (sender == this.menuButtonItemRedo) { if (this.propertyEditor1.PropertyGrid.RectangleToScreen(this.propertyEditor1.PropertyGrid.ClientRectangle).Contains(Cursor.Position)) { SendMessage(this.propertyEditor1.PropertyGrid.Handle, WM_UNDO, IntPtr.Zero, IntPtr.Zero); } else { // Exit if no model if (activeModel == null || !activeModel.CanRedo) { return; } // Select All Elements activeModel.DoCommand("redo"); // Fire Model SelectionChanged Event activeModel.Invoke(new EventHandler(this.Model_SelectedChanged), new object[] { activeModel, EventArgs.Empty }); } } else if (sender == this.menuButtonItemCut) { if (this.propertyEditor1.PropertyGrid.RectangleToScreen(this.propertyEditor1.PropertyGrid.ClientRectangle).Contains(Cursor.Position)) { SendMessage(this.propertyEditor1.PropertyGrid.Handle, WM_CUT, IntPtr.Zero, IntPtr.Zero); } else { // Exit if no model if (activeModel == null || !activeModel.CanCut) { return; } // Select All Elements activeModel.DoCommand("cut"); // Fire Model SelectionChanged Event activeModel.Invoke(new EventHandler(this.Model_SelectedChanged), new object[] { activeModel, EventArgs.Empty }); } } else if (sender == this.menuButtonItemCopy) { if (this.propertyEditor1.PropertyGrid.RectangleToScreen(this.propertyEditor1.PropertyGrid.ClientRectangle).Contains(Cursor.Position)) { FormDiagrammer.SendMessage(this.propertyEditor1.PropertyGrid.Handle, FormDiagrammer.WM_COPY, IntPtr.Zero, IntPtr.Zero); } else { // Exit if no model if (activeModel == null || !activeModel.CanCopy) { return; } // Select All Elements activeModel.DoCommand("copy"); } } else if (sender == this.menuButtonItemPaste) { if (this.propertyEditor1.PropertyGrid.RectangleToScreen(this.propertyEditor1.PropertyGrid.ClientRectangle).Contains(Cursor.Position)) { SendMessage(this.propertyEditor1.PropertyGrid.Handle, WM_PASTE, IntPtr.Zero, IntPtr.Zero); } else { // Select All Elements activeModel.DoCommand("paste"); // Fire Model SelectionChanged Event activeModel.Invoke(new EventHandler(this.Model_SelectedChanged), new object[] { activeModel, EventArgs.Empty }); } } else if (sender == this.menuButtonItemDelete) { if (this.propertyEditor1.PropertyGrid.RectangleToScreen(this.propertyEditor1.PropertyGrid.ClientRectangle).Contains(Cursor.Position)) { SendMessage(this.propertyEditor1.PropertyGrid.Handle, WM_CLEAR, IntPtr.Zero, IntPtr.Zero); } else { // Exit if no model if (activeModel == null || !activeModel.CanDelete) { return; } // Select All Elements activeModel.DoCommand("delete"); // Fire Model SelectionChanged Event activeModel.Invoke(new EventHandler(this.Model_SelectedChanged), new object[] { activeModel, EventArgs.Empty }); } } else if (sender == this.menuButtonItemSelectAll) { // Exit if no model if (activeModel == null || !activeModel.CanSelectAll) { return; } // Select All Elements activeModel.SelectElements(true); } // // View Menu // else if (sender == this.menuButtonItemOverviewWindow) { if (this.dockableWindowOverview.IsOpen) { this.dockableWindowOverview.Close(); } else { if (this.dockableWindowOverview.DockSituation != DockSituation.Docked) { this.dockableWindowOverview.Open(); } } } else if (sender == this.menuButtonItemCatalogWindow) { if (this.dockableWindowCatalog.IsOpen) { this.dockableWindowCatalog.Close(); } else { if (this.dockableWindowCatalog.DockSituation != DockSituation.Docked) { this.dockableWindowCatalog.Open(); } } } else if (sender == this.menuButtonItemPaletteWindow) { if (this.dockableWindowPalette.IsOpen) { this.dockableWindowPalette.Close(); } else { if (this.dockableWindowPalette.DockSituation != DockSituation.Docked) { this.dockableWindowPalette.Open(); } } } else if (sender == this.menuButtonItemPropertiesWindow) { if (this.dockableWindowProperties.IsOpen) { this.dockableWindowProperties.Close(); } else { if (this.dockableWindowProperties.DockSituation != DockSituation.Docked) { this.dockableWindowProperties.Open(); } } } else if (sender == this.menuButtonItemErrorList) { if (this.dockableWindowErrorList.IsOpen) { this.dockableWindowErrorList.Close(); } else { if (this.dockableWindowErrorList.DockSituation != DockSituation.Docked) { this.dockableWindowErrorList.Open(); } } } else if (sender == this.menuButtonItemExceptions) { ExceptionDialog.Default.Show(this); } else if (sender == this.menuButtonItemStatusBar) { this.statusBar1.Visible = !(this.statusBar1.Visible); } // // View > Color Scheme Menu // else if (sender == this.menuButtonItemColorSchemeBlack) { ColorSchemeSettings.Default.ColorScheme = Office2007ColorScheme.Black; ColorSchemeSettings.Default.Save(); } else if (sender == this.menuButtonItemColorSchemeBlue) { ColorSchemeSettings.Default.ColorScheme = Office2007ColorScheme.Blue; ColorSchemeSettings.Default.Save(); } else if (sender == this.menuButtonItemColorSchemeSilver) { ColorSchemeSettings.Default.ColorScheme = Office2007ColorScheme.Silver; ColorSchemeSettings.Default.Save(); } // // View > Layout Menu // else if (sender == this.menuButtonItemCircular) { // Exit if no model if (activeModel == null) { return; } // activeModel.ExecuteLayout(typeof(CircularLayout), false); // Recalculate scale of Overview Window this.esriOverview1.ZoomFullExtent(); } else if (sender == this.menuButtonItemForcedDirect) { // Exit if no model if (activeModel == null) { return; } // activeModel.ExecuteLayout(typeof(ForceDirectedLayout), false); // Recalculate scale of Overview Window this.esriOverview1.ZoomFullExtent(); } else if (sender == this.menuButtonItemHierachical) { // Exit if no model if (activeModel == null) { return; } // activeModel.ExecuteLayout(typeof(HierarchicalLayout), false); // Recalculate scale of Overview Window this.esriOverview1.ZoomFullExtent(); } else if (sender == this.menuButtonItemOrthogonal) { // Exit if no model if (activeModel == null) { return; } // activeModel.ExecuteLayout(typeof(OrthogonalLayout), false); // Recalculate scale of Overview Window this.esriOverview1.ZoomFullExtent(); } else if (sender == this.menuButtonItemTree) { // Exit if no model if (activeModel == null) { return; } // activeModel.ExecuteLayout(typeof(TreeLayout), false); // Recalculate scale of Overview Window this.esriOverview1.ZoomFullExtent(); } else if (sender == this.menuButtonItemAlignLeft) { // Exit if no model if (activeModel == null) { return; } // Get Elements Elements elements = activeModel.SelectedShapes(); if (elements.Count < 2) { return; } // Get Min Left float left = float.NaN; foreach (Shape shape in elements.Values) { if (float.IsNaN(left)) { left = shape.Location.X; continue; } left = Math.Min(left, shape.Location.X); } if (float.IsNaN(left)) { return; } // Move Elements foreach (Shape shape in elements.Values) { float leftTest = shape.Location.X; if (leftTest == left) { continue; } shape.Move(left - leftTest, 0f); } } else if (sender == this.menuButtonItemAlignCenter) { // Exit if no model if (activeModel == null) { return; } // Get Elements Elements elements = activeModel.SelectedShapes(); if (elements.Count < 2) { return; } // Get Max Right float center = float.NaN; foreach (Shape shape in elements.Values) { if (float.IsNaN(center)) { center = shape.Location.X + (shape.Width / 2); break; } } if (float.IsNaN(center)) { return; } // Move Elements foreach (Shape shape in elements.Values) { float centerTest = shape.Location.X + (shape.Width / 2); if (centerTest == center) { continue; } shape.Move(center - centerTest, 0f); } } else if (sender == this.menuButtonItemAlignRight) { // Exit if no model if (activeModel == null) { return; } // Get Elements Elements elements = activeModel.SelectedShapes(); if (elements.Count < 2) { return; } // Get Max Right float right = float.NaN; foreach (Shape shape in elements.Values) { if (float.IsNaN(right)) { right = shape.Location.X + shape.Width; continue; } right = Math.Max(right, shape.Location.X + shape.Width); } if (float.IsNaN(right)) { return; } // Move Elements foreach (Shape shape in elements.Values) { float rightTest = shape.Location.X + shape.Width; if (rightTest == right) { continue; } shape.Move(right - rightTest, 0f); } } else if (sender == this.menuButtonItemAlignTop) { // Exit if no model if (activeModel == null) { return; } // Get Elements Elements elements = activeModel.SelectedShapes(); if (elements.Count < 2) { return; } // Get Max Right float top = float.NaN; foreach (Shape shape in elements.Values) { if (float.IsNaN(top)) { top = shape.Location.Y; continue; } top = Math.Min(top, shape.Location.Y); } if (float.IsNaN(top)) { return; } // Move Elements foreach (Shape shape in elements.Values) { float topTest = shape.Location.Y; if (topTest == top) { continue; } shape.Move(0f, top - topTest); } } else if (sender == this.menuButtonItemAlignMiddle) { // Exit if no model if (activeModel == null) { return; } // Get Elements Elements elements = activeModel.SelectedShapes(); if (elements.Count < 2) { return; } // Get Max Right float middle = float.NaN; foreach (Shape shape in elements.Values) { if (float.IsNaN(middle)) { middle = shape.Location.Y + (shape.Height / 2); break; } } if (float.IsNaN(middle)) { return; } // Move Elements foreach (Shape shape in elements.Values) { float middleTest = shape.Location.Y + (shape.Height / 2); if (middleTest == middle) { continue; } shape.Move(0f, middle - middleTest); } } else if (sender == this.menuButtonItemAlignBottom) { // Exit if no model if (activeModel == null) { return; } // Get Elements Elements elements = activeModel.SelectedShapes(); if (elements.Count < 2) { return; } // Get Max Right float bottom = float.NaN; foreach (Shape shape in elements.Values) { if (float.IsNaN(bottom)) { bottom = shape.Location.Y + shape.Height; continue; } bottom = Math.Max(bottom, shape.Location.Y + shape.Height); } if (float.IsNaN(bottom)) { return; } // Move Elements foreach (Shape shape in elements.Values) { float bottomTest = shape.Location.Y + shape.Height; if (bottomTest == bottom) { continue; } shape.Move(0f, bottom - bottomTest); } } // // View > Toolbars Menu // else if (sender == this.menuButtonItemStandardToolbar) { this.toolBarStandard.Visible = !(this.toolBarStandard.Visible); } else if (sender == this.menuButtonItemLayoutToolbar) { this.toolBarLayout.Visible = !(this.toolBarLayout.Visible); } else if (sender == this.menuButtonItemInteractiveModeToolbar) { this.toolBarInteractiveMode.Visible = !(this.toolBarInteractiveMode.Visible); } // // View > Zoom Menu // else if (sender == this.menuButtonItemZoom300) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomModel(300f); } else if (sender == this.menuButtonItemZoom200) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomModel(200f); } else if (sender == this.menuButtonItemZoom100) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomModel(100f); } else if (sender == this.menuButtonItemZoom75) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomModel(75f); } else if (sender == this.menuButtonItemZoom50) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomModel(50f); } else if (sender == this.menuButtonItemZoom25) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomModel(25f); } else if (sender == this.menuButtonItemZoomFull) { // Exit if no model if (activeModel == null) { return; } activeModel.ZoomFullExtent(); } // // Tools Menu // else if (sender == this.menuButtonItemNormalMode) { // Set Interactive Mode to Normal if (activeModel == null) { return; } activeModel.Runtime.InteractiveMode = InteractiveMode.Normal; } else if (sender == this.menuButtonItemLinkMode) { // Set Interactive Mode to Link if (activeModel == null) { return; } activeModel.Runtime.InteractiveMode = InteractiveMode.AddLine; } else if (sender == this.menuButtonItemSchemaReport) { // Add Schema Report Tabbed Documenet this.CreateTabbedDocument(typeof(SchemaReport)); } else if (sender == this.menuButtonItemDataReport) { // Add Data Report Tabbed Document this.CreateTabbedDocument(typeof(DataReport)); } else if (sender == this.menuButtonItemXmlReport) { // Add Data Report Tabbed Document this.CreateTabbedDocument(typeof(XmlReport)); } else if (sender == this.menuButtonItemValidate) { // Exit if no model if (schemaModel == null) { return; } // Valid Schema Model this.errorList1.Validate2(); } else if (sender == this.menuButtonItemOptions) { // Dispaly Options Window Office2007Renderer r = (Office2007Renderer)this.sandBarManager1.Renderer; FormOptions options = new FormOptions(); options.BackColor = r.BackgroundGradientColor1; options.Font = this.Font; options.ShowDialog(this); } // // Window Menu // else if (sender == this.menuButtonItemNewHorizontalTabGroup || sender == this.menuButtonItemNewVerticalTabGroup) { SplitLayoutSystem splitLayoutSystem = new SplitLayoutSystem(); if (sender == this.menuButtonItemNewHorizontalTabGroup) { splitLayoutSystem.SplitMode = Orientation.Horizontal; } else if (sender == this.menuButtonItemNewVerticalTabGroup) { splitLayoutSystem.SplitMode = Orientation.Vertical; } LayoutSystemBase[] layoutSystemBase = new LayoutSystemBase[this.sandDockManager1.GetDockControls(DockSituation.Document).Length]; foreach (DockControl dockControl in this.sandDockManager1.GetDockControls(DockSituation.Document)) { DocumentLayoutSystem documentLayoutSystem = new DocumentLayoutSystem(); documentLayoutSystem.Controls.Add(dockControl); splitLayoutSystem.LayoutSystems.Add(documentLayoutSystem); } this.sandDockManager1.DocumentContainer.LayoutSystem = splitLayoutSystem; } else if (sender == this.menuButtonItemRestoreTabGroup) { SplitLayoutSystem splitLayoutSystem = new SplitLayoutSystem(); splitLayoutSystem.SplitMode = Orientation.Horizontal; LayoutSystemBase[] layoutSystemBase = new LayoutSystemBase[1]; DocumentLayoutSystem documentLayoutSystem = new DocumentLayoutSystem(); foreach (DockControl dockControl in this.sandDockManager1.GetDockControls(DockSituation.Document)) { documentLayoutSystem.Controls.Add(dockControl); } splitLayoutSystem.LayoutSystems.Add(documentLayoutSystem); this.sandDockManager1.DocumentContainer.LayoutSystem = splitLayoutSystem; } else if (sender == this.menuButtonItemCloseAllDocuments) { // if (schemaModel != null) { DialogResult dialogResult = MessageBox.Show( Resources.TEXT_SAVE_DOCUMENT_BEFORE_CLOSING, Resources.TEXT_ARCDIAGRAMMER, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3); switch (dialogResult) { case DialogResult.Yes: this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSaveAs, EventArgs.Empty }); break; case DialogResult.No: break; case DialogResult.Cancel: default: return; } } // foreach (TabbedDocument tabbedDocument in this.sandDockManager1.GetDockControls(DockSituation.Document)) { tabbedDocument.Close(); } // Clear Catalog this.catalog1.Suspend(); this.catalog1.SchemaModel = null; this.catalog1.Resume(); this.catalog1.RefreshCatalog(); // Clear Property Grid this.propertyEditor1.PropertyGrid.SelectedObjects = null; // Clear Overview this.esriOverview1.Suspend(); this.esriOverview1.Diagram = null; this.esriOverview1.Resume(); this.esriOverview1.Refresh(); // Clear Error List this.errorList1.Clear(); // Clear Schema Model in Diagrammer Environment Singleton DiagrammerEnvironment diagrammerEnvironment = DiagrammerEnvironment.Default; diagrammerEnvironment.SchemaModel = null; } else if (sender == this.menuButtonItemWindows) { // Display Window Manager Office2007Renderer r = (Office2007Renderer)this.sandBarManager1.Renderer; FormWindows form = new FormWindows(this.sandDockManager1); form.BackColor = r.BackgroundGradientColor1; form.Font = this.Font; form.ShowDialog(this); } // // Help Menu // else if (sender == this.menuButtonItemUserGuide) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_USERGUIDE; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemCreateSchemaReport) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_CREATE_SCHEMA_REPORT; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemCreateDataReport) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_CREATE_DATA_REPORT; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemReorderFields) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_REORDER_FIELDS; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemAddSubtype) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_ADDSUBTYPE; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemCreateOneToManyRelationship) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_ADDRELATIONSHIP; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemSendFeedback) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_FEEDBACK; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemDiscussionForum) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_DISCUSSION; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemHistory) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_HISTORY; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemEsriHome) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_ESRI_HOME; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemEsriSupportCenter) { Process process = new Process(); process.StartInfo.FileName = Resources.TEXT_URL_ARCGIS_IDEAS; process.StartInfo.Verb = "Open"; process.StartInfo.CreateNoWindow = false; process.Start(); } else if (sender == this.menuButtonItemAbout) { // Display About Dialog Office2007Renderer r = (Office2007Renderer)this.sandBarManager1.Renderer; FormAbout about = new FormAbout(); about.BackColor = r.BackgroundGradientColor1; about.Font = this.Font; about.ShowDialog(this); } else if (sender is ZoomMenuItem) { if (activeModel == null) { return; } ZoomMenuItem item = (ZoomMenuItem)sender; if (item.Zoom == -1) { activeModel.ZoomFullExtent(); } else { activeModel.ZoomModel(item.Zoom); } } } } catch (Exception ex) { ExceptionDialog.HandleException(ex); } }
internal void xa2414c47d888068e(object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc) { IEnumerator enumerator = this.x83627743ea4ce5a2.GetEnumerator(); try { while (enumerator.MoveNext()) { LayoutSystemBase current = (LayoutSystemBase)enumerator.Current; if (current is ControlLayoutSystem) { if (((ControlLayoutSystem)current).x61ce2417e4ef76f9()) { break; } } } } finally { IDisposable disposable = enumerator as IDisposable; if (true) { goto label_9; } label_7: if (false) { goto label_12; } else { goto label_14; } label_9: while (false) { if (true) { goto label_11; } } goto label_12; label_11: disposable.Dispose(); goto label_7; label_12: if (disposable == null) { if (false) { goto label_7; } } else { goto label_11; } label_14 :; } }
private void OnSplittingManagerFinished(LayoutSystemBase aboveLayout, LayoutSystemBase belowLayout, float aboveSize, float belowSize) { method_10(); if (aboveSize <= 0 || belowSize <= 0) return; var aboveWorkingSize = aboveLayout.WorkingSize; var belowWorkingSize = belowLayout.WorkingSize; if (SplitMode != Orientation.Horizontal) { aboveWorkingSize.Width = aboveSize; belowWorkingSize.Width = belowSize; } else { aboveWorkingSize.Height = aboveSize; belowWorkingSize.Height = belowSize; } aboveLayout.WorkingSize = aboveWorkingSize; belowLayout.WorkingSize = belowWorkingSize; method_8(); }
public SplittingManager(DockContainer container, SplitLayoutSystem splitLayout, LayoutSystemBase aboveLayout, LayoutSystemBase belowLayout, Point startPoint, DockingHints dockingHints) : base(container, dockingHints, false) { this.container = container; SplitLayout = splitLayout; this.aboveLayout = aboveLayout; this.belowLayout = belowLayout; this.startPoint = startPoint; if (splitLayout.SplitMode != Orientation.Horizontal) { int_7 = aboveLayout.Bounds.X + 25; int_8 = belowLayout.Bounds.Right - 25; float_2 = aboveLayout.WorkingSize.Width + belowLayout.WorkingSize.Width; } else { int_7 = aboveLayout.Bounds.Y + 25; int_8 = belowLayout.Bounds.Bottom - 25; float_2 = aboveLayout.WorkingSize.Height + belowLayout.WorkingSize.Height; } OnMouseMove(startPoint); }
private LayoutSystemBase[] method_9(out int int_3) { int_3 = 0; var array = new LayoutSystemBase[LayoutSystems.Count]; foreach (LayoutSystemBase layoutSystemBase in LayoutSystems) { if (!(layoutSystemBase is ControlLayoutSystem)) { if (layoutSystemBase is SplitLayoutSystem) { SplitLayoutSystem splitLayoutSystem = (SplitLayoutSystem)layoutSystemBase; if (splitLayoutSystem.method_13()) { array[int_3++] = layoutSystemBase; } } } else { ControlLayoutSystem controlLayoutSystem = (ControlLayoutSystem)layoutSystemBase; if (!controlLayoutSystem.Collapsed || (IsInContainer && !DockContainer.Boolean_6)) { array[int_3++] = layoutSystemBase; } } } return array; }
public LayoutSystemBase GetLayoutSystemAt(System.Drawing.Point position) { LayoutSystemBase layoutSystemBase = (LayoutSystemBase)null; IEnumerator enumerator = this.x83627743ea4ce5a2.GetEnumerator(); try { label_2: if (enumerator.MoveNext()) { goto label_13; } else { goto label_4; } label_3: if (!(layoutSystemBase is ControlLayoutSystem)) { goto label_7; } else { goto label_17; } label_4: if (false) { goto label_3; } else { goto label_17; } label_6: LayoutSystemBase current; Rectangle bounds; if (bounds.Contains(position)) { if (current is ControlLayoutSystem) { goto label_8; } label_5: layoutSystemBase = current; goto label_3; label_8: if (!((ControlLayoutSystem)current).Collapsed) { if (true) { if (true) { if (false) { goto label_13; } else { goto label_5; } } } else { goto label_5; } } else { goto label_2; } } else { goto label_2; } label_7: if (false) { goto label_6; } else { goto label_2; } label_13: current = (LayoutSystemBase)enumerator.Current; bounds = current.Bounds; goto label_6; } finally { (enumerator as IDisposable)?.Dispose(); } label_17: return(layoutSystemBase); }
public int Add(LayoutSystemBase layoutSystem) { var count = Count; Insert(count, layoutSystem); return count; }
private void method_12(LayoutSystemBase layoutSystem, int index, bool bool_7) { var parent = Parent; parent.LayoutSystems.updating = true; parent.LayoutSystems.Insert(index, layoutSystem); parent.LayoutSystems.updating = false; parent.method_7(); }
public bool Contains(LayoutSystemBase layoutSystem) => List.Contains(layoutSystem);
public void SplitForLayoutSystem(LayoutSystemBase layoutSystem, DockSide side) { if (layoutSystem == null) throw new ArgumentNullException(nameof(layoutSystem)); if (side == DockSide.None) throw new ArgumentException(nameof(side)); if (layoutSystem.Parent != null) throw new InvalidOperationException("This layout system must be removed from its parent before it can be moved to a new layout system."); if (Parent == null) throw new InvalidOperationException("This layout system is not parented yet."); var parent = Parent; if (parent.SplitMode != Orientation.Horizontal) { if (parent.SplitMode == Orientation.Vertical) { if (side == DockSide.Left || side == DockSide.Right) { method_12(layoutSystem, (side == DockSide.Left) ? parent.LayoutSystems.IndexOf(this) : (parent.LayoutSystems.IndexOf(this) + 1), false); return; } method_13(layoutSystem, Orientation.Horizontal, side == DockSide.Top); } return; } if (side != DockSide.Top && side != DockSide.Bottom) { method_13(layoutSystem, Orientation.Vertical, side == DockSide.Left); return; } method_12(layoutSystem, (side == DockSide.Top) ? parent.LayoutSystems.IndexOf(this) : (parent.LayoutSystems.IndexOf(this) + 1), true); }
public int IndexOf(LayoutSystemBase layoutSystem) => List.IndexOf(layoutSystem);
internal void x333d8ec4f70a6d86() { if (!this.x0c2484ccd29b8358) { goto label_2; } else { goto label_33; } label_1: this.CalculateAllMetricsAndLayout(); return; label_2: this.CalculateAllMetricsAndLayout(); if (true) { return; } label_3: int num1; this.Height = num1; if (true) { return; } label_5: if (this.x61c108cc44ef385a) { goto label_1; } label_7: if (this.Height != num1) { if ((num1 & 0) != 0) { goto label_18; } } else { goto label_1; } label_13: bool flag; if ((uint)num1 - (uint)flag <= uint.MaxValue) { goto label_35; } label_14: if (this.x61c108cc44ef385a) { if ((uint)num1 + (uint)num1 <= uint.MaxValue) { while (this.Width == num1) { if (false) { if (true) { goto label_5; } } else if ((uint)num1 - (uint)flag >= 0U) { if ((num1 | 1) == 0 || true) { goto label_5; } else { goto label_7; } } else { goto label_13; } } } this.Width = num1; return; } goto label_5; label_18: if (!flag) { num1 += this.ContentSize + (this.AllowResize ? 4 : 0); goto label_14; } else { goto label_34; } label_33: flag = true; int num2; if ((uint)num2 >= 0U) { IEnumerator enumerator = this.x83627743ea4ce5a2.GetEnumerator(); try { do { if (!enumerator.MoveNext()) { if ((uint)flag <= uint.MaxValue) { break; } } LayoutSystemBase current = (LayoutSystemBase)enumerator.Current; if (current is ControlLayoutSystem) { ControlLayoutSystem controlLayoutSystem = (ControlLayoutSystem)current; if ((uint)num2 + (uint)flag < 0U || !controlLayoutSystem.Collapsed) { flag = false; break; } } }while ((uint)num2 >= 0U); } finally { (enumerator as IDisposable)?.Dispose(); } num1 = 0; goto label_18; } label_34: if (true) { goto label_14; } label_35: if ((uint)num1 - (uint)num1 <= uint.MaxValue) { goto label_3; } }
public SplitLayoutSystem(SizeF workingSize, Orientation splitMode, LayoutSystemBase[] layoutSystems) : this() { WorkingSize = workingSize; _splitMode = splitMode; LayoutSystems.AddRange(layoutSystems); }
private void method_13(LayoutSystemBase layoutSystem, Orientation splitMode, bool prepend) { var parent = Parent; var splitLayout = new SplitLayoutSystem { SplitMode = splitMode, WorkingSize = WorkingSize }; var index = parent.LayoutSystems.IndexOf(this); parent.LayoutSystems.updating = true; parent.LayoutSystems.Remove(this); parent.LayoutSystems.Insert(index, splitLayout); parent.LayoutSystems.updating = false; splitLayout.LayoutSystems.Add(this); if (prepend) splitLayout.LayoutSystems.Insert(0, layoutSystem); else splitLayout.LayoutSystems.Add(layoutSystem); parent.method_7(); }
public SplitLayoutSystem(int desiredWidth, int desiredHeight, Orientation splitMode, LayoutSystemBase[] layoutSystems) : this(desiredWidth, desiredHeight) { _splitMode = splitMode; LayoutSystems.AddRange(layoutSystems); }
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(); }