Esempio n. 1
0
 private void tmiCloseJsonFile_Click(object sender, EventArgs e)
 {
     selectedTable  = null;
     selectedLine   = null;
     selectedColumn = null;
     RefreshPnlFileInfoUI();
     RefreshPnlMainUI();
     RefreshLibLinesUI();
 }
Esempio n. 2
0
 private void tmiOpenJsonFile_Click(object sender, EventArgs e)
 {
     selectedTable  = tables[trvJsonFiles.SelectedNode.Tag.ToString()];
     selectedLine   = null;
     selectedColumn = null;
     RefreshPnlFileInfoUI();
     RefreshPnlMainUI();
     RefreshLibLinesUI();
 }
Esempio n. 3
0
 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 = "";
 }
Esempio n. 4
0
        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;
                }
            }
        }
Esempio n. 5
0
 private string GetColumnNodeString(JColumn jc)
 {
     return(jc.IsKey ? $"{jc.Name}[Key]:{jc.Type}" : $"{jc.Name}:{jc.Type}");
 }