示例#1
0
 private void ActionAddCustomProperty(object sender, EventArgs e)
 {
     if (treeView1.SelectedNode.Tag is Item)
     {
         Item i = (Item)treeView1.SelectedNode.Tag;
         AddCustomProperty form = new AddCustomProperty(i.CustomProperties);
         form.ShowDialog();
     }
     if (treeView1.SelectedNode.Tag is root)
     {
         root l = (root)treeView1.SelectedNode.Tag;
         AddCustomProperty form = new AddCustomProperty(l.CustomProperties);
         form.ShowDialog();
     }
     if (treeView1.SelectedNode.Tag is Layer)
     {
         Layer             l    = (Layer)treeView1.SelectedNode.Tag;
         AddCustomProperty form = new AddCustomProperty(l.CustomProperties);
         form.ShowDialog();
     }
     if (treeView1.SelectedNode.Tag is CustomNode)
     {
     }
     propertyGrid1.Refresh();
 }
示例#2
0
        private void customPropertyAddButton_Click(object sender, EventArgs e)
        {
            if (Editor.Instance.SelectedItems.Count == 0)
            {
                MessageBox.Show("select some items first");
                return;
            }
            SerializableDictionary props = new SerializableDictionary();
            AddCustomProperty      form  = new AddCustomProperty(props);

            form.ShowDialog();

            foreach (String key in props.Keys)
            {
                CustomProperty cp = props[key];
                foreach (Item selitem in Editor.Instance.SelectedItems)
                {
                    selitem.CustomProperties.Add(key, cp.clone());
                }
            }
        }
示例#3
0
 private void ActionAddCustomProperty(object sender, EventArgs e)
 {
     if (treeView1.SelectedNode.Tag is Item)
     {
         Item i = (Item)treeView1.SelectedNode.Tag;
         AddCustomProperty form = new AddCustomProperty(i.CustomProperties);
         form.ShowDialog();
     }
     if (treeView1.SelectedNode.Tag is Level)
     {
         Level l = (Level)treeView1.SelectedNode.Tag;
         AddCustomProperty form = new AddCustomProperty(l.CustomProperties);
         form.ShowDialog();
     }
     if (treeView1.SelectedNode.Tag is Layer)
     {
         Layer l = (Layer)treeView1.SelectedNode.Tag;
         AddCustomProperty form = new AddCustomProperty(l.CustomProperties);
         form.ShowDialog();
     }
     propertyGrid1.Refresh();
 }
示例#4
0
        private void customPropertyAddButton_Click(object sender, EventArgs e)
        {
            if (Editor.Instance.SelectedItems.Count == 0)
            {
                MessageBox.Show("select some items first");
                return;
            }
            SerializableDictionary props = new SerializableDictionary();
            AddCustomProperty form = new AddCustomProperty(props);
            form.ShowDialog();

            foreach (String key in props.Keys)
            {
                CustomProperty cp = props[key];
                foreach (Item selitem in Editor.Instance.SelectedItems)
                {
                    selitem.CustomProperties.Add(key, cp.clone());
                }
            }
        }