private void DeregisterFromServiceEvents()
 {
     if (settingManagementService != null)
     {
         settingManagementService.AppThemeChanged -= new EventHandler <AppThemeChangedEventArgs>(HandleAppThemeChanged);
         settingManagementService = null;
     }
 }
        public SettingsWindowViewModel()
        {
            this.iocContainer             = IocContainerSingleton.Instance.Container;
            this.settingManagementService = this.iocContainer.Resolve <SettingManagementService>();
            this.settingManagementService.AppThemeChanged += new EventHandler <AppThemeChangedEventArgs>(this.HandleAppThemeChanged);

            this.WindowLoadedCommand = new RelayCommand(this.WindowLoadedCommandHandler);
            this.CloseCommand        = new RelayCommand <IClosable>(this.CloseCommandHandler);
            this.MinimizeCommand     = new RelayCommand <IMinimizable>(this.MinimizeCommandHandler);
            this.PersistTheme        = new RelayCommand(this.PersistThemeCommandHandler);
        }
Exemplo n.º 3
0
        public MainWindowViewModel()
        {
            this.iocContainer             = IocContainerSingleton.Instance.Container;
            this.settingManagementService = this.iocContainer.Resolve <SettingManagementService>();
            this.settingManagementService.AppThemeChanged += new EventHandler <AppThemeChangedEventArgs>(this.HandleAppThemeChanged);

            this.WindowLoadedCommand            = new RelayCommand(this.WindowLoadedCommandHandler);
            this.CloseCommand                   = new RelayCommand <IClosable>(this.CloseCommandHandler);
            this.MinimizeCommand                = new RelayCommand <IMinimizable>(this.MinimizeCommandHandler);
            this.SearchCommand                  = new RelayCommand(this.SearchCommandHandler);
            this.RefreshCommand                 = new RelayCommand(this.RefreshCommandHandler);
            this.ToolCommand                    = new RelayCommand(this.ToolCommandHandler);
            this.SettingCommand                 = new RelayCommand(this.SettingCommandHandler);
            this.ScrollRightCommand             = new RelayCommand(this.ScrollRightCommandHandler);
            this.ScrollLeftCommand              = new RelayCommand(this.ScrollLeftCommandHandler);
            this.NavigateToMovieImdbpageCommand = new RelayCommand(this.NavigateToMovieImdbpageCommandHandler);
            this.NavigateToMovieHomepageCommand = new RelayCommand(this.NavigateToMovieHomepageCommandHandler);
        }