private void RefreshData() { Datenverwaltung.Initialize(); // Von der Stackoverflow // https://stackoverflow.com/questions/11625208/accessing-ui-main-thread-safely-in-wpf Application.Current.Dispatcher.Invoke(new Action(() => { DialogHost.CloseDialogCommand.Execute(null, null); })); }
public MainWindow() { Datenverwaltung.Initialize(); InitializeComponent(); UcDrucken druck = new UcDrucken(); _proMod = new ProMod(druck); Grid.SetRow(_proMod, 1); _easyMod = new EasyMod(druck); Grid.SetRow(_easyMod, 1); _easyMod.AddDruck2Ui(); uiGrMain.Children.Add(_easyMod); status = modusSatus.easy; }
private void MenueRefresh(object sender, MouseButtonEventArgs e) { e.Handled = true; Datenverwaltung.Initialize(); MessageBox.Show("Refreshed", "Refresh", MessageBoxButton.OK); }