Exemple #1
0
        /// <summary>
        /// Supports all the engine's work in a non-UI Thread and assigns any un-handled exceptions to the Handler.
        /// </summary>
        private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            BackgroundWorker bw     = sender as BackgroundWorker;
            IPatcherEngine   engine = new PatcherEngine(bw);

            try {
                engine.Patch();
            } catch (Exception ex) {
                Handler.Handle(ex);
            }
        }
        /// <summary>
        /// Supports all the engine's work in a non-UI Thread and assigns any un-handled exceptions to the Handler.
        /// </summary>
        private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            BackgroundWorker bw     = sender as BackgroundWorker;
            IPatcherEngine   engine = new PatcherEngine(bw, new WinformsErrorDisplay());

            try {
                engine.Patch();
            }
            catch (Exception ex) {
                Handler handler = new Handler(new WinformsErrorDisplay());
                handler.Handle(ex);
            }
        }