Example #1
0
        private void EditFileButton_Click(object sender, EventArgs e)
        {
            AddNewFileForm editFileForm = new AddNewFileForm(workingFile, this);

            editFileForm.fileSaved = true;
            editFileForm.Show();
        }
Example #2
0
 private void AddNewFileButton_Click(object sender, EventArgs e)
 {
     openFileDialog = new OpenFileDialog();
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             var            sr          = new StreamReader(openFileDialog.FileName);
             string         fileData    = sr.ReadToEnd();
             MyPhotos.File  workingFile = fileController.CreateNewFile(openFileDialog.FileName, openFileDialog.SafeFileName);
             AddNewFileForm newFileForm = new AddNewFileForm(workingFile, this);
             newFileForm.Show();
         }
         catch (SecurityException ex)
         {
             MessageBox.Show($"Security error.\n\nError message: {ex.Message}\n\n" +
                             $"Details:\n\n{ex.StackTrace}");
         }
     }
 }
 public AddPropertyToFileForm(AddNewFileForm Parent, File file)
 {
     InitializeComponent();
     parent = Parent;
     InitializeData(file);
 }