Beispiel #1
0
        private void EditEnumList(MouseEventArgs e)
        {
            TreeNode node = Tree.GetNodeAt(e.X, e.Y);

            if (node.Tag is EnumList)
            {
                EnumList     enumList     = node.Tag as EnumList;
                EnumListForm enumListForm = new EnumListForm();
                enumListForm.PickValue(enumList);
                enumListForm.ShowDialog();
            }
        }
Beispiel #2
0
        private void AddEnumList()
        {
            var isEnums = Tree.SelectedNode.Text == "Enum Lists";

            if (!isEnums)
            {
                return;
            }
            EnumList     enumList = _configuration.EnumerationLists.Add();
            EnumListForm form     = new EnumListForm();

            form.PickValue(enumList);
            if (form.ShowDialog() == DialogResult.OK)
            {
                TreeNode treeNode = Tree.SelectedNode.Nodes.Add(enumList.Name);
                treeNode.Tag = enumList;
            }
        }