コード例 #1
0
        public static void ProcessCompilerResults(MinificationResult result)
        {
            BundlerMinifierPackage._dispatcher.BeginInvoke(new Action(() =>
            {
                //if (result == null)
                //{
                //    MessageBox.Show($"There is an error in the {FileHelpers.FILENAME} file. This could be due to a change in the format after this extension was updated.", "Web Compiler", MessageBoxButtons.OK, MessageBoxIcon.Information);

                //    if (File.Exists(configFile))
                //        BundlerMinifierPackage._dte.ItemOperations.OpenFile(configFile);

                //    return;
                //}

                if (result.HasErrors)
                {
                    ErrorList.AddErrors(result.FileName, result.Errors);
                }
                else
                {
                    ErrorList.CleanErrors(result.FileName);
                    BundlerMinifierPackage._dte.StatusBar.Text = $"{Path.GetFileName(result.FileName)} minified";
                }
            }), DispatcherPriority.ApplicationIdle, null);
        }
コード例 #2
0
 public static void ProcessCompilerResults(MinificationResult result)
 {
     BundlerMinifierPackage._dispatcher.BeginInvoke(new Action(() =>
     {
         if (result.HasErrors)
         {
             ErrorList.AddErrors(result.FileName, result.Errors);
         }
         else
         {
             ErrorList.CleanErrors(result.FileName);
             BundlerMinifierPackage._dte.StatusBar.Text = Resources.Text.StatusMinified.AddParams(Path.GetFileName(result.FileName));
         }
     }), DispatcherPriority.ApplicationIdle, null);
 }