Exemple #1
0
 public DockContainer()
 {
     _splitLayout = new SplitLayoutSystem();
     _splitLayout.SetDockContainer(this);
     SetStyle(ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
     SetStyle(ControlStyles.Selectable, false);
     layoutSystems = new ArrayList();
     _toolTips0 = new ToolTips(this) { Boolean_0 = false };
     _toolTips0.Event_0 += method_16;
     BackColor = SystemColors.Control;
 }
Exemple #2
0
		private static int smethod_13(SplitLayoutSystem splitLayoutSystem_0, Orientation splitMode)
		{
			int num = splitLayoutSystem_0.LayoutSystems.OfType<SplitLayoutSystem>().Select(splitLayoutSystem => smethod_13(splitLayoutSystem, splitMode)).Concat(new[] {0}).Max();
		    int num2 = num;
			if (splitLayoutSystem_0.LayoutSystems.Count > 1)
			{
				if (splitLayoutSystem_0.SplitMode == splitMode)
				{
					num2 += splitLayoutSystem_0.LayoutSystems.Count - 1;
				}
			}
			return num2;
		}
Exemple #3
0
			internal LayoutSystemBaseCollection(SplitLayoutSystem parent)
			{
				_parent = parent;
			}
Exemple #4
0
		private void method_4(SplitLayoutSystem splitLayoutSystem_1, ArrayList arrayList_1)
		{
			foreach (LayoutSystemBase layoutSystemBase in splitLayoutSystem_1.LayoutSystems)
			{
				if (!(layoutSystemBase is SplitLayoutSystem))
				{
				    if (layoutSystemBase is ControlLayoutSystem)
				    {
				        IEnumerator enumerator2 = ((ControlLayoutSystem) layoutSystemBase).Controls.GetEnumerator();
				        try
				        {
				            while (enumerator2.MoveNext())
				            {
				                DockControl value = (DockControl) enumerator2.Current;
				                arrayList_1.Add(value);
				            }
				        }
				        finally
				        {
				            IDisposable disposable = enumerator2 as IDisposable;
				            if (disposable != null)
				            {
				                disposable.Dispose();
				            }
				        }
				    }
				    continue;
				}
				method_4((SplitLayoutSystem)layoutSystemBase, arrayList_1);
			}
		}
Exemple #5
0
 public Struct0(SplitLayoutSystem splitLayoutSystem, int index)
 {
     SplitLayout = splitLayoutSystem;
     Index = index;
 }
        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);
            }
        }
Exemple #7
0
		private static bool smethod_9(DockContainer container, SplitLayoutSystem splitLayout)
		{
			IEnumerator enumerator = splitLayout.LayoutSystems.GetEnumerator();
			bool result;
			try
			{
				while (enumerator.MoveNext())
				{
					LayoutSystemBase layoutSystemBase = (LayoutSystemBase)enumerator.Current;
					if (!(layoutSystemBase is SplitLayoutSystem))
					{
						ControlLayoutSystem controlLayoutSystem = (ControlLayoutSystem)layoutSystemBase;
						if (!controlLayoutSystem.Collapsed && container.Controls.Contains(controlLayoutSystem.SelectedControl) && controlLayoutSystem.SelectedControl.Visible)
						{
							if (controlLayoutSystem.SelectedControl.Enabled)
							{
								container.ActiveControl = controlLayoutSystem.SelectedControl;
								result = true;
								return result;
							}
						}
					}
					else if (LayoutUtilities.smethod_9(container, (SplitLayoutSystem)layoutSystemBase))
					{
						result = true;
						return result;
					}
				}
				return false;
			}
			finally
			{
				IDisposable disposable = enumerator as IDisposable;
				if (disposable != null)
				{
					disposable.Dispose();
				}
			}
		}
Exemple #8
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;
 }
Exemple #9
0
 internal void method_2()
 {
     int_1++;
     _splitLayout.SetDockContainer(null);
     foreach (var layoutSystemBase in layoutSystems.OfType<ControlLayoutSystem>())
         layoutSystemBase.Controls.Clear();
     _splitLayout = new SplitLayoutSystem();
 }
Exemple #10
0
 private void method_12(DockContainer dockContainer_1, SplitLayoutSystem splitLayoutSystem_0, ArrayList arrayList_0)
 {
     foreach (LayoutSystemBase layoutSystemBase in splitLayoutSystem_0.LayoutSystems)
     {
         if (!(layoutSystemBase is SplitLayoutSystem))
         {
             if (layoutSystemBase is ControlLayoutSystem)
             {
                 if (SourceControl == null || layoutSystemBase != SourceControlSystem)
                 {
                     goto IL_59;
                 }
                 if (SourceControl.LayoutSystem.Controls.Count != 1)
                 {
                     goto IL_59;
                 }
                 bool arg_67_0 = false;
                 IL_67:
                 if (arg_67_0)
                 {
                     arrayList_0.Add(layoutSystemBase);
                 }
                 continue;
                 IL_59:
                 arg_67_0 = !((ControlLayoutSystem)layoutSystemBase).Collapsed;
                 goto IL_67;
             }
         }
         else
         {
             method_12(dockContainer_1, (SplitLayoutSystem)layoutSystemBase, arrayList_0);
         }
     }
 }
Exemple #11
0
 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 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();
		}