コード例 #1
0
 void performToggleAction(DiageticToggle toggle)
 {
     if (toggle.toggleType == "dimensionality")
     {
         bool newDimensionality = toggle.switchState();
         if (newDimensionality)
         {
             graphGenerator.changeNodeDimensionality(GenerateGraph.GRAPH_3D);
         }
         else
         {
             graphGenerator.changeNodeDimensionality(GenerateGraph.GRAPH_2D);
         }
     }
 }
コード例 #2
0
    int clicked2D3D(RMMenuItem item)
    {
        if (item.GetTitle().Equals(" ->2D  3D", System.StringComparison.Ordinal))
        {
            // Change to 3D
            item.SetTitle("  2D ->3D");
            graphGenerator.changeNodeDimensionality(GenerateGraph.GRAPH_3D);
        }
        else
        {
            // To 2D
            item.SetTitle(" ->2D  3D");
            graphGenerator.changeNodeDimensionality(GenerateGraph.GRAPH_2D);
        }


        //graphGenerator.NodeDegree = 5;
        //graphGenerator.showLegalNodesBasedOnFilterSettings();



        return(1);
    }