Example #1
0
        private void GridNetwork_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            Debug.WriteLine("BEFORE");
            Debug.WriteLine("Number of CurrentConnection: " + CurrentConnection.Count().ToString());
            Debug.WriteLine("Number of Connections: " + Connections.Count().ToString());
            Debug.WriteLine("Number of Nodes: " + Nodes.Count().ToString());
            foreach (var iNode in Nodes)
            {
                Debug.WriteLine("---------------------------------------------------------------");
                Debug.WriteLine(String.Format("NODE GRAPH     : {0}", iNode.LayerType.ToString()));
                Debug.WriteLine(String.Format("       ID      : {0}", iNode.ID));
                Debug.WriteLine(String.Format("       location: ({0},{1})", iNode.X, iNode.Y));
                Debug.WriteLine(String.Format("       seq_id  : {0}", iNode.seq_id.ToString()));
                Debug.WriteLine(String.Format("       name    : {0}", iNode.NameLayer.ToString()));
            }
            Connections.Clear();
            CurrentConnection.Clear();
            //Nodes.Clear();
            Debug.WriteLine("AFTER");
            Debug.WriteLine("Number of CurrentConnection: " + CurrentConnection.Count().ToString());
            Debug.WriteLine("Number of Connections: " + Connections.Count().ToString());
            Debug.WriteLine("Number of Nodes: " + Nodes.Count().ToString());
            indexCurrentLine = CurrentConnection.Count() - 1;

            //net_canvas.Children.Clear();
        }