///// <summary> ///// Disable the object editor. ///// </summary> //public void DisableHotKey() //{ // if (!hotKeyEnabled) return; // hotKeyWatch.HotKeyPressed -= new EventHandler(hotKeyWatch_HotKeyPressed); // hotKeyWatch.UnregisterKey(); // hotKeyWatch = null; // hotKeyEnabled = false; // Trace.WriteLine("ObjectEditor's hotkey disabled."); //} /// <summary> /// Show the object editor form. /// </summary> public void Show() { object activeSelectedObject = null; if (hawkeyeEditor != null) { activeSelectedObject = hawkeyeEditor.SelectedObject; // Disconnect any possible Open Forms foreach (Form frm in Application.OpenForms) { if (frm.Owner == hawkeyeEditor) { frm.Owner = null; } } hawkeyeEditor.Close(); } hawkeyeEditor = new HawkeyeEditor(); hawkeyeEditor.Show(); hawkeyeEditor.Closed += new EventHandler(runtimeEditor_Closed); hawkeyeEditor.SelectedObject = activeSelectedObject; hawkeyeEditor.Activate(); }
//public object SelectedObject //{ // get { return hawkeyeEditor.SelectedObject; } // set { hawkeyeEditor.SelectedObject = value; } //} public Form CreateEditor() { if (hawkeyeEditor != null) { hawkeyeEditor.Close(); } hawkeyeEditor = new HawkeyeEditor(); return(hawkeyeEditor); }
private void runtimeEditor_Closed(object sender, EventArgs e) { hawkeyeEditor = null; }