Ejemplo n.º 1
0
 private void AddNewPropertyButton_Click(object sender, EventArgs e)
 {
     if (fileSaved)
     {
         AddPropertyToFileForm addPropertyForm = new AddPropertyToFileForm(this, workingFile);
         addPropertyForm.Show();
     }
     else
     {
         DialogResult dialogResult = MessageBox.Show("File needs to be saved before adding a new property, save file now?", "Save File", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             workingFile.Name = FileNameTextBox.Text;
             fileController.AddFile(workingFile);
             fileSaved = true;
             AddPropertyToFileForm addPropertyForm = new AddPropertyToFileForm(this, workingFile);
             addPropertyForm.Show();
         }
     }
 }
Ejemplo n.º 2
0
 public CreatePropertyForm(AddPropertyToFileForm parentForm)
 {
     InitializeComponent();
     ParentForm = parentForm;
 }