private void MenuItemClickEdge(object sender, EventArgs e)
        {
            var edge    = this.edgeControl.GetDataEdge <EdgeViewModel>();
            var command = new RemoveEdgeCommand(this.model, edge.Edge);

            this.controller.Execute(command);
            this.DrawGraph();
        }
        public void ClearButtonClicked()
        {
            foreach (var edge in this.graphArea.EdgesList.Keys)
            {
                var command = new RemoveEdgeCommand(this.model, edge.Edge);
                this.controller.Execute(command);
            }

            foreach (var node in this.graphArea.VertexList.Keys)
            {
                var command = new RemoveNodeCommand(this.model, node.Node);
                this.controller.Execute(command);
            }
        }
        public void RemovingEdgeOnSceneShouldResultInRemovingFromRepo()
        {
            var node1 = testModel.CreateElement(testNodeType);
            var node2 = testModel.CreateElement(testNodeType);
            var edge  = testModel.CreateElement(testEdgeType) as Repo.IEdge;

            edge.From = node1;
            edge.To   = node2;
            ICommand command = new RemoveEdgeCommand(model, edge);

            command.Execute();

            Assert.Zero(testModel.Edges.Count());
            Assert.AreEqual(2, testModel.Nodes.Count());
        }