/// <summary> /// Drop /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dropJavascriptToolStripMenuItem_Click(object sender, EventArgs e) { var strPath = RuntimeMongoDbContext.SelectTagData; var strCollection = strPath.Split("/".ToCharArray())[(int)EnumMgr.PathLevel.Collection + 1]; var result = Operater.DelJavascript(strCollection); if (string.IsNullOrEmpty(result)) { var strNodeData = RuntimeMongoDbContext.SelectTagData; //if (MultiTabManger.TabInfo.ContainsKey(strNodeData)) //{ // var dataTab = MultiTabManger.TabInfo[strNodeData].Tab; // foreach (ToolStripMenuItem item in JavaScriptStripMenuItem.DropDownItems) // { // if (item.Tag != dataTab.Tag) // continue; // JavaScriptStripMenuItem.DropDownItems.Remove(item); // break; // } // tabView.Controls.Remove(dataTab); // MultiTabManger.RemoveTabInfo(strNodeData); //} trvsrvlst.SelectedNode.Parent.Nodes.Remove(trvsrvlst.SelectedNode); DisableAllOpr(); } else { MyMessageBox.ShowMessage("Delete Error", "A error is happened when delete javascript", result, true); } }
/// <summary> /// Drop /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dropJavascriptToolStripMenuItem_Click(object sender, EventArgs e) { var strPath = RuntimeMongoDbContext.SelectTagData; var strCollection = strPath.Split("/".ToCharArray())[(int)EnumMgr.PathLevel.CollectionAndView + 1]; var result = Operater.DelJavascript(strCollection); if (string.IsNullOrEmpty(result)) { var strNodeData = RuntimeMongoDbContext.SelectTagData; trvsrvlst.SelectedNode.Parent.Nodes.Remove(trvsrvlst.SelectedNode); DisableAllOpr(); } else { MyMessageBox.ShowMessage("Delete Error", "A error is happened when delete javascript", result, true); } }