Beispiel #1
0
        public void AddCompileResult(CompileCommandResult result)
        {
            if (InvokeRequired)
            {
                this.Invoke(new AddCompileResultDelegate(AddCompileResult), new object[] { result });
                return;
            }

            if (result.IsSuccess)
            {
                result.ResultText = "success";
            }

            var compileResults = (List <CompileCommandResult>)compileResultsDataGridView.DataSource;

            compileResults.Insert(0, result);
            compileResultsDataGridView_DataChanged();

            if (result.IsSuccess && Program.Settings.ShowSuccessMessages)
            {
                ShowSuccessNotification("Successful compile", result.ResultText);
            }
            else if (!result.IsSuccess)
            {
                ShowErrorNotification("Compile error", result.ResultText);
            }
        }
        private static CompileCommandResult ExecuteCompileCommand(string lessFile, string cssFile, bool minify)
        {
            string arguments = CreateCompileArguments(lessFile, cssFile, minify);

            CompileCommandResult result = new CompileCommandResult(ExecuteLessCommand(arguments));

            result.FullPath = lessFile;

            return(result);
        }
Beispiel #3
0
 public static void Compile(string lessFile, string cssFile, bool minify)
 {
     try
     {
         CompileCommandResult compileResult = ExecuteCompileCommand(lessFile, cssFile, minify);
         MainForm.ActiveOrInActiveMainForm.AddCompileResult(compileResult);
     }
     catch (Exception e)
     {
         ExceptionHandler.LogException(e);
     }
 }