private void tmiCloseJsonFile_Click(object sender, EventArgs e) { selectedTable = null; selectedLine = null; selectedColumn = null; RefreshPnlFileInfoUI(); RefreshPnlMainUI(); RefreshLibLinesUI(); }
private void tmiOpenJsonFile_Click(object sender, EventArgs e) { selectedTable = tables[trvJsonFiles.SelectedNode.Tag.ToString()]; selectedLine = null; selectedColumn = null; RefreshPnlFileInfoUI(); RefreshPnlMainUI(); RefreshLibLinesUI(); }
private void tmiCloseAllJsonFiles_Click(object sender, EventArgs e) { tables = null; if (jfi != null) { jfi.Dispose(); } rootNode = null; selectedColumn = null; selectedTable = null; selectedLine = null; RefreshJsonFilesUI(); RefreshPnlFileInfoUI(); RefreshLibLinesUI(); RefreshPnlMainUI(); sslMain.Text = ""; }
private void trvJsonFiles_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Node == rootNode) { } else if (e.Node.Parent == rootNode) { selectedColumn = null; RefreshPnlFileInfoUI(); if (e.Button == MouseButtons.Right) { trvJsonFiles.SelectedNode = e.Node; if (selectedTable == tables[e.Node.Tag.ToString()]) { tmiOpenJsonFile.Enabled = false; tmiCloseJsonFile.Enabled = true; } else { tmiOpenJsonFile.Enabled = true; tmiCloseJsonFile.Enabled = false; } trvJsonFiles.ContextMenuStrip = cmsJsonFilesSelected; } } else { selectedColumn = tables[e.Node.Parent.Tag.ToString()].Columns.Find(t => t.Name == e.Node.Tag.ToString()); RefreshPnlFileInfoUI(); if (e.Button == MouseButtons.Right) { trvJsonFiles.ContextMenuStrip = null; } } }
private string GetColumnNodeString(JColumn jc) { return(jc.IsKey ? $"{jc.Name}[Key]:{jc.Type}" : $"{jc.Name}:{jc.Type}"); }