コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
        public ImportUserWindow(Facade facade)
        {
            Facade = facade;

            InitializeComponent();
        }
コード例 #3
0
        public ImportUserWindow(Facade facade)
        {
            Facade = facade;

            InitializeComponent();
        }