internal void EditItem()
        {
            if (tlsDecoders.Selection.Count <= 0)
            {
                MessageBox.Show("No items selected.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            TreeListNode node = tlsDecoders.Selection[0];

            if (node == null)
            {
                return;
            }

            if (node.Tag is AccessoryDecoder)
            {
                AccessoryDecoder decoder = node.Tag as AccessoryDecoder;
                if (decoder == null)
                {
                    return;
                }

                AccessoryDecoderEditorView form = new AccessoryDecoderEditorView(decoder);
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    this.RefreshTreeList();
                }
            }
            else if (node.Tag is FeedbackEncoder)
            {
                FeedbackEncoder encoder = node.Tag as FeedbackEncoder;
                if (encoder == null)
                {
                    return;
                }

                FeedbackEncoderEditorView form = new FeedbackEncoderEditorView(encoder);
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    this.RefreshTreeList();
                }
            }
            else if (node.Tag is Module)
            {
                Module module = node.Tag as Module;
                if (module == null)
                {
                    return;
                }

                ModuleEditorView form = new ModuleEditorView(module);
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    this.RefreshTreeList();
                }
            }
        }
        internal void LayoutModuleAdd()
        {
            ModuleEditorView form = new ModuleEditorView();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                this.RefreshTreeList();
            }
        }