Example #1
0
 private void CleanupToolStripMenuItemClick(object sender, EventArgs e)
 {
     using (var frm = new FormCleanupRepository(UICommands)) frm.ShowDialog(this);
 }
 public void StartCleanupRepositoryDialog(IWin32Window owner)
 {
     using (var frm = new FormCleanupRepository(this))
         frm.ShowDialog(owner);
 }
Example #3
0
 // Please update FormCommandlineHelp if you add or change commands
 private void RunCommandBasedOnArgument(string[] args, Dictionary<string, string> arguments)
 {
     switch (args[1])
     {
         case "about":
             Application.Run(new AboutBox());
             return;
         case "add":
         case "addfiles":
             StartAddFilesDialog();
             return;
         case "apply":       // [filename]
         case "applypatch":
             StartApplyPatchDialog(args.Length == 3 ? args[2] : "");
             return;
         case "blame":       // filename
             RunBlameCommand(args);
             return;
         case "branch":
             StartCreateBranchDialog();
             return;
         case "browse":      // [path] [-filter]
             RunBrowseCommand(args);
             return;
         case "checkout":
         case "checkoutbranch":
             StartCheckoutBranchDialog();
             return;
         case "checkoutrevision":
             StartCheckoutRevisionDialog();
             return;
         case "cherry":
             StartCherryPickDialog();
             return;
         case "cleanup":
             using (var form = new FormCleanupRepository(this))
                 form.ShowDialog();
             return;
         case "clone":       // [path]
             RunCloneCommand(args);
             return;
         case "commit":      // [--quiet]
             Commit(arguments);
             return;
         case "filehistory": // filename
             RunFileHistoryCommand(args);
             return;
         case "fileeditor":  // filename
             RunFileEditorCommand(args);
             return;
         case "formatpatch":
             StartFormatPatchDialog();
             return;
         case "gitbash":
             Module.RunBash();
             return;
         case "gitignore":
             StartEditGitIgnoreDialog();
             return;
         case "init":        // [path]
             RunInitCommand(args);
             return;
         case "merge":       // [--branch name]
             RunMergeCommand(arguments);
             return;
         case "mergeconflicts": // [--quiet]
         case "mergetool":
             RunMergeToolOrConflictCommand(arguments);
             return;
         case "openrepo":    // [path]
             RunOpenRepoCommand(args);
             return;
         case "pull":        //  [--rebase] [--merge] [--fetch] [--quiet] [--remotebranch name]
             Pull(arguments);
             return;
         case "push":        // [--quiet]
             Push(arguments);
             return;
         case "rebase":      // [--branch name]
             RunRebaseCommand(arguments);
             return;
         case "remotes":
             StartRemotesDialog();
             return;
         case "reset":
             StartResetChangesDialog();
             return;
         case "revert":      // filename
             Application.Run(new FormRevert(this, args[2]));
             return;
         case "searchfile":
             RunSearchFileCommand();
             return;
         case "settings":
             StartSettingsDialog();
             return;
         case "stash":
             StartStashDialog();
             return;
         case "synchronize": // [--rebase] [--merge] [--fetch] [--quiet]
             RunSynchronizeCommand(arguments);
             return;
         case "tag":
             StartCreateTagDialog();
             return;
         case "viewdiff":
             StartCompareRevisionsDialog();
             return;
         case "viewpatch":   // [filename]
             StartViewPatchDialog(args.Length == 3 ? args[2] : "");
             return;
         default:
             if (args[1].StartsWith("git://") || args[1].StartsWith("http://") || args[1].StartsWith("https://"))
             {
                 StartCloneDialog(null, args[1], true, null);
                 return;
             }
             if (args[1].StartsWith("github-windows://openRepo/"))
             {
                 StartCloneDialog(null, args[1].Replace("github-windows://openRepo/", ""), true, null);
                 return;
             }
             break;
     }
     Application.Run(new FormCommandlineHelp());
 }