Esempio n. 1
0
        private void OnNewItemClick(object sender, System.EventArgs e)
        {
            var dlg = new NewContentDialog(_controller.Templates, EditorIcons.Templates);

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                var template = dlg.Selected;
                var location = ((_treeView.SelectedNode ?? _treeView.Nodes[0]).Tag as IProjectItem).Location;

                // Ensure name is unique among files at this location?
                _controller.NewItem(dlg.NameGiven, location, template);
            }
        }
Esempio n. 2
0
        private void OnNewItemClick(object sender, System.EventArgs e)
        {
            var dlg = new NewContentDialog(_controller.Templates, EditorIcons.Templates);
            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                var template = dlg.Selected;
                var location = ((_treeView.SelectedNode ?? _treeView.Nodes[0]).Tag as IProjectItem).Location;

                // Ensure name is unique among files at this location?
                _controller.NewItem(dlg.NameGiven, location, template);
            }
        }
Esempio n. 3
0
 private void OnNewItemClick(object sender, System.EventArgs e)
 {
     var dlg = new NewContentDialog(_controller.Templates);
     if (dlg.ShowDialog(this) == DialogResult.OK)
     {
         var template = dlg.SelectedTemplate;
         var location = ((_treeView.SelectedNode ?? _treeView.Nodes[0]).Tag as IProjectItem).Location;
         _controller.NewItem(dlg.ContentName, location, template);
     }
 }