/// <summary> /// initializes this static object /// </summary> protected void init() { Debug.Assert(!Initialized && Misc.IsGuiThread()); MainForm = new MainForm(); Initialized = true; }
/// <summary> /// Execute the method in the context of the GUI thread and wait for its execution to finish /// </summary> /// <param name = "method">a delegate to a method that takes no parameters</param> internal void invoke(Delegate method) { Debug.Assert(Initialized); if (!MainForm.IsDisposed) { MainForm.Invoke(method); } }