static void Main() { //FileMng.LoadWordToData(); FileMng.LoadData(); // 데이터 로드 Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain()); }
private void btnOK_Click(object sender, EventArgs e) { FileMng.wordDatas[index].answer.Clear(); foreach (var item in lstAnswer.Items) { FileMng.wordDatas[index].answer.Add(item.ToString()); } FileMng.SaveData(); Close(); }
private void btnSubmit_Click(object sender, EventArgs e) { bool activeCancel = true; for (int i = 0; i < indexList.Count; i++) { if (FileMng.wordDatas[indexList[i]].answer.Exists(x => x.Equals(txtAnswer[i].Text))) { lblAnswerShow[i].Text = "○"; lblAnswerShow[i].ForeColor = Color.Black; } else { lblAnswerShow[i].Text = "×"; lblAnswerShow[i].ForeColor = Color.Red; activeCancel = false; } } if (!activeCancel) { return; } foreach (var i in indexList) { FileMng.wordDatas[i].date = AddDate(FileMng.wordDatas[i].cnt++); } FileMng.SaveData(); CreateAnswerListButton(); Button btnCancel = new Button(); btnCancel.Text = "닫기"; btnCancel.Font = new Font(Font.FontFamily, 12); btnCancel.Size = new Size(75, 47); btnCancel.Location = new Point(180, 30 + rowCnt * 80 - VerticalScroll.Value); btnCancel.Click += new EventHandler(delegate { frmMain.ShowWindowAsync(MdiParent.Handle, 2); if (frmBrowser != null) { frmBrowser.Close(); } frmAnswerLists.Clear(); Close(); }); Controls.Add(btnCancel); }
private void btnStart_Click(object sender, EventArgs e) { foreach (var i in indexList) { if (FileMng.wordDatas[i].answer.Count == 0) { MessageBox.Show(FileMng.wordDatas[i].word + "의 정답을 입력해주세요"); return; } } foreach (var i in indexList) { FileMng.wordDatas[i].cnt++; FileMng.wordDatas[i].date = DateTime.Now.AddMinutes(58); } // 단어 삭제 foreach (var i in removeList) { FileMng.wordDatas.RemoveAt(i); } FileMng.SaveData(); if (frmBrowser != null) { frmBrowser.Close(); } frmAnswerLists.Clear(); List <int> indexReviewList = WordSelection.SelectReviewWords(); if (indexReviewList.Count == 0) { frmMain.ShowWindowAsync(MdiParent.Handle, 2); Close(); return; } frmStudy = new frmStudy(); frmStudy.MdiParent = MdiParent; frmStudy.Dock = DockStyle.Fill; frmStudy.Show(); Close(); }