Пример #1
0
        private void AddIntentButton_Click(object sender, EventArgs e)
        {
            IntentEditorWindow intentEditorWindow = new IntentEditorWindow(this);

            intentEditorWindow.Show();
            IntentEditors.Add(intentEditorWindow);
            intentEditorWindow.OnCompleteEvent += OnIntentEndEdit;
        }
Пример #2
0
        private void EditIntentButton_Click(object sender, EventArgs e)
        {
            string guid = (string)IntentView.Rows[IntentView.CurrentCell.RowIndex].Cells[0].Value;

            bool found = false;

            foreach (Intent intent in Data.Intents)
            {
                if (intent.GUID.ToUpper() == guid.ToUpper())
                {
                    IntentEditorWindow intentEditor = new IntentEditorWindow(this, intent);
                    intentEditor.OnCompleteEvent += OnIntentEndEdit;
                    IntentEditors.Add(intentEditor);
                    intentEditor.Show();
                    found = true;
                    break;
                }
            }

            if (!found)
            {
                MessageBox.Show("Could not find intent with GUID: \"" + guid.ToUpper() + "\".", "Error!");
            }
        }