public MainForm() { InitializeComponent(); BaseFormManager.Init(this); BaseFormManager.MainBarManager = barManager1; MenuActionManager.Instance = new MenuActionManager(this, barManager1, tbToolbar, EidssUserContext.User) { ItemsStorage = EidssMenu.Instance }; WindowState = FormWindowState.Maximized; Text = WinClientContext.ApplicationCaption; ToolTipController.InitTooltipController(); DefaultBarAndDockingController1.InitBarAppearance(); tbToolbar.Appearance.InitAppearance(); Dbg.Debug("Application thread ID: {0}", Thread.CurrentThread.ManagedThreadId); DefaultLookAndFeel1.LookAndFeel.SkinName = BaseSettings.SkinName; // "SkinsTest_Money Twins"; SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); //AUM UpdateMessenger = new UpdateMessenger(new ConnectionCredentials()); TimerUpdateListener = UpdateMessenger.CreateTimerListener(); TimerUpdateListener.SynchronizingObject = this; TimerUpdateListener.Elapsed += TimerUpdateListener_Elapsed; TimerExit = UpdateMessenger.CreateTimerExit(); TimerExit.SynchronizingObject = this; TimerExit.Elapsed += TimerExit_Elapsed; }
public void ShowErrorThreadSafeTest() { using (var owner = new Form()) { owner.Show(); BaseFormManager.Init(owner); var ex = new Exception("Test Exception"); ErrorForm.ShowErrorThreadSafe(ex); } }