Exemplo n.º 1
0
        public void View_VEventOnAdd(object arg1, EventArgs arg2)
        {
            slowarform.SelectedID = -1;
            model.SetWordID(slowarform.SelectedID);
            EditForm editform = new EditForm();
            EditFormPresenter editformpresenter = new EditFormPresenter(model, editform);

            slowarform.Examples = "";
            slowarform.TranslationList = new string[] { };

            var dialogResult = editform.ShowDialog();

            if (editform.DialogResult == System.Windows.Forms.DialogResult.Cancel)
            {
                model.LoadDictionaryFromFile();
                editform.Dispose();
            }
            else
            {
                model.LoadDictionary();
                model.RemoveTheSame();
                model.SaveDictionaryToFile(model.LoadDictionary());
                slowarform.WordList = model.LoadWords();
            }
            editform.Close();
        }
Exemplo n.º 2
0
 private void SubmitOKButton_Click(object sender, RoutedEventArgs e)
 {
     this.DialogResult = true;
     if (editForm != null)
     {
         editForm.Close();
     }
 }