Ejemplo n.º 1
0
        public void graphDisplay_Enter(object sender, EventArgs e)
        {
            graph1.checkForRepeatNames();
            graph1.updateGraphControl(graphControl1, this.globalLabelsText);
            graph1.updateFromGraphControl(graphControl1);
            switch (Program.settings.defaultLayoutAlgorithm)
            {
            case defaultLayoutAlg.SpringEmbedder:
                Program.main.layoutSpringEmbedderItem_Click(sender, e); break;

            case defaultLayoutAlg.Tree:
                Program.main.layoutTreeItem_Click(sender, e); break;

            case defaultLayoutAlg.Random:
                Program.main.layoutRandomizerItem_Click(sender, e); break;

            case defaultLayoutAlg.Custom1:
                Program.main.customLayout0MenuItem_Click(sender, e); break;

            case defaultLayoutAlg.Custom2:
                Program.main.customLayout1MenuItem_Click(sender, e); break;

            case defaultLayoutAlg.Custom3:
                Program.main.customLayout2MenuItem_Click(sender, e); break;
            }
        }
Ejemplo n.º 2
0
        private void displayProps_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            if (rule != null)
            {
                rule.updateFromGraphControl(graphControl);
            }
            else
            {
                graph.updateFromGraphControl(graphControl);
            }

            /* after you update the nodes, arcs - you may need to re-update the display based
             * on changes there (e.g. new K elements) */
            Props_PropertyValueChanged(s, e);
        }
Ejemplo n.º 3
0
 public void showProperties(Netron.GraphLib.UI.GraphControl GC, designGraph graph1, object[] props)
 {
     graphControl = GC;
     graph        = graph1;
     rule         = null;
     try
     {
         graph.updateFromGraphControl(graphControl);
         if (graph.Bag == null)
         {
             graph.initPropertiesBag();
         }
         this.graphRuleProps.SelectedObject = graph.Bag;
         this.graphRulePropsTab.Text        = "Graph Properties";
     }
     catch (Exception exc)
     {
         MessageBox.Show("The properties of the graph has thrown an exception and cannot be displayed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         SearchIO.output(exc.Message, 2);
     }
     showDisplayProperties(graphControl, (Netron.GraphLib.PropertyBag)props[0]);
     showNodeArcProperties((Netron.GraphLib.PropertyBag)props[0], graph);
 }