static void Main() { GpTraceSource.Listeners.Add(new ConsoleTraceListener(false)); GpTraceSource.Switch.Level = SourceLevels.All; SW.Reset(); SW.Start(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); System.Windows.Forms.Application.ThreadException += new ThreadExceptionEventHandler(UIThreadException); // Set the unhandled exception mode to force all Windows Forms errors to go through // our handler. System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); // Add the event handler for handling non-UI thread exceptions to the event. AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN"); DevExpress.Skins.SkinManager.EnableFormSkins(); DevExpress.Skins.SkinManager.EnableMdiFormSkins(); SW.Stop(); GpTraceSource.TraceInformation("配置时间差:{0}毫秒", SW.ElapsedMilliseconds); Application.Run(new AppForm()); }
public void Reset() { if (IsDivided) { NW.Reset(); NE.Reset(); SW.Reset(); SE.Reset(); } Members.Clear(); AllMembers.Clear(); NW = NE = SW = SE = null; IsDivided = false; }
public void Run(ITestManager tm) { if (tm == null) { throw new ArgumentException("Test Manager is not initialized"); } SetTestManager(tm); SW.Reset(); if (ValidateTestInputs()) { PreTestSetup(); SW.Start(); ProcessTest(); SW.Stop(); PostTestCleanup(); } }