Esempio n. 1
0
        public void MarkFinish(bool commit, string person1, string person2)
        {
            if (commit)
            {
                var runner = new ProcessRunner(CommitScript, WorkingDirectory);
                var sb     = new StringBuilder();
                runner.Write += x => sb.AppendLine(x);

                if (!runner.Run(person1, person2))
                {
                    MessageBox.Show("Commit failed.\n" + sb.ToString());
                }
            }

            var list = new List <string>(Participants);

            list.RemoveAll(x => StringComparer.InvariantCultureIgnoreCase.Equals(x, person2));
            list.Add(person2);
            list.RemoveAll(x => StringComparer.InvariantCultureIgnoreCase.Equals(x, person1));
            list.Add(person1);

            list.RemoveAll(string.IsNullOrEmpty);

            Participants = list.ToArray();
        }
Esempio n. 2
0
        public bool Run()
        {
            var runner = new ProcessRunner(Script, WorkingDirectory);

            runner.Write += s => { if (Write != null)
                                   {
                                       Write(s);
                                   }
            };
            return(runner.Run());
        }
Esempio n. 3
0
 public bool Run()
 {
     var runner = new ProcessRunner(Script, WorkingDirectory);
     runner.Write += s => { if (Write != null) Write(s); };
     return runner.Run();
 }
Esempio n. 4
0
        public void MarkFinish(bool commit, string person1, string person2)
        {
            if (commit)
            {
                var runner = new ProcessRunner(CommitScript, WorkingDirectory);
                var sb = new StringBuilder();
                runner.Write += x=>sb.AppendLine(x);

                if (!runner.Run(person1, person2))
                    MessageBox.Show("Commit failed.\n" + sb.ToString());
            }

            var list = new List<string>(Participants);
            list.RemoveAll(x => StringComparer.InvariantCultureIgnoreCase.Equals(x, person2));
            list.Add(person2);
            list.RemoveAll(x => StringComparer.InvariantCultureIgnoreCase.Equals(x, person1));
            list.Add(person1);

            list.RemoveAll(string.IsNullOrEmpty);

            Participants = list.ToArray();
        }