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

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

            List <Models.CompileCommandResult> compileResults = (List <Models.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);
            }
        }
Exemplo n.º 2
0
        private static CompileCommandResult ExecuteCompileCommand(string lessFile, string cssFile, bool minify, bool addDebugInfo)
        {
            string arguments = CreateCompileArguments(lessFile, cssFile, minify, addDebugInfo);

            CompileCommandResult result = new CompileCommandResult(ExecuteLessCommand(arguments));
            result.FullPath = lessFile;

            return result;
        }