示例#1
0
        private void toolStripButtonRemoveExtension_Click(object sender, EventArgs e)
        {
            ExtensionSignatureElement element = typedExtensionList.SelectedObject;

            if (element != null)
            {
                extensions.Remove(element);
                listViewExtensions.SetObjects(extensions);
                SetRemoveExtensionButtonState();
                SetSaveButtonState();
                modified = true;
            }
        }
示例#2
0
        private void AddExtension()
        {
            string extensionName = toolStripTextBoxExtension.Text;

            if (string.IsNullOrEmpty(extensionName))
            {
                return;
            }

            var extension = new ExtensionSignatureElement(new Extension(extensionName));

            extensions.Add(extension);

            listViewExtensions.SetObjects(extensions);

            toolStripTextBoxExtension.Clear();
            SetSaveButtonState();
            toolStripTextBoxExtension.Select();
            this.ActiveControl = toolStripTextBoxExtension.Control;

            modified = true;
        }