public Download_ViewModel_WPF( INavigationService NavigationService_, IDialogServiceExtended IDialogServiceExtended_, AppSetting AppSetting_, IStore Store_, ILocalization loc_, ILogger logger_, IWebAPI_Authorization MainWebAPI_ ) : base (NavigationService_,IDialogServiceExtended_,AppSetting_,Store_,loc_,logger_) { }
public EditLearningItem_ViewModel_WPF( IDialogServiceExtended DialogService_, IPlayer Player_, INavigationService NavigationService_, AppSetting AppSetting_, EFDbConnect EFDbConnect_) { if (!IsInDesignModeNet()) { DialogService = DialogService_; Player = Player_; NavigationService = NavigationService_; AppSetting = AppSetting_; EFDbConnect = EFDbConnect_; Languages = new ObservableCollection<Language>(EFDbConnect.Table<Language>().ToList()); // Commands CommandDispatcher = new MvxCommand<string>(CmdDispatcher); } PlayerVisibility = Visibility.Visible; DownloadVideoButton = new ButtonModel(); if (IsInDesignModeNet()) { LearningItem = new LearningItem(); LearningItem.Name = "Mazzy in Gondoland"; LearningItem.VideoFileName = "C:\\Users\\Public\\Videos\\Sample Videos\\Mazzy.mkv"; LearningItem.SubtitleCollection = new SynchronizedObservableCollection<Subtitles>(); LearningItem.SubtitleCollection.Add(new Subtitles { Name = "English-Russian" }); LearningItem.SubtitleCollection.Add(new Subtitles { Name = "English-Ukraine" }); //CurrentSubtitles = LearningItem.SubtitleCollection[0]; } }
public InitialWizard_ViewModel_WPF( ILogger Logger_, INavigationService NavigationService_, IDialogServiceExtended DialogService_, AppSetting AppSettings_, EFDbConnect EFDbConnect_, ObservableCollection<Language> languages_ ) : base () { PanelCount = 1; if (!IsInDesignMode) { Logger = Logger_; NavigationService = NavigationService_; DialogService = DialogService_; AppSettings = AppSettings_; EFDbConnect = EFDbConnect_; CommandDispatcher = new MvxCommand<string>(CmdDispatcher); //List<Language> lst = EFDbConnect.Table<Language>().ToList(); //Languages = new ObservableCollection<Language>(lst); Languages = languages_; // Default values TargetLanguage = Languages.FirstOrDefault(x=>x.Code == "en"); NativeLanguage = Languages.FirstOrDefault(x=>x.Code == System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag.Substring(0,2).ToLower()); LearningWordStrategy strat = EFDbContext.Context.FirstOrDefault<LearningWordStrategy>(); AppSettings.LearningWordStrategy = strat; } Drives = FileService.GetFixedDrivesList(); if (Drives.Count > 0) { DriveForData = Drives.OrderByDescending(x => x.AvailableFreeSpace).FirstOrDefault(); } if (IsInDesignMode) { SelectedIndex = 2; UpdateButtonState(); } }
public Backup_ViewModel(ILogger Logger_, INavigationService NavigationService_, IDialogServiceExtended DialogService_) { Logger = Logger_; NavigationService = NavigationService_; DialogService = DialogService_; Files = new ObservableCollection<string>(); CommandDispatcher = new MvxCommand<string>(CmdDispatcher); if (IsInDesignMode) { Files.Add(Environment.CurrentDirectory); Files.Add(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); } }
public MainWindow_ViewModel_WPF( INavigationService NavigationService_, IDialogServiceExtended IDialogServiceExtended_, AppSetting AppSetting_, IStore Store_, ILocalization loc_, ILogger logger_, IWebAPI_Authorization MainWebAPI_ ) : base (NavigationService_,IDialogServiceExtended_,AppSetting_,Store_,loc_,logger_) { IDialogServiceExtended = IDialogServiceExtended_; MainWebAPI = MainWebAPI_; if(!IsInDesignModeNet()) { AddCommand = new MvxCommand(Add); CommandDispatecherWPF = new MvxCommand<string>(CmdDispatcherWPF); } }