Пример #1
0
 public RetakeWindow(WordGroup wordGroup, out bool hasNoRetakeWord)
 {
     InitializeComponent();
     this.wordGroup = wordGroup;
     RefreshListView();
     hasNoRetakeWord = this.hasNoRetakeWord;
 }
Пример #2
0
        public GroupWindow(WordGroup wordGroup)
        {
            InitializeComponent();
            this.wordGroup = wordGroup;

            listViewGroup.ItemsSource        = GroupListItem.getInstance();
            listViewApplyingRule.ItemsSource = ApplyingRuleListItem.getInstance();

            int i = 0;

            while ((i < wordGroup.MAX_GROUP_NUM) && (wordGroup.GroupInformation.GroupName[i] != null) && isListNotLoaded)
            {
                GroupListItem.getInstance().Add(new GroupListItem(wordGroup.GroupInformation.GroupName[i], wordGroup.getBoxRuleName(wordGroup.GroupInformation.GroupRule[i])));
                i++;
            }

            i = 0;

            while ((i < wordGroup.MAX_BOXRULE_NUM) && (wordGroup.getBoxRuleName(i) != null) && isListNotLoaded)
            {
                ApplyingRuleListItem.getInstance().Add(new ApplyingRuleListItem(wordGroup.getBoxRuleName(i)));
                i++;
            }

            isListNotLoaded = false;

            listViewGroup.Items.Refresh();
            listViewGroup.SelectedIndex = wordGroup.CurrentGroupNum;

            listViewApplyingRule.Items.Refresh();
            RefreshWindow(wordGroup.CurrentGroupNum);
        }
Пример #3
0
        private void BtnGroupChange_Click(object sender, RoutedEventArgs e)
        {
            GroupWindow child = new GroupWindow(wordGroup);

            child.Owner = this;
            child.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            child.ShowDialog();
            wordGroup = new WordGroup(wordGroup.CurrentGroupNum);
            RefreshMainListView();
        }
Пример #4
0
        public BasicSettingWindow(WordGroup wordGroup)
        {
            InitializeComponent();
            this.wordGroup = wordGroup;


            checkRetake.IsChecked          = wordGroup.CurrentSetting.IsRetake;
            checkFirstLetterHint.IsChecked = wordGroup.CurrentSetting.HasFirstLetterHint;
            checkLastLetterHint.IsChecked  = wordGroup.CurrentSetting.HasLastLetterHint;
            CheckLetterNumHint.IsChecked   = wordGroup.CurrentSetting.HasLetterNumHint;
            txtBoxAddress.Text             = wordGroup.CurrentSetting.WordDirectory;
            txtBoxWordPerExam.Text         = wordGroup.CurrentSetting.WordNumPerExam.ToString();
        }
Пример #5
0
        public WordEditWindow(WordGroup wordGroup, int wordIndex)
        {
            InitializeComponent();
            this.wordGroup = wordGroup;
            this.wordIndex = wordIndex;

            txtBoxLetter.Text    = wordGroup[wordIndex].Letter;
            txtBoxMeaning.Text   = wordGroup[wordIndex].Meaning;
            txtBoxMemo.Text      = wordGroup[wordIndex].Memo;
            txtBoxWordState.Text = wordGroup[wordIndex].BoxAtr.BoxNumber.ToString();

            String[] timeString = wordGroup[wordIndex].BoxAtr.TimeString.Split('-');
            txtBoxYear.Text   = timeString[0];
            txtBoxMonth.Text  = timeString[1];
            txtBoxDay.Text    = timeString[2];
            txtBoxHour.Text   = timeString[3];
            txtBoxMinute.Text = timeString[4];
        }
Пример #6
0
 public WordFileLoadWindow(WordGroup wordgroup)
 {
     InitializeComponent();
     this.wordGroup = wordgroup;
 }
Пример #7
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            wordGroup = new WordGroup();

            RefreshMainListView();
        }