Example #1
0
        public void GetDataGridTermTranslationList(string path, [CallerMemberName] string caller = "")
        {
            string callerMethodName = caller;

            TermTranslationList = ReadFromFileService.ReturnTermTranslationList(path, callerMethodName);
            NotifyPropertyChanged();
        }
Example #2
0
 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();
 }
Example #3
0
        // /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();
        }
Example #4
0
        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;
            }
        }
Example #5
0
        // /Methods for Category Tab

        public Dictionary <string, double> GetCurrentWordsDictionary(int blockVolume)
        {
            CurrentWordsDictionary = ReadFromFileService.ReturnCurrentWordsDictionary(blockVolume);
            return(CurrentWordsDictionary);
        }
Example #6
0
 public List <string> GetTranslationList()
 {
     TranslationList = ReadFromFileService.ReturnTranslationList();
     return(TranslationList);
 }
Example #7
0
 // Methods for non-test mode
 public List <string> GetTermList()
 {
     TermList = ReadFromFileService.ReturnTermList();
     return(TermList);
 }
Example #8
0
 public Dictionary <string, double> GetWordsDictionary()
 {
     WordsDictionary = ReadFromFileService.ReturnWordsDictionary();
     return(WordsDictionary);
 }