示例#1
0
 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();
         }
     }
 }
示例#2
0
 public CreatePropertyForm(AddPropertyToFileForm parentForm, MyPhotosClient Client)
 {
     InitializeComponent();
     ParentForm = parentForm;
     client     = Client;
 }