/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> public MainWindow() { try { TaskDialog.ForceEmulationMode = true; InitializeComponent(); } catch (Exception e) { TaskDialog.MessageBox("Error during startup", "An error occured in InitializeComponent().", string.Empty, e.ToString(), string.Empty, string.Empty, TaskDialogButtons.OK, TaskDialogIcons.Error, TaskDialogIcons.Error); } try { this.DataContext = _Facade = new Facade(); _Facade.MainWindow = this; authSettingsControl.Facade = _Facade; sessionsControl.Facade = _Facade; this.InputBindings.Add(new KeyBinding(_Facade.AddNewGroupCommand, new KeyGesture(Key.N, ModifierKeys.Control))); } catch (Exception e) { TaskDialog.MessageBox("Error during startup", "An error occured while starting the AdminSuite", string.Empty, e.ToString(), string.Empty, string.Empty, TaskDialogButtons.OK, TaskDialogIcons.Error, TaskDialogIcons.Error); Environment.Exit(-1); } }
public ImportUserWindow(Facade facade) { Facade = facade; InitializeComponent(); }