Esempio n. 1
0
 public GameController(IGameAppService gameAppService
                       , INotificationAppService notificationAppService
                       , ITeamAppService teamAppService
                       , ILocalizationAppService translationAppService) : base()
 {
     this.gameAppService         = gameAppService;
     this.notificationAppService = notificationAppService;
     this.teamAppService         = teamAppService;
     this.translationAppService  = translationAppService;
 }
Esempio n. 2
0
        protected LocalizeWindowViewModel(IEventAggregator eventAggregator, ILocalizationAppService localizationAppService)
            : base(eventAggregator)
        {
            LocalizationAppService = localizationAppService;

            EventAggregator.GetEvent <LanguageChangedEvent>()
            .Subscribe(async(language) =>
            {
                await OnLanguageChanged(language);
            });

            ChangeLanguage(LocalizationAppService.SelectedLanguage);
        }
 public MergeWindowViewModel(
     IEventAggregator eventAggregator,
     ILogger logger,
     IFileSystemLocalizableStringService fileSystemLocalizableStringService,
     IHttpLocalizableStringService httpLocalizableStringService,
     IStringMergeService stringMergeService,
     ILocalizationAppService localizationService)
     : base(eventAggregator, localizationService)
 {
     _eventAggregator = eventAggregator;
     _logger          = logger;
     _fileSystemLocalizableStringService = fileSystemLocalizableStringService;
     _httpLocalizableStringService       = httpLocalizableStringService;
     _stringMergeService = stringMergeService;
 }
Esempio n. 4
0
 public ProxyLocalizableStringService(
     IEventAggregator eventAggregator,
     ILogger logger,
     ICheckConnectionService checkConnectionService,
     IFileSystemLocalizableStringService fileSystemLocalizableStringService,
     IHttpLocalizableStringService httpLocalizableStringService,
     ILocalizationAppService localizationService)
 {
     _eventAggregator                    = eventAggregator;
     _logger                             = logger;
     _checkConnectionService             = checkConnectionService;
     _fileSystemLocalizableStringService = fileSystemLocalizableStringService;
     _httpLocalizableStringService       = httpLocalizableStringService;
     _localizationService                = localizationService;
 }
Esempio n. 5
0
 public TranslationWindowViewModel(IEventAggregator eventAggregator, ILocalizationAppService localizationAppService, IProxyLocalizableStringService proxyLocalizableStringService, IStringMergeService stringMergeService)
     : base(eventAggregator, localizationAppService)
 {
     _proxyLocalizableStringService = proxyLocalizableStringService;
     _stringMergeService            = stringMergeService;
 }
Esempio n. 6
0
        public MainWindowViewModel(IViewNavigationService viewNavigationService, IEventAggregator eventAggregator, IAsyncLoginService loginService, ILocalizationAppService localizationAppService)
            : base(eventAggregator, localizationAppService)
        {
            _viewNavigationService = viewNavigationService;
            _loginService          = loginService;

            eventAggregator.GetEvent <BusyChangedEvent>().Subscribe(busy =>
            {
                this.Busy = busy;
            });

            eventAggregator.GetEvent <StatusBarMessageChangedEvent>().Subscribe(statusBarMessage =>
            {
                this.StatusBarMessage = statusBarMessage;
            });

            this.StatusBarMessage = new StatusBarMessage
            {
                MessageType = MessageType.None,
                Text        = string.Empty
            };

            _allLanguageOptions = new List <LanguageOption>
            {
                new LanguageOption
                {
                    Title      = "English",
                    IsSelected = true,
                    Language   = "en"
                },
                new LanguageOption
                {
                    Title      = "Italian",
                    IsSelected = false,
                    Language   = "it"
                },
            };

            LanguageOptions = _allLanguageOptions;

            ChangeLanguage(_allLanguageOptions[0].Language);
            SelectedLanguageOption = _allLanguageOptions[0];

            _allMenuOptions = new List <MenuOption>
            {
                new MenuOption
                {
                    Title         = Localize[LanguageKeys.Home],
                    TitleKey      = LanguageKeys.Home,
                    IsSelected    = true,
                    Roles         = string.Empty,
                    AlwaysVisible = true,
                    ViewName      = ViewNames.HOME_VIEW
                },
                new MenuOption
                {
                    Title      = Localize[LanguageKeys.Translation],
                    TitleKey   = LanguageKeys.Translation,
                    IsSelected = false,
                    Roles      = "Admin, UserManager",
                    ViewName   = ViewNames.TRANSLATION_VIEW
                },
                new MenuOption
                {
                    Title      = Localize[LanguageKeys.Merge],
                    TitleKey   = LanguageKeys.Merge,
                    IsSelected = false,
                    Roles      = "Admin",
                    ViewName   = ViewNames.MERGE_VIEW
                }
            };

            MenuOptions        = _allMenuOptions;
            SelectedMenuOption = _allMenuOptions[0];
        }
 public LoginWindowViewModel(IViewNavigationService viewNavigationService, IAsyncLoginService loginService, IEventAggregator eventAggregator, ILocalizationAppService localizationAppService)
     : base(eventAggregator, localizationAppService)
 {
     _viewNavigationService = viewNavigationService;
     _loginService          = loginService;
 }
 public LocalizationController(ILocalizationAppService translationAppService)
 {
     this.translationAppService = translationAppService;
 }