private void ms_function_click(object sender, EventArgs e) { MyMenuItem item = sender as MyMenuItem; ModulInterface modul = this.modules[item.moduleId]; FunctionInterface function = modul.getFunctions()[item.functionId]; UIBuilderInterface builder = new UIBuilder(); function.buildUI(builder); EingabeManager em = new EingabeManager(); UserDataInterface data = em.getUserData(builder); if (data == null) { return; } try { lb_Ergebnis.Items.Add(function.calculate(data)); } catch (Exception err) { lb_Ergebnis.Items.Add(err.Message + err.StackTrace); Console.Write(err.StackTrace); } }
private void ms_function_click(object sender, EventArgs e) { MyMenuItem item = sender as MyMenuItem; ModulInterface modul = this.modules[item.moduleId]; FunctionInterface function = modul.getFunctions()[item.functionId]; UIBuilderInterface builder = new UIBuilder(); function.buildUI(builder); var uem = new universelleseingabemodul(); uem.buildUi(builder); uem.ShowDialog(); try { lb_Ergebnis.Items.Add(function.calculate(uem.getData())); } catch (DatenNichtValideFehler) { } }