コード例 #1
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
        public void GetDataGridTermTranslationList(string path, [CallerMemberName] string caller = "")
        {
            string callerMethodName = caller;

            TermTranslationList = ReadFromFileService.ReturnTermTranslationList(path, callerMethodName);
            NotifyPropertyChanged();
        }
コード例 #2
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
 public void ReSortWordsDictionary()
 {
     WordsDictionary = (from entry in WordsDictionary orderby entry.Value descending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);
     ReadFromFileService.GetSortedTermTranslationList(WordsDictionary);
     //GetTermList();
     //GetTranslationList();
     StaticNotifyPropertyChanged();
 }
コード例 #3
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
        // /Methods for non-test mode

        // Methods for Category Tab
        public void GetTermTranslationList(string path, [CallerMemberName] string caller = "")
        {
            string callerMethodName = caller;

            TermTranslationList = ReadFromFileService.ReturnTermTranslationList(path, callerMethodName);
            GetTermList();
            GetTranslationList();

            if (IsTestOn)
            {
                IsTestOpenFirstly = true;
                openWindowService.CreateTestWindow();
            }
            NotifyPropertyChanged();
        }
コード例 #4
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
        private void StaticConfigProvider_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "IsTermUpper":
                if (StaticConfigProvider.IsTermUpper == true)
                {
                    TermList = TermList.Select(x => x.ToUpper()).ToList();
                }
                else
                {
                    TermList = TermList.Select(x => x.ToLower()).ToList();
                }
                break;

            case "IsTranslationUpper":
                if (StaticConfigProvider.IsTranslationUpper == true)
                {
                    TranslationList = TranslationList.Select(x => x.ToUpper()).ToList();
                }
                else
                {
                    TranslationList = TranslationList.Select(x => x.ToLower()).ToList();
                }
                break;

            case "IsTestOn":
                if (StaticConfigProvider.IsTestOn == true)
                {
                    WordsDictionary = ReadFromFileService.ReturnWordsDictionary();
                    IsTestOn        = true;
                }
                else
                {
                    IsTestOn = false;
                }
                break;

            case "IsTestOpenFirstly":
                IsTestOpenFirstly = StaticConfigProvider.IsTestOpenFirstly;
                break;
            }
        }
コード例 #5
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
        // /Methods for Category Tab

        public Dictionary <string, double> GetCurrentWordsDictionary(int blockVolume)
        {
            CurrentWordsDictionary = ReadFromFileService.ReturnCurrentWordsDictionary(blockVolume);
            return(CurrentWordsDictionary);
        }
コード例 #6
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
 public List <string> GetTranslationList()
 {
     TranslationList = ReadFromFileService.ReturnTranslationList();
     return(TranslationList);
 }
コード例 #7
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
 // Methods for non-test mode
 public List <string> GetTermList()
 {
     TermList = ReadFromFileService.ReturnTermList();
     return(TermList);
 }
コード例 #8
0
ファイル: PopUp.cs プロジェクト: SerheyDemchuk/E4Um
 public Dictionary <string, double> GetWordsDictionary()
 {
     WordsDictionary = ReadFromFileService.ReturnWordsDictionary();
     return(WordsDictionary);
 }