示例#1
0
        public override Task <bool> BuildAsync(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IProgressMonitor progressMonitor)
        {
            bool success = false;

            if (!VB6Helper.GetIsVB6Available())
            {
                feedbackSink.ReportError(new BuildError("", "Cannot locate VB6.EXE. Please make sure that you have entered the correct path to the VB6-directory under 'Tools -> VB6'."));
            }
            else
            {
                feedbackSink.ReportMessage(new RichText("Building the project using VB6.EXE..."));

                var      result = VB6Helper.MakeProject(_vbProject);
                string[] errors = result.Results;

                if (errors.Length == 0)
                {
                    feedbackSink.ReportMessage(new RichText("Building with VB6.EXE completed successfully!"));
                    success = true;
                }
                else
                {
                    foreach (string error in errors)
                    {
                        if (!string.IsNullOrWhiteSpace(error))
                        {
                            feedbackSink.ReportError(new BuildError("", error));
                        }
                    }
                }
            }

            return(Task.FromResult(success));
        }
示例#2
0
 public override void Start(bool withDebugging)
 {
     if (!VB6Helper.GetIsVB6Available())
     {
         ICSharpCode.SharpDevelop.SD.MessageService.ShowError("Cannot locate VB6.EXE. Please make sure that you have entered the correct path to the VB6-directory under 'Tools -> VB6'.");
     }
     else
     {
         if (withDebugging)
         {
             VB6Helper.RunProject(_project.GetOwnedProject());
         }
         else
         {
             // TODO: Just run the EXE!
         }
     }
 }