private void _OnEditButtonPressed() { EngineAssistant assistant = new EngineAssistant( Parent, Frontend.FrontendConfig, _SelectedEngine ); assistant.Cancel += delegate { assistant.Destroy(); // Restart the Dialog // HACK: holy shit, please refactor this mess! var dialog = new EngineManagerDialog(Parent, _EngineManager); dialog.Run(); dialog.Destroy(); }; assistant.Close += delegate { assistant.Destroy(); // Restart the Dialog // HACK: holy shit, please refactor this mess! var dialog = new EngineManagerDialog(Parent, _EngineManager); dialog.Run(); dialog.Destroy(); }; assistant.ShowAll(); }
private void _OnNewButtonPressed() { EngineAssistant assistant = new EngineAssistant( this, Frontend.FrontendConfig ); assistant.Cancel += delegate { assistant.Destroy(); // Restart the Dialog // HACK: holy shit, please refactor this mess! EngineManagerDialog dialog = new EngineManagerDialog(_EngineManager); dialog.Run(); dialog.Destroy(); }; assistant.Close += delegate { assistant.Destroy(); // Restart the Dialog // HACK: holy shit, please refactor this mess! EngineManagerDialog dialog = new EngineManagerDialog(_EngineManager); dialog.Run(); dialog.Destroy(); }; assistant.ShowAll(); }
protected void OnAddRemoteEngineActionActivated(object sender, EventArgs e) { Trace.Call(sender, e); try { var assistant = new EngineAssistant( Parent, Frontend.FrontendConfig ); assistant.Cancel += delegate { assistant.Destroy(); }; assistant.Close += delegate { assistant.Destroy(); }; assistant.ShowAll(); } catch (Exception ex) { Frontend.ShowException(Parent, ex); } }
private void _OnAddRemoteEngineButtonClicked(object obj, EventArgs args) { Trace.Call(obj, args); try { EngineAssistant assistant = new EngineAssistant( this, Frontend.FrontendConfig ); assistant.Cancel += delegate { assistant.Destroy(); }; assistant.Close += delegate { assistant.Destroy(); }; assistant.ShowAll(); } catch (Exception ex) { Frontend.ShowException(this, ex); } }