예제 #1
0
        public string AddReport_Click(string directory, string message)
        {
            if (directory != "" && directory != null)
            {
                OutputLine        outputLineStuff = new OutputLine();
                List <OutputLine> outline         = new List <OutputLine>();

                var command = "git add " + message;
                var text    = CreatePowershell.DewProcess(directory, command + "; git status");
                return(text);
            }
            return("BROKE");
        }
예제 #2
0
        public string InitReport_Click(string directory)
        {
            if (directory != "" && directory != null)
            {
                OutputLine        outputLineStuff = new OutputLine();
                List <OutputLine> outline         = new List <OutputLine>();

                var command = "git init";
                var text    = CreatePowershell.DewProcess(directory, command);

                return(text);
            }
            return("BROKE");
        }
예제 #3
0
        //public List<OutputLine> StatusReport_Click()
        public string StatusReport_Click(string directory)
        {
            if (directory != "" && directory != null)
            {
                OutputLine        outputLineStuff = new OutputLine();
                List <OutputLine> outline         = new List <OutputLine>();

                var command = "git status";
                var text    = CreatePowershell.DewProcess(directory, command);

                ///////////////////////////////////////////////////////
                //If using List<OutputLine> do this code
                //var textArray = text.Split('\n');
                //foreach  (string line in textArray)
                //{

                //    outputLineStuff.LineText = text;

                //    var textLine = line.TrimStart('\t');
                //    if (textLine.StartsWith("modified:"))
                //    {
                //        outputLineStuff.Color = colors.YELLOW;
                //    }
                //    else if (textLine.StartsWith("deleted:"))
                //    {
                //        outputLineStuff.Color = colors.RED;
                //    }
                //    else if (textLine.StartsWith("added:"))
                //    {
                //        outputLineStuff.Color = colors.GREEN;
                //    }
                //    else
                //    {
                //        outputLineStuff.Color = colors.WHITE;
                //    }
                //    outline.Add(outputLineStuff);
                //}
                return(text);
            }
            return("BROKE");
        }