示例#1
0
        public void ViewFile(string filename)
        {
            string      cmd    = String.Format("-d {0}.untracked {0}", filename);
            RunExternal runner = new RunExternal("gvim.exe", ".");

            runner.RunWithoutWaiting(cmd);
        }
示例#2
0
        static public string GetSignature()
        {
            RunExternal   runner       = new RunExternal(ProgramPathFinder.GetGitBin(), ".");
            List <string> outputs      = runner.Run("config --list");
            string        name_prefix  = "user.name=";
            string        name         = "unknown";
            string        email_prefix = "user.email=";
            string        email        = "*****@*****.**";

            foreach (string output in outputs)
            {
                if (output.StartsWith(name_prefix))
                {
                    name = output.Substring(name_prefix.Length);
                }
                if (output.StartsWith(email_prefix))
                {
                    email = output.Substring(email_prefix.Length);
                }
            }
            return(string.Format("{0} <{1}>", name, email));
        }
示例#3
0
        private RunExternal CreateGitRunner()
        {
            RunExternal runner = new RunExternal(ProgramPathFinder.GetGitBin(), path_);

            return(runner);
        }
示例#4
0
 public void OnOpenSelectedFileCommand(object parameter)
 {
     foreach (var item in SelectedModifiedFilePathList)
     {
         string directory_name = System.IO.Path.GetDirectoryName(Directory + "\\" + item);
         RunExternal runner = new RunExternal("explorer.exe", directory_name);
         runner.RunWithoutWaiting(Directory + "\\" + item);
     }
 }
示例#5
0
 private RunExternal CreateGitRunner()
 {
     RunExternal runner = new RunExternal(ProgramPathFinder.GetGitBin(), path_);
     return runner;
 }