Exemplo n.º 1
0
        public void GetDataGridTermTranslationList(string path, [CallerMemberName] string caller = "")
        {
            string callerMethodName = caller;

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

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