コード例 #1
0
 public AddPropertyToFileForm(AddNewFileForm Parent, File file, MyPhotosClient Client)
 {
     InitializeComponent();
     parent = Parent;
     client = Client;
     InitializeData(file);
 }
コード例 #2
0
        private void EditFileButton_Click(object sender, EventArgs e)
        {
            AddNewFileForm editFileForm = new AddNewFileForm(workingFile, this, client);

            editFileForm.fileSaved = true;
            editFileForm.Show();
        }
コード例 #3
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();
             MyPhotosClientWCF.File workingFile = client.CreateNewFile(openFileDialog.FileName, openFileDialog.SafeFileName);
             AddNewFileForm         newFileForm = new AddNewFileForm(workingFile, this, client);
             newFileForm.Show();
         }
         catch (SecurityException ex)
         {
             MessageBox.Show($"Security error.\n\nError message: {ex.Message}\n\n" +
                             $"Details:\n\n{ex.StackTrace}");
         }
     }
 }