private void Form_Code_SetText_Load(object sender, EventArgs e)
        {
            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))
            {
                var nodes = Form1.form_Database.GetTreeView1Selected();
                if (nodes.Count > 0)
                {
                    node = nodes.First();
                }
            }
            else
            {
                node = selNode;
            }

            if (node == null)
            {
                this.Close();
            }
            else
            {
                this.textBox2.Text = ((Model.TreeNodeTag)node.Tag).Tag.ToString();
                this.Text          = string.Format("生成代码至文本框--表:{0}", this.textBox2.Text);
            }
            this.label7.Text = "";
            Form.CheckForIllegalCrossThreadCalls = false;

            //加载默认命名空间
            Model.ConfigNameSpace cnsDefault = new Common.Config_NameSpace().GetDefault();
            if (cnsDefault != null)
            {
            }
        }
Example #2
0
        private void Form_Code_SetDir_Load(object sender, EventArgs e)
        {
            Form.CheckForIllegalCrossThreadCalls = false;
            this.label8.Text = "";

            //加载默认命名空间
            Model.ConfigNameSpace cnsDefault = new Common.Config_NameSpace().GetDefault();
            if (cnsDefault != null)
            {
            }

            //加载目录
            var dirDefault = new Common.Config_Directory().GetDefault();

            if (dirDefault != null)
            {
                this.textBox_dir.Text = dirDefault.Name;
            }
        }
        private void Form_Code_SetDir_Load(object sender, EventArgs e)
        {
            Form.CheckForIllegalCrossThreadCalls = false;
            this.label8.Text = "";

            //加载默认命名空间
            Model.ConfigNameSpace cnsDefault = new Common.Config_NameSpace().GetDefault();
            if (cnsDefault != null)
            {

            }

            //加载目录
            var dirDefault = new Common.Config_Directory().GetDefault();
            if (dirDefault != null)
            {
                this.textBox_dir.Text = dirDefault.Name;
            }
        }
        private void Form_Code_SetText_Load(object sender, EventArgs e)
        {
            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))
            {
                var nodes = Form1.form_Database.GetTreeView1Selected();
                if (nodes.Count > 0)
                {
                    node = nodes.First();
                }
            }
            else
            {
                node = selNode;
            }

            if (node == null)
            {
                this.Close();
            }
            else
            {
                this.textBox2.Text = ((Model.TreeNodeTag)node.Tag).Tag.ToString();
                this.Text = string.Format("生成代码至文本框--表:{0}", this.textBox2.Text);
            }
            this.label7.Text = "";
            Form.CheckForIllegalCrossThreadCalls = false;

            //加载默认命名空间
            Model.ConfigNameSpace cnsDefault = new Common.Config_NameSpace().GetDefault();
            if (cnsDefault != null)
            {

            }
        }