/// <summary> /// Display the diagram order dialog with the specified diagram order and update /// the diagram order as specified by the user. /// </summary> /// <param name="serviceProvider">A <see cref="IServiceProvider"/> used to parent the dialog</param> /// <param name="docData">The owning <see cref="ModelingDocData"/> of the diagrams being reordered</param> /// <param name="diagrams">A list of <see cref="Diagram"/> elements to reorder</param> /// <param name="selectedDiagram">A <see cref="Diagram"/> to select when the dialog is initially displayed.</param> /// <param name="images">The diagram images to display. Images are keyed off the Guid of the diagram type (format "N")</param> public static void ShowDialog(IServiceProvider serviceProvider, ModelingDocData docData, IList <Diagram> diagrams, Diagram selectedDiagram, ImageList images) { DiagramOrderDialog orderDialog = new DiagramOrderDialog(diagrams, selectedDiagram, images); if (orderDialog.ShowDialog(Utility.GetDialogOwnerWindow(serviceProvider)) == DialogResult.OK) { DiagramDisplay.UpdateDiagramDisplayOrder(docData.Store, orderDialog.myDiagramOrder); } }
/// <summary> /// Reorder the diagram tab pages /// </summary> public void ReorderDiagrams(Diagram selectedDiagram) { MultiDiagramDocViewControl docViewControl; TabControl.TabPageCollection pages; int diagramCount; if (null != (docViewControl = myDocViewControl) && 0 != (diagramCount = (pages = docViewControl.TabPages).Count)) { Diagram[] diagrams = new Diagram[diagramCount]; for (int i = 0; i < diagramCount; ++i) { diagrams[i] = ((DiagramTabPage)pages[i]).Diagram; } DiagramOrderDialog.ShowDialog(ServiceProvider, DocData, diagrams, selectedDiagram, myDocViewControl.ImageList); } }
public DiagramBranch(DiagramOrderDialog parent) { myDiagrams = parent.myDiagramOrder; myImages = parent.myImages; }
/// <summary> /// Display the diagram order dialog with the specified diagram order and update /// the diagram order as specified by the user. /// </summary> /// <param name="serviceProvider">A <see cref="IServiceProvider"/> used to parent the dialog</param> /// <param name="docData">The owning <see cref="ModelingDocData"/> of the diagrams being reordered</param> /// <param name="diagrams">A list of <see cref="Diagram"/> elements to reorder</param> /// <param name="images">The diagram images to display. Images are keyed off the Guid of the diagram type (format "N")</param> public static void ShowDialog(IServiceProvider serviceProvider, ModelingDocData docData, IList<Diagram> diagrams, ImageList images) { DiagramOrderDialog orderDialog = new DiagramOrderDialog(diagrams, images); if (orderDialog.ShowDialog(Utility.GetDialogOwnerWindow(serviceProvider)) == DialogResult.OK) { DiagramDisplay.UpdateDiagramDisplayOrder(docData.Store, orderDialog.myDiagramOrder); } }