コード例 #1
0
        public void ShowCodeDir()
        {
            List <TreeNode> Nodes = Form1.form_Database.GetTreeView1Selected();

            if (Nodes.Count == 0)
            {
                var selNode = Form1.form_Database.treeView1.SelectedNode;
                if (selNode == null || (((Model.TreeNodeTag)selNode.Tag).Type != Model.TreeNodeType.Table && ((Model.TreeNodeTag)selNode.Tag).Type != Model.TreeNodeType.View))
                {
                    MessageBox.Show("请选择要生成代码的表或视图!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Form1.Instance.ShowServerList();
                    return;
                }
                else
                {
                    Nodes.Add(selNode);
                }
            }
            Form_Code_SetDir fcsd = new Form_Code_SetDir();

            fcsd.ShowDialog();
        }
コード例 #2
0
 public void ShowCodeDir()
 {
     List<TreeNode> Nodes = Form1.form_Database.GetTreeView1Selected();
     if (Nodes.Count == 0)
     {
         var selNode = Form1.form_Database.treeView1.SelectedNode;
         if (selNode == null || (((Model.TreeNodeTag)selNode.Tag).Type != Model.TreeNodeType.Table && ((Model.TreeNodeTag)selNode.Tag).Type != Model.TreeNodeType.View))
         {
             MessageBox.Show("请选择要生成代码的表或视图!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             Form1.Instance.ShowServerList();
             return;
         }
         else
         {
             Nodes.Add(selNode);
         }
     }
     Form_Code_SetDir fcsd = new Form_Code_SetDir();
     fcsd.ShowDialog();
 }