示例#1
0
 /// <summary>
 /// Clear current workspace
 /// </summary>
 private void WorkspaceClearMenuItem(object sender, EventArgs e)
 {
     // Clear current workspace
     if (MessageBox.Show("Current workspace will be cleared from all git repositories. Continue?",
                         "Clear Workspace", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         ClassWorkspace.Clear();
     }
 }
示例#2
0
 /// <summary>
 /// Create a new workspace at the specified (workspace) file location
 /// </summary>
 private void WorkspaceCreateMenuItem(object sender, EventArgs e)
 {
     // Save existing workspace before trying to create a new one
     if (ClassWorkspace.Save(null))
     {
         // Ask user to select a new workspace file name
         if (createWk.ShowDialog() == DialogResult.OK)
         {
             // Create a new workspace by saving an empty one and then reloading it
             ClassWorkspace.Clear();
             ClassWorkspace.Save(createWk.FileName);
             ClassWorkspace.Load(createWk.FileName);
             App.DoRefresh();
         }
     }
 }