Ejemplo n.º 1
0
        public Login_ViewModel(ILogger Logger_,INavigationService NavigationService_,IDialogService DialogService_,ISQL_XML_Operations SQL_XML_Operations_)
        {
            Logger = Logger_;
            NavigationService = NavigationService_;
            DialogService = DialogService_;
            SQL_XML_Operations = SQL_XML_Operations_;

            Login_Command = new RelayCommand(Login_cmd);

            if (IsInDesignMode)
            {

            }
        }
Ejemplo n.º 2
0
        public MainWindowViewModel(INavigationService NavigationService_,IDialogService DialogService_,ISQL_XML_Operations SQL_XML_Operations_)
        {
            NavigationService = NavigationService_;
            DialogService = DialogService_;
            SQL_XML_Operations = SQL_XML_Operations_;

            AddCommand = new RelayCommand(Add);
            OpenCommand = new RelayCommand<LearningItem>(Open);
            DeleteCommand = new RelayCommand<LearningItem>(Delete);
            EditCommand = new RelayCommand<LearningItem>(Edit);
            OpenDictionary_Command = new RelayCommand(OpenDictionary_Cmd);
            OpenAppSetting_Command = new RelayCommand(OpenAppSetting_Cmd);
            Training_Command = new RelayCommand(Training_Cmd);
            DebugCommand = new RelayCommand<string>(DebugCmd);

            CommandDispatcher = new RelayCommand<string>(CmdDispatcher);
        }
Ejemplo n.º 3
0
        public Backup_ViewModel(ILogger Logger_, INavigationService NavigationService_, IDialogService DialogService_, ITranslate TranslateService_,ISQL_XML_Operations SQL_XML_Operations_)
        {
            Logger = Logger_;
            NavigationService = NavigationService_;
            DialogService = DialogService_;
            SQL_XML_Operations = SQL_XML_Operations_;

            Files = new ObservableCollection<string>();
            CommandDispatcher = new RelayCommand<string>(CmdDispatcher);

            if (IsInDesignMode)
            {
                Files.Add(Environment.CurrentDirectory);
                Files.Add(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
            }

        }
        public EditLearningItem_ViewModel(IDialogService DialogService_, IPlayer Player_,INavigationService NavigationService_,ISQL_XML_Operations SQL_XML_Operations_)
        {
            if (!IsInDesignMode)
            {
                DialogService = DialogService_;
                Player = Player_;
                NavigationService = NavigationService_;
                SQL_XML_Operations = SQL_XML_Operations_;

                Languages = ViewModelLocator.Instance.Languages;

            }

            // Commands
            CommandDispatcher = new RelayCommand<string>(CmdDispatcher);

            PlayerVisibility = Visibility.Visible;

            if (IsInDesignMode)
            {
                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 SubtitleEditor_ViewModel(IPlayer player_,IDialogService DialogService_,INavigationService NavigationService_,ISQL_XML_Operations SQL_XML_Operations_)
        {
            if (!IsInDesignMode)
            {
                Player = player_;
                DialogService = DialogService_;
                NavigationService = NavigationService_;
                SQL_XML_Operations = SQL_XML_Operations_;

                SubGrid_PhrasesForDictionary_ContextMenu_AddTranslating_Command = new RelayCommand<SubtitleItem.Word>(x=> SubGrid_PhrasesForDictionary_Cmd(x, "AddTranslating"));
                SubGrid_PhrasesForDictionary_ContextMenu_MarkTranslation_Command = new RelayCommand<SubtitleItem.Word>(x=> SubGrid_PhrasesForDictionary_Cmd(x, "MarkTranslation"));
                SubGrid_PhrasesForDictionary_ContextMenu_EditWord_Command  = new RelayCommand<SubtitleItem.Word>(x=> SubGrid_PhrasesForDictionary_Cmd(x,"EditWord"));
                SubGrid_PhrasesForDictionary_ContextMenu_EditTranslation_Command = new RelayCommand<SubtitleItem.Word>(x=> SubGrid_PhrasesForDictionary_Cmd(x,"EditTranslation"));
                SubGrid_PhrasesForDictionary_ContextMenu_DeleteWord_Command = new RelayCommand<SubtitleItem.Word>(x=> SubGrid_PhrasesForDictionary_Cmd(x,"DeleteWord"));
                SubGrid_PhrasesForDictionary_ContextMenu_AddToWordRulesList_Command = new RelayCommand<SubtitleItem.Word>(x=> SubGrid_PhrasesForDictionary_Cmd(x,"AddToWordRulesList"));

                GridPlay_Command = new RelayCommand<SubtitleItem>((x)=>Grid_CommandDispatcher(x,"Play"));
                GridTimeStartTuningRight_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "TimeStartTuningRight"));
                GridTimeStartTuningLeft_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "TimeStartTuningLeft"));
                GridTimeEndTuningRight_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "TimeEndTuningRight"));
                GridTimeEndTuningLeft_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "TimeEndTuningLeft"));
                GridAddRow_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "AddRow"));
                GridDeleteRow_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "DeleteRow"));
                GridSplitRow_Command = new RelayCommand<SubtitleItem>((x) => Grid_CommandDispatcher(x, "SplitRow"));

                GridCommandDispatcher = new RelayCommand<string>(GirdCmdDispatcher);
                CommandDispatcher = new RelayCommand<string>(CmdDispatcher);

                CurrentDictionary_OpenItem_Command = new RelayCommand<WordOfDictionary>((x)=>CurrentDictionary_Cmd(x,"OpenItem"));

                Menu_Command = new RelayCommand<string>(MenuDispatcher);
            }

            PlayerVisibility = Visibility.Visible;

            if (IsInDesignMode)
            {

                PopulateDesignMode();
            }

        }