Example #1
0
        private void SetupWindowInit(ApplicationSettingViewModel settingVM, out IWindowInitlizer windowinit)
        {
            windowinit = new WindowInit();
            Setting window = null;

            settingVM.SettingSaved += (sender, e) =>
            {
                window?.Close();
            };

            windowinit.SettingWindowOpen += (sender, e) =>
            {
                settingVM.LoadSetting();
                window             = new Setting();
                window.DataContext = settingVM;

                window.ShowDialog();
            };
        }
Example #2
0
        public AEMacroManagerViewModel(IScanner scanner, IMessageBoxService messageBoxService, IMacroManager macroManager, IWindowInitlizer windowInitlizer)
        {
            this.scanner           = scanner;
            this.messageBoxService = messageBoxService;
            this.macroManager      = macroManager;
            this.windowInitlizer   = windowInitlizer;

            InitializeCommand();
            HookEventHandler();
        }