本文整理汇总了C#中DesignScriptStudio.Graph.Core.GraphController类的典型用法代码示例。如果您正苦于以下问题:C# GraphController类的具体用法?C# GraphController怎么用?C# GraphController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GraphController类属于DesignScriptStudio.Graph.Core命名空间,在下文中一共展示了GraphController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MenuItemsProvider
public MenuItemsProvider(GraphController controller, NodePart part, uint id)
{
this.graphController = controller;
this.nodePart = part;
this.nodeId = id;
this.GenerateMenuItems();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例10: TestRemoveVisualNodeOperationException
public void TestRemoveVisualNodeOperationException()
{
GraphController graphController = new GraphController(null);
Assert.Throws<InvalidOperationException>(() =>
{
graphController.RemoveVisualNode(0x10000001);
});
}
示例11: TestRemoveSlotOperationException
public void TestRemoveSlotOperationException()
{
GraphController graphController = new GraphController(null);
Assert.Throws<InvalidOperationException>(() =>
{
graphController.RemoveSlot(0x60000001);
});
}
示例12: TestSynchronizeToLifeRunnerOperationException
public void TestSynchronizeToLifeRunnerOperationException()
{
GraphController graphController= new GraphController(null);
Assert.Throws<InvalidOperationException>(() =>
{
DeltaNodes deltaNodes = new DeltaNodes();
graphController.SynchronizeToLiveRunner(deltaNodes);
});
}
示例13: TestPopRecordFromUndoStorage00
public void TestPopRecordFromUndoStorage00()
{
GraphController graphController = new GraphController(null);
UndoRedoRecorder urr = new UndoRedoRecorder(graphController);
Assert.Throws<InvalidOperationException>(() =>
{
urr.PopRecordFromUndoStorage();
});
}
示例14: TestCreate01
public void TestCreate01()
{
IGraphController graphController = new GraphController(null);
IStorage storage = null;
Assert.Throws<ArgumentNullException>(() =>
{
ISlot slot = Slot.Create(graphController, storage);
});
}
示例15: TestEndGroup
public void TestEndGroup()
{
GraphController graphController = new GraphController(null);
UndoRedoRecorder urr = new UndoRedoRecorder(graphController);
Assert.Throws<InvalidOperationException>(() =>
{
urr.EndGroup();
});
}