private void AddNewPropertyButton_Click(object sender, EventArgs e) { if (fileSaved) { AddPropertyToFileForm addPropertyForm = new AddPropertyToFileForm(this, workingFile, client); 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; client.AddFile(workingFile); fileSaved = true; AddPropertyToFileForm addPropertyForm = new AddPropertyToFileForm(this, workingFile, client); addPropertyForm.Show(); } } }
public CreatePropertyForm(AddPropertyToFileForm parentForm, MyPhotosClient Client) { InitializeComponent(); ParentForm = parentForm; client = Client; }