예제 #1
0
        private void existingItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (solutionExplorerTreeView.SelectedItems.Count == 1)
            {
                ILuaEditDocumentGroup docGrp = solutionExplorerTreeView.SelectedItems[0].Tag as ILuaEditDocumentGroup;

                if (docGrp != null && docGrp.CanAdd())
                {
                    string title = string.Format("Add Existing Item - {0}", docGrp);
                    DocumentsManager.Instance.OpenDocuments(typeof(ILuaEditDocumentEditable), docGrp, title, Path.GetDirectoryName(docGrp.FileName));
                }
            }
        }
예제 #2
0
        private void newItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (solutionExplorerTreeView.SelectedItems.Count == 1)
            {
                ILuaEditDocumentGroup docGrp = solutionExplorerTreeView.SelectedItems[0].Tag as ILuaEditDocumentGroup;

                if (docGrp != null && docGrp.CanAdd())
                {
                    string title = string.Format("Add New Item - {0}", docGrp);
                    DocumentsManager.Instance.NewDocument(title, docGrp, LuaEdit.HelperDialogs.NewItemTypes.Item);
                }
            }
        }