private void SquareGenerateButton_Click(object sender, RoutedEventArgs e)
 {
     ReturnEnvironment = new SquareGridEnvironmentConstructor()
     {
         Shape = (VM.ColNum, VM.RowNum)
     };
     DialogResult = true;
     this.Close();
 }
 /* Environment */
 public void NewEnvironment(EnvironmentConstructor envCon)
 {
     Env.Clear();                            // remove all canv children
     Env           = envCon.Construct(Canv); // generate new Environment
     Env.StartNode = Env.Nodes.First();
     Env.EndNode   = Env.Nodes.Last();
     Env.StartNode.SetType(NodeType.Start);
     Env.EndNode.SetType(NodeType.End);
 }
 private void PointGenerateButton_Click(object sender, RoutedEventArgs e)
 {
     ReturnEnvironment = new PointEnvironmentConstructor()
     {
         Shape  = (VM.ColNum * 100, VM.RowNum * 100),
         Radius = VM.Radius
     };
     DialogResult = true;
     this.Close();
 }