private void closeproject_button_Click(object sender, RoutedEventArgs e) { view = null; currentfilename = null; this.canvas.Children.Clear(); this.datagrid.ItemsSource = null; this.datagrid.Items.Clear(); }
private void addnewproject_Click(object sender, RoutedEventArgs e) { addnewwindow = new AddNewWindow(); addnewwindow.ShowDialog(); if (addnewwindow.ReturnNumbers()!=0) { view = new RectanglesAndInputs(addnewwindow.ReturnNumbers()); view.Show_All(); this.currentfilename = addnewwindow.ReturnPath(); this.tname.Text = addnewwindow.ReturnName(); this.tnumbers.Text = addnewwindow.ReturnNumbers().ToString(); } }
private void savechange_button_Click(object sender, RoutedEventArgs e) { this.canvas.Children.Clear(); view = new RectanglesAndInputs(Convert.ToInt32(this.tnumbers.Text)); view.Show_All(); }
private void open_button_Click(object sender, RoutedEventArgs e) { OpenFileDialog ofg = new OpenFileDialog(); if (ofg.ShowDialog() == true) { view = new RectanglesAndInputs(); view.OpenProject(ofg.FileName); view.GotInputAndRun(); this.tname.Text = ofg.SafeFileName; this.tnumbers.Text = view.ReturnN().ToString(); } }