コード例 #1
0
 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();
 }
コード例 #2
0
 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();
        }
 }
コード例 #3
0
 private void savechange_button_Click(object sender, RoutedEventArgs e)
 {
     this.canvas.Children.Clear();
     view = new RectanglesAndInputs(Convert.ToInt32(this.tnumbers.Text));
     view.Show_All();
 }
コード例 #4
0
        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();
            }
        }