private void FindWord_FormClosed(object sender, FormClosedEventArgs e) { test.ResetUsedIndexes(); this.Hide(); FormMaintenance.GetInstance().UnregisterFindWord(); FormMaintenance.GetInstance().GetTestModeInstance().Show(); }
public WordTest(Test t) : this() { FormMaintenance.GetInstance().RegisterFindWord(this); test = t; if (test != null) { lblTestType.Text = test.GetTestType(); } }
public TestMode(WordList w) : this() { FormMaintenance.GetInstance().RegisterTestMode(this); wl = w; // Add entries to list foreach (WordEntry we in wl) { cboFrom.Items.Add(we.GetWord()); cboTill.Items.Add(we.GetWord()); } }
public GREMaster() { InitializeComponent(); wl = new WordList(); serializer = new SerializerFactory().GetSerializer("WordList.xml"); //Splash.ShowSplashScreen(serializer); //Thread.Sleep(2000); serializer.LoadWordList(wl); FormMaintenance.GetInstance().RegisterGREMaster(this); }
private void WordListDialog_FormClosed(object sender, FormClosedEventArgs e) { FormMaintenance.GetInstance().UnregisterWordListDialog(); if (bIsNormalFlow) { FormMaintenance.GetInstance().GetGREMasterInstance().Show(); } else { FormMaintenance.GetInstance().GetFindWordInstance().Show(); } }
private void btnAdd_Click(object sender, EventArgs e) { // Validate if we have atleast the word if (txtWord.Text.Length > 0) { // Create a WordEntry object from input WordEntry we = new WordEntry(); we.SetWord(txtWord.Text); // Meanings String[] strMeanings = txtMeanings.Lines; foreach (String str in strMeanings) { if (str.Length > 0) { we.AddMeaning(str); } } // Usages String[] strUsages = txtUsages.Lines; foreach (String str in strUsages) { if (str.Length > 0) { we.AddUsage(str); } } // Other info String[] strOther = txtOtherInfo.Lines; foreach (String str in strOther) { if (str.Length > 0) { we.AddOtherInfo(str); } } // Now, we have the entry. Add it to the ArrayWordList Boolean ret = wl.AddEntry(we); // Update the UI. if (ret) { lstWordList.Items.Add(we.GetWord()); } Clear(); } FormMaintenance.GetInstance().GetGREMasterInstance().GetSerializer().SetChanged(true); }
public WordListDialog(WordList w) : this() { FormMaintenance.GetInstance().RegisterWordListDialog(this); bIsUpdated = false; bIsNormalFlow = true; wl = w; // Add entries to list foreach (WordEntry we in wl) { lstWordList.Items.Add(we.GetWord()); } lblCount.Text = wl.GetCount().ToString(); }
private void btnUpdate_Click(object sender, EventArgs e) { if (bIsUpdated) { WordEntry we = wl.FindEntry(txtWord.Text); if (we != null) { // Meanings String[] strMeanings = txtMeanings.Lines; we.ClearMeanings(); foreach (String str in strMeanings) { if (str.Length > 0) { we.AddMeaning(str); } } // Usages String[] strUsages = txtUsages.Lines; we.ClearUsages(); foreach (String str in strUsages) { if (str.Length > 0) { we.AddUsage(str); } } // Other info String[] strOther = txtOtherInfo.Lines; we.ClearOtherInfo(); foreach (String str in strOther) { if (str.Length > 0) { we.AddOtherInfo(str); } } } } btnUpdate.Enabled = false; FormMaintenance.GetInstance().GetGREMasterInstance().GetSerializer().SetChanged(true); }
private void TestMode_FormClosed(object sender, FormClosedEventArgs e) { FormMaintenance.GetInstance().UnregisterTestMode(); FormMaintenance.GetInstance().GetGREMasterInstance().Show(); }