示例#1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            fileIOService = new FileIOService(pathWords, pathUnits);

            try
            {
                EnglishData = fileIOService.LoadDataWords();
                UnitsData   = fileIOService.LoadDataUnits();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                Close();
            }

            UpdateComboBox();

            dgEnglish.ItemsSource    = EnglishData;
            EnglishData.ListChanged += English_Data_ListChanged;
        }