• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Core.GraphController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DesignScriptStudio.Graph.Core.GraphController的典型用法代码示例。如果您正苦于以下问题:C# GraphController类的具体用法?C# GraphController怎么用?C# GraphController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



GraphController类属于DesignScriptStudio.Graph.Core命名空间,在下文中一共展示了GraphController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MenuItemsProvider

 public MenuItemsProvider(GraphController controller, NodePart part, uint id)
 {
     this.graphController = controller;
     this.nodePart = part;
     this.nodeId = id;
     this.GenerateMenuItems();
 }
开发者ID:samuto,项目名称:designscript,代码行数:7,代码来源:MenuItemsProvider.cs


示例2: EdgeController

 internal EdgeController(GraphController graphController)
 {
     this.graphController = graphController;
     edgeCollection = new Dictionary<uint, VisualEdge>();
     this.selectedSlots = new List<uint>();
     connectingEdge = new VisualEdge(this, EdgeType.ExplicitConnection);
 }
开发者ID:samuto,项目名称:designscript,代码行数:7,代码来源:EdgeController.cs


示例3: T001_Defect_IDE_1319

        public void T001_Defect_IDE_1319()
        {
            string commands = @"
            CreateDriverNode|d:15409.0|d:15220.5
            MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
            BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None|d:15404.0|d:15226.0
            EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None|d:15466.0|d:15215.0
            MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
            MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
            MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
            BeginNodeEdit|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption
            MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
            MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
            EndNodeEdit|u:0x10000001|s:1|b:True
            MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
            MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
            ";

            GraphController controller = new GraphController(null);
            bool result00 = controller.RunCommands(commands);
            Assert.AreEqual(true, result00);

            VisualNode node;

            node = (VisualNode)controller.GetVisualNode(0x10000001);
            Assert.AreEqual(true, node.Error);
        }
开发者ID:samuto,项目名称:designscript,代码行数:27,代码来源:DriverNodeTests.cs


示例4: Defect_IDE_1533

        public void Defect_IDE_1533()
        {
            // Create a simple file with CBN a = 1;
            // Save it as : DesignScriptStudio.Tests\\UnitTests\\testfiles\\Defect_IDE_1533.bin
            // Now try to open the file with the file name only ("Defect_IDE_1533.bin"); and verify

            string commands = @"
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                CreateCodeBlockNode|d:15417.0|d:15222.0|s:
                BeginNodeEdit|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,NorthWest|i:-1|e:System.Windows.Input.ModifierKeys,None
                EndNodeEdit|u:0x10000001|s:a = 1;|b:True
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None";

            GraphController graphController01 = new GraphController(null);
            bool result = graphController01.RunCommands(commands);
            Assert.AreEqual(true, result);

            string testPath = "..\\..\\..\\..\\Studio\\DesignScriptStudio.Tests\\UnitTests\\testfiles\\";
            string filePath = testPath + "Defect_IDE_1533.bin";
            graphController01.DoSaveGraph(filePath);
            GraphController graphController02 = new GraphController(null, filePath);

            GraphController controller = new GraphController(null);
            bool result00 = controller.RunCommands(commands);
            Assert.AreEqual(true, result00);

            VisualNode node = controller.GetVisualNode(0x10000001);
            Assert.AreEqual(15417, node.X);
            Assert.AreEqual(15222, node.Y);
            Assert.AreEqual(false, node.Selected);
        }
开发者ID:samuto,项目名称:designscript,代码行数:35,代码来源:FileStorageTests.cs


示例5: TestConnectingSlots

        public void TestConnectingSlots()
        {
            string commands = @"
                CreateFunctionNode|d:350.0|d:346.0|s:Math.dll|s:Math.Cos|s:double
                CreateFunctionNode|d:636.0|d:275.0|s:ProtoGeometry.dll|s:Point.ByCoordinates|s:double,double,double
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:499.0|d:372.0
                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:638.0|d:290.0
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None";

            GraphController controller = new GraphController(null);
            bool result = controller.RunCommands(commands);
            Assert.AreEqual(true, result);

            List<IVisualNode> nodes = ((GraphController)controller).GetVisualNodes();
            VisualNode node = (VisualNode)nodes[0];
            uint slotId = node.GetOutputSlot(0);
            ISlot slot = ((GraphController)controller).GetSlot(slotId);
            result = false;
            if (slot.ConnectingSlots != null)
                result = true;
            Assert.AreEqual(true, result);

            node = (VisualNode)nodes[1];
            slotId = node.GetOutputSlot(0);
            slot = ((GraphController)controller).GetSlot(slotId);
            result = false;
            if (slot.ConnectingSlots == null)
                result = true;
            Assert.AreEqual(true, result);
        }
开发者ID:samuto,项目名称:designscript,代码行数:31,代码来源:SlotTests.cs


示例6: TestHandleClearSelection

        public void TestHandleClearSelection()
        {
            string commands = @"
                CreateFunctionNode|d:405.0|d:301.0|s:Math.dll|s:Math.Sin|s:double
                CreateFunctionNode|d:746.0|d:267.0|s:Math.dll|s:Math.Sin|s:double
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:548.0|d:325.0
                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:754.0|d:288.0
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None|d:353.0|d:199.0
                SelectComponent|u:0x10000001|e:System.Windows.Input.ModifierKeys,None
                SelectComponent|u:0x10000002|e:System.Windows.Input.ModifierKeys,None
                SelectComponent|u:0x60000001|e:System.Windows.Input.ModifierKeys,None
                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None|d:926.0|d:409.0
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                ClearSelection";

            GraphController graphController = new GraphController(null);
            bool result = graphController.RunCommands(commands);
            Assert.AreEqual(true, result);

            IVisualNode node01 = graphController.GetVisualNode(0x10000001);
            IVisualNode node02 = graphController.GetVisualNode(0x10000002);
            IVisualEdge edge = graphController.GetVisualEdge(0x60000001);
            Assert.AreEqual(false, ((VisualNode)node01).Selected);
            Assert.AreEqual(false, ((VisualNode)node02).Selected);
            Assert.AreEqual(false, ((VisualEdge)edge).Selected);
        }
开发者ID:samuto,项目名称:designscript,代码行数:29,代码来源:GraphController.CommandHandlersTests.cs


示例7: Cancel_Connection_1558

        public void Cancel_Connection_1558()
        {
            //1. Create CBN a= Var3
            //2. Create CBN  1
            //3. create a function node Point.ByCoordiantes and connect the second CBN to points x,y, and z

            string commands = @"
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                CreateCodeBlockNode|d:15378.0|d:15208.0|s:
                BeginNodeEdit|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text|i:-1|e:System.Windows.Input.ModifierKeys,None
                EndNodeEdit|u:0x10000001|s:a=1|b:True
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                CreateIdentifierNode|d:15519.0|d:15183.0
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:15414.0|d:15212.0
                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x00000000|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None|d:-1.0|d:-1.0
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None";

            GraphController controller = new GraphController(null);
            bool result = controller.RunCommands(commands);
            Assert.AreEqual(true, result);

            VisualNode node = controller.GetVisualNode(0x10000002);
            Assert.AreEqual(false, node.Selected);
        }
开发者ID:samuto,项目名称:designscript,代码行数:31,代码来源:NodeConnectionTests.cs


示例8: Defect_IDE_1670

        public void Defect_IDE_1670()
        {
            string commands = @"CreateIdentifierNode|d:15339.0|d:15187.5
                                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                                CreateDriverNode|d:15422.0|d:15329.5
                                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:15456.0|d:15335.0
                                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:15307.0|d:15193.0
                                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                                CreateIdentifierNode|d:15463.0|d:15206.5";

            GraphController controller = new GraphController(null);
            bool result00 = controller.RunCommands(commands);
            Assert.AreEqual(true, result00);

            VisualNode node;

            node = (VisualNode)controller.GetVisualNode(0x10000001);
            Assert.IsNullOrEmpty(node.ErrorMessage);
            node = (VisualNode)controller.GetVisualNode(0x10000002);
            Assert.IsNullOrEmpty(node.ErrorMessage);
            node = (VisualNode)controller.GetVisualNode(0x10000003);
            Assert.IsNullOrEmpty(node.ErrorMessage);
        }
开发者ID:samuto,项目名称:designscript,代码行数:25,代码来源:IdentifierNodeTests.cs


示例9: Defect_IDE_1267

        public void Defect_IDE_1267()
        {
            //create a '+' node, and identifier and a driver and then rename all of them using double click
            // => verify the new names
            string commands = @"
                CreateFunctionNode|d:15427.0|d:15312.5|s:|s:+|s:double,double
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginNodeEdit|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000001|e:DesignScriptStudio.Graph.Core.NodePart,Text|i:0|e:System.Windows.Input.ModifierKeys,None
                EndNodeEdit|u:0x10000001|s:v1|b:True
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                CreateIdentifierNode|d:15468.0|d:15204.0
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:-1|e:System.Windows.Input.ModifierKeys,None
                BeginNodeEdit|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,Caption
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:-1|e:System.Windows.Input.ModifierKeys,None
                EndNodeEdit|u:0x10000002|s:v2|b:True
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                CreateDriverNode|d:15432.0|d:15223.5
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None|d:15418.0|d:15219.0
                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None|d:15330.0|d:15102.0
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginNodeEdit|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,Caption|i:0|e:System.Windows.Input.ModifierKeys,None
                EndNodeEdit|u:0x10000003|s:v3|b:True
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                BeginDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000003|e:DesignScriptStudio.Graph.Core.NodePart,OutputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:15363.0|d:15107.0
                EndDrag|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None|d:15446.0|d:15206.0
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0x10000002|e:DesignScriptStudio.Graph.Core.NodePart,InputSlot|i:0|e:System.Windows.Input.ModifierKeys,None
                MouseDown|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None
                MouseUp|e:System.Windows.Input.MouseButton,Left|u:0xffffffff|e:DesignScriptStudio.Graph.Core.NodePart,None|i:-1|e:System.Windows.Input.ModifierKeys,None";

            GraphController controller = new GraphController(null);
            bool result00 = controller.RunCommands(commands);
            Assert.AreEqual(true, result00);

            VisualNode node = controller.GetVisualNode(0x10000001);
            Assert.AreEqual("+", node.Caption);
            Assert.AreEqual("v1", node.Text);

            node = (VisualNode)controller.GetVisualNode(0x10000002);
            Assert.AreEqual("v2", node.Caption);

            node = (VisualNode)controller.GetVisualNode(0x10000003);
            Assert.AreEqual("v3", node.Caption);
        }
开发者ID:samuto,项目名称:designscript,代码行数:58,代码来源:NodeOperationTest.cs


示例10: TestRemoveVisualNodeOperationException

        public void TestRemoveVisualNodeOperationException()
        {
            GraphController graphController = new GraphController(null);

            Assert.Throws<InvalidOperationException>(() =>
            {
                graphController.RemoveVisualNode(0x10000001);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:9,代码来源:GraphController.InternalsTests.cs


示例11: TestRemoveSlotOperationException

        public void TestRemoveSlotOperationException()
        {
            GraphController graphController = new GraphController(null);

            Assert.Throws<InvalidOperationException>(() =>
            {
                graphController.RemoveSlot(0x60000001);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:9,代码来源:GraphController.InternalsTests.cs


示例12: TestSynchronizeToLifeRunnerOperationException

        public void TestSynchronizeToLifeRunnerOperationException()
        {
            GraphController graphController= new GraphController(null);

            Assert.Throws<InvalidOperationException>(() =>
            {
                DeltaNodes deltaNodes = new DeltaNodes();
                graphController.SynchronizeToLiveRunner(deltaNodes);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:10,代码来源:GraphController.InternalsTests.cs


示例13: TestPopRecordFromUndoStorage00

        public void TestPopRecordFromUndoStorage00()
        {
            GraphController graphController = new GraphController(null);
            UndoRedoRecorder urr = new UndoRedoRecorder(graphController);

            Assert.Throws<InvalidOperationException>(() =>
            {
                urr.PopRecordFromUndoStorage();
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:10,代码来源:UndoRedoRecorderTests.cs


示例14: TestCreate01

        public void TestCreate01()
        {
            IGraphController graphController = new GraphController(null);
            IStorage storage = null;

            Assert.Throws<ArgumentNullException>(() =>
            {
                ISlot slot = Slot.Create(graphController, storage);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:10,代码来源:SlotTests.cs


示例15: TestEndGroup

        public void TestEndGroup()
        {
            GraphController graphController = new GraphController(null);
            UndoRedoRecorder urr = new UndoRedoRecorder(graphController);

            Assert.Throws<InvalidOperationException>(() =>
            {
                urr.EndGroup();
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:10,代码来源:UndoRedoRecorderTests.cs


示例16: TestCreate01

        public void TestCreate01()
        {
            IStorage storage = null;
            GraphController graphController = new GraphController(null);
            EdgeController edgeController = new EdgeController(graphController);

            Assert.Throws<ArgumentNullException>(() =>
            {
                IVisualEdge edge = VisualEdge.Create(edgeController, storage);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:11,代码来源:VisualEdgeTests.cs


示例17: TestSerializeNullException

        public void TestSerializeNullException()
        {
            IGraphController graphController = new GraphController(null);
            IStorage storage = null;
            CondensedNode node = new CondensedNode(graphController, "Hello World");

            Assert.Throws<ArgumentNullException>(() =>
            {
                node.Serialize(storage);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:11,代码来源:CondensedNodeTests.cs


示例18: TestSerializeNullException

        public void TestSerializeNullException()
        {
            IGraphController graphController = new GraphController(null);
            IStorage storage = null;
            IVisualNode node = new RenderNode(graphController, 1);

            Assert.Throws<ArgumentNullException>(() =>
            {
                node.Serialize(storage);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:11,代码来源:RenderNodeTests.cs


示例19: TestSerializeNullException

        public void TestSerializeNullException()
        {
            IGraphController graphController = new GraphController(null);
            IStorage storage = null;
            DataHeader header = new DataHeader();

            Assert.Throws<ArgumentNullException>(() =>
            {
                header.Serialize(storage);
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:11,代码来源:DataHeaderTests.cs


示例20: TestRecordEdgeCreationForUndo02

        public void TestRecordEdgeCreationForUndo02()
        {
            GraphController graphController = new GraphController(null);
            UndoRedoRecorder urr = new UndoRedoRecorder(graphController);

            Assert.Throws<ArgumentException>(() =>
            {
                urr.BeginGroup();
                urr.RecordEdgeCreationForUndo(new List<IVisualEdge>());
            });
        }
开发者ID:samuto,项目名称:designscript,代码行数:11,代码来源:UndoRedoRecorderTests.cs



注:本文中的DesignScriptStudio.Graph.Core.GraphController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Weather.Country类代码示例发布时间:2022-05-24
下一篇:
C# Network.NetState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap