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

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

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