Esempio n. 1
0
        private void streamToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EditorItem selectedNode = null;
            if (treeView1.SelectedNode is EditorItem)
                selectedNode = (EditorItem)treeView1.SelectedNode;

            Provider provider = selectedNode != null ? selectedNode.ProviderObject : _database.Root;

            var newStream = new Stream();
            var nop = new NewObject(newStream);
            if (nop.ShowDialog() != DialogResult.OK)
                return;
            newStream.Name = nop.ObjectName;
            provider.Streams.Add(newStream);
            treeView1.SelectedNode.Nodes.Add(_database.GenerateObjectDatabaseTag<EditorItem>(provider, newStream));
            //RefreshTree(null);
        }
Esempio n. 2
0
 private void streamEmbedToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var embed = new StreamEmbed();
     var nop = new NewObject(embed);
     if (nop.ShowDialog() != DialogResult.OK)
         return;
     embed.Name = nop.ObjectName;
     _database.StreamEmbeds.Add(embed);
     treeView1.Nodes["StreamEmbeds"].Nodes.Add(new TreeNode(embed.Name, 3, 3) {
         Tag = embed
     });
     //RefreshTree(null);
 }