예제 #1
0
        void AddProperty(object sender, EventArgs args)
        {
            AddPropertyDialog dlg = new AddPropertyDialog();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                MappingNode mappingNode = (MappingNode)this.o;
                Property    prop        = new Property(mappingNode, dlg.PropName, dlg.Type, dlg.Value);
                mappingNode.AddProperty(prop);
                this.Nodes.Add(new PropertyNode(this, prop));
            }
        }
예제 #2
0
        void ChangeProperty(object sender, EventArgs args)
        {
            AddPropertyDialog dlg = new AddPropertyDialog();

            dlg.PropName     = Property.Name;
            dlg.Type         = Property.Type;
            dlg.Value        = Property.Value;
            dlg.EditProperty = true;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                Property.Type  = dlg.Type;
                Property.Value = dlg.Value;
                MappingNode mn = (MappingNode)parent.Object;
                mn.AddProperty(Property);
            }
            this.TreeView.Refresh();
        }