Exemple #1
0
        private void EditDictionaryButton_Click(object sender, EventArgs e)
        {
            if (DictionaryView.CurrentCell == null)
            {
                MessageBox.Show("Please select a cell.", "Error");
                return;
            }

            string guid = (string)DictionaryView.Rows[DictionaryView.CurrentCell.RowIndex].Cells[0].Value;

            bool found = false;

            foreach (Dictionary dictionary in Data.Dictionaries)
            {
                if (dictionary.GUID.ToUpper() == guid.ToUpper())
                {
                    DictionaryEditorWindow dictionaryEditor = new DictionaryEditorWindow(this, dictionary);
                    dictionaryEditor.OnCompleteEvent += OnDictionaryEndEdit;
                    DictionaryEditors.Add(dictionaryEditor);
                    dictionaryEditor.Show();
                    found = true;
                    break;
                }
            }

            if (!found)
            {
                MessageBox.Show("Could not find dictionary with GUID: \"" + guid.ToUpper() + "\".", "Error!");
            }
        }
Exemple #2
0
        private void CreateDictionaryButton_Click(object sender, EventArgs e)
        {
            DictionaryEditorWindow dictionaryEditorWindow = new DictionaryEditorWindow(this);

            dictionaryEditorWindow.Show();
            DictionaryEditors.Add(dictionaryEditorWindow);
            dictionaryEditorWindow.OnCompleteEvent += OnDictionaryEndEdit;
        }