Ejemplo n.º 1
0
        /// <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);
            }
        }
Ejemplo n.º 2
0
        /// <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);
            }
        }
Ejemplo n.º 3
0
			public DiagramBranch(DiagramOrderDialog parent)
			{
				myDiagrams = parent.myDiagramOrder;
				myImages = parent.myImages;
			}
Ejemplo n.º 4
0
		/// <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);
			}
		}
Ejemplo n.º 5
0
 public DiagramBranch(DiagramOrderDialog parent)
 {
     myDiagrams = parent.myDiagramOrder;
     myImages   = parent.myImages;
 }