private void View_SettingsButton_Click(object sender, EventArgs e) { try { var form = AppDependencies.CreateForm <IFiguresSettingsView>(this); SendData?.Invoke(this, new FigureDrawnEventArgs(_model, _planeSettings, null)); SendData = null; form.View.ShowDialog(); _view.InvokePaintEvent(); } catch (Exception err) { _view.ShowError(err); } }
private void View_ShowAboutFigure_Invoked(object sender, int index) { if (index >= 0) { try { var form = AppDependencies.CreateForm <IFigureInfoPresenterView>(this); SendData?.Invoke(this, new FigureDrawnEventArgs(null, null, _model[index] as FigureDrawer)); SendData = null; form.View.Show(); _view.InvokePaintEvent(); } catch (Exception err) { _view.ShowError(err); } } }