コード例 #1
0
ファイル: Hxs.cs プロジェクト: buruzaemon/MSDN-to-Kindle
        // Compile() is called by a background Thread in ProgressForm so be carful

        void ICompilableHelp.Compile(IProgressReporter progressReporter) //Called by Progress form
        {
            try
            {
                HxComp hxsCompiler = new HxComp();
                hxsCompiler.Initialize();

                CompMsg compMsg = new CompMsg(progressReporter, this.logFile);
                compMsg.Log("Date: " + DateTime.Today.ToShortDateString() + ", " + DateTime.Today.ToShortTimeString());
                compMsg.Log("Log file: " + logFile);
                compMsg.Log("Project file: " + projectFile);
                compMsg.Log("");
                int cookie = hxsCompiler.AdviseCompilerMessageCallback(compMsg);

                // Compile
                //
                hxsCompiler.Compile(projectFile, hxsDir, outputFile, 0);

                hxsCompiler.UnadviseCompilerMessageCallback(cookie);   //Done - Break link with compMsg Obj
                compMsg.SaveLog();
                hxsCompiler = null;

                //Show the log file if errors
                if (compMsg.ErrorCount > 0)   //If nore Warnings
                {
                    SafeShowCompileError();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        void ICompilable.Compile(IProgressReporter progressReporter)
        {
            HxComp hxsCompiler = new HxComp();

            hxsCompiler.Initialize();
            //MSHelpCompilerError compilerError = new MSHelpCompilerError();
            CompMsg compilerError;

            compilerError = new CompMsg(progressReporter);

            int i = hxsCompiler.AdviseCompilerMessageCallback(compilerError);


            hxsCompiler.Compile(projectFile, projectRoot, outputFile, 0);
            //if (compilerError.HxErrorType != MSHelpCompilerError.ErrorType.None)
            //{
            //    Console.WriteLine(compilerError.ShortErrorDescription);
            //}
            hxsCompiler.UnadviseCompilerMessageCallback(i);
            hxsCompiler = null;
        }
コード例 #3
0
ファイル: Hxs.cs プロジェクト: mark-s/MSDN-to-Kindle
        //Called by Progress form
        // Compile() is called by a background Thread in ProgressForm so be carful
        void ICompilableHelp.Compile(IProgressReporter progressReporter)
        {
            try
            {
                HxComp hxsCompiler = new HxComp();
                hxsCompiler.Initialize();

                CompMsg compMsg = new CompMsg(progressReporter, this.logFile);
                compMsg.Log("Date: " + DateTime.Today.ToShortDateString() + ", " + DateTime.Today.ToShortTimeString());
                compMsg.Log("Log file: " + logFile);
                compMsg.Log("Project file: " + projectFile);
                compMsg.Log("");
                int cookie = hxsCompiler.AdviseCompilerMessageCallback(compMsg);

                // Compile
                //
                hxsCompiler.Compile(projectFile, hxsDir, outputFile, 0);

                hxsCompiler.UnadviseCompilerMessageCallback(cookie);   //Done - Break link with compMsg Obj
                compMsg.SaveLog();
                hxsCompiler = null;

                //Show the log file if errors
                if (compMsg.ErrorCount > 0)   //If nore Warnings
                {
                    SafeShowCompileError();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #4
0
ファイル: HxCompError.cs プロジェクト: paulushub/SandAssists
        public void Detach(HxComp hxCompiler)
        {
            BuildExceptions.NotNull(hxCompiler, "hxCompiler");

            hxCompiler.UnadviseCompilerMessageCallback(_adviseCookie);
        }