Exemplo n.º 1
0
 private void menuMove_Click(object sender, EventArgs e)
 {
     Monitor.Enter(_System.LockObject);
     try
     {
         if (GetSelectedFile() == null)
         {
             return;
         }
         NoteFolder newNoteFolder = FolderNameForm.GetValue("Enter note tab to move to:", _System);
         if (newNoteFolder == null)
         {
             return;
         }
         string newFullPath = newNoteFolder.GetFullPath(GetSelectedFile().BareFileName);
         File.Move(GetSelectedFile().GetFullPath(), newFullPath);
         _System.RefreshCurrentFolder();
     }
     catch (Exception ex)
     {
         ShowException(ex);
     }
     finally
     {
         Monitor.Exit(_System.LockObject);
     }
 }
Exemplo n.º 2
0
 public static NoteFolder GetValue(string instructions, NoteSystem noteSystem)
 {
     using (FolderNameForm frm = new FolderNameForm())
     {
         frm._NoteSystem          = noteSystem;
         frm.lblInstructions.Text = instructions;
         DialogResult result = frm.ShowDialog();
         if (result == DialogResult.OK)
         {
             return(((FolderListItem)frm.lstFolders.SelectedItem).Folder);
         }
         return(null);
     }
 }