⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 codeexport.cs

📁 通过数据库结构自动 生成三层结构代码,相当不错的一款软件
💻 CS
📖 第 1 页 / 共 4 页
字号:
            }
            str14 = str12 + @"\" + this.cb.ModelName + @"\Modify.aspx";
            str15 = str12 + @"\" + this.cb.ModelName + @"\Modify.aspx.cs";
            str16 = str12 + @"\" + this.cb.ModelName + @"\Modify.aspx.designer.cs";
            path = Application.StartupPath + @"\Template\web\Modify.aspx";
            str18 = Application.StartupPath + @"\Template\web\Modify.aspx.cs";
            str19 = Application.StartupPath + @"\Template\web\Modify.aspx.designer.cs";
            if (File.Exists(path))
            {
                using (StreamReader reader4 = new StreamReader(path, Encoding.Default))
                {
                    string updateAspx = this.cb.GetUpdateAspx();
                    str13 = reader4.ReadToEnd().Replace(".Demo.Modify", "." + this.cb.ModelName + ".Modify").Replace("<$$ModifyAspx$$>", updateAspx);
                    reader4.Close();
                }
                this.WriteFile(str14, str13);
            }
            if (File.Exists(str18))
            {
                using (StreamReader reader5 = new StreamReader(str18, Encoding.Default))
                {
                    string updateAspxCs = this.cb.GetUpdateAspxCs();
                    str13 = reader5.ReadToEnd().Replace(".Demo", "." + this.cb.ModelName).Replace("<$$ModifyAspxCs$$>", updateAspxCs);
                    reader5.Close();
                }
                this.WriteFile(str15, str13);
            }
            if (File.Exists(str19))
            {
                using (StreamReader reader6 = new StreamReader(str19, Encoding.Default))
                {
                    string updateDesigner = this.cb.GetUpdateDesigner();
                    str13 = reader6.ReadToEnd().Replace(".Demo", "." + this.cb.ModelName).Replace("<$$ModifyDesigner$$>", updateDesigner);
                    reader6.Close();
                }
                this.WriteFile(str16, str13);
            }
            str14 = str12 + @"\" + this.cb.ModelName + @"\Show.aspx";
            str15 = str12 + @"\" + this.cb.ModelName + @"\Show.aspx.cs";
            str16 = str12 + @"\" + this.cb.ModelName + @"\Show.aspx.designer.cs";
            path = Application.StartupPath + @"\Template\web\Show.aspx";
            str18 = Application.StartupPath + @"\Template\web\Show.aspx.cs";
            str19 = Application.StartupPath + @"\Template\web\Show.aspx.designer.cs";
            if (File.Exists(path))
            {
                using (StreamReader reader7 = new StreamReader(path, Encoding.Default))
                {
                    string showAspx = this.cb.GetShowAspx();
                    str13 = reader7.ReadToEnd().Replace(".Demo.Show", "." + this.cb.ModelName + ".Show").Replace("<$$ShowAspx$$>", showAspx);
                    reader7.Close();
                }
                this.WriteFile(str14, str13);
            }
            if (File.Exists(str18))
            {
                using (StreamReader reader8 = new StreamReader(str18, Encoding.Default))
                {
                    string showAspxCs = this.cb.GetShowAspxCs();
                    str13 = reader8.ReadToEnd().Replace(".Demo", "." + this.cb.ModelName).Replace("<$$ShowAspxCs$$>", showAspxCs);
                    reader8.Close();
                }
                this.WriteFile(str15, str13);
            }
            if (File.Exists(str19))
            {
                using (StreamReader reader9 = new StreamReader(str19, Encoding.Default))
                {
                    string showDesigner = this.cb.GetShowDesigner();
                    str13 = reader9.ReadToEnd().Replace(".Demo", "." + this.cb.ModelName).Replace("<$$ShowDesigner$$>", showDesigner);
                    reader9.Close();
                }
                this.WriteFile(str16, str13);
            }
            this.CheckDirectory(text);
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void FolderCheck(string Folder)
        {
            DirectoryInfo info = new DirectoryInfo(Folder);
            if (!info.Exists)
            {
                info.Create();
            }
        }

        private string GetBLLType()
        {
            string appGuid = "";
            appGuid = this.cm_blltype.AppGuid;
            if ((appGuid == "") && (appGuid == "System.Data.DataRowView"))
            {
                MessageBox.Show("选择的数据层类型有误,请关闭后重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return "";
            }
            return appGuid;
        }

        private string GetDALType()
        {
            string appGuid = "";
            appGuid = this.cm_daltype.AppGuid;
            if ((appGuid == "") && (appGuid == "System.Data.DataRowView"))
            {
                MessageBox.Show("选择的数据层类型有误,请关闭后重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return "";
            }
            return appGuid;
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(CodeExport));
            this.btn_Export = new ButtonXP();
            this.groupBox2 = new GroupBox();
            this.btn_Addlist = new Button();
            this.btn_Add = new Button();
            this.btn_Del = new Button();
            this.btn_Dellist = new Button();
            this.listTable2 = new ListBox();
            this.listTable1 = new ListBox();
            this.progressBar1 = new ProgressBar();
            this.labelNum = new Label();
            this.groupBox1 = new GroupBox();
            this.cmbDB = new ComboBox();
            this.lblServer = new Label();
            this.label1 = new Label();
            this.label3 = new Label();
            this.btn_Cancle = new ButtonXP();
            this.groupBox3 = new GroupBox();
            this.pictureBox1 = new PictureBox();
            this.txtTargetFolder = new TextBox();
            this.label2 = new Label();
            this.btn_TargetFold = new ButtonXP();
            this.groupBox4 = new GroupBox();
            this.label8 = new Label();
            this.txtTabNamepre = new TextBox();
            this.label7 = new Label();
            this.txtDbHelper = new TextBox();
            this.label6 = new Label();
            this.txtNamespace = new TextBox();
            this.label4 = new Label();
            this.txtFolder = new TextBox();
            this.label5 = new Label();
            this.groupBox5 = new GroupBox();
            this.groupBox6 = new GroupBox();
            this.radBtn_One = new RadioButton();
            this.radBtn_F3 = new RadioButton();
            this.radBtn_S3 = new RadioButton();
            this.groupBox2.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.groupBox3.SuspendLayout();
            ((ISupportInitialize) this.pictureBox1).BeginInit();
            this.groupBox4.SuspendLayout();
            this.groupBox6.SuspendLayout();
            base.SuspendLayout();
            this.btn_Export._Image = null;
            this.btn_Export.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btn_Export.BackColor = Color.FromArgb(0, 0xec, 0xe9, 0xd8);
            this.btn_Export.DefaultScheme = false;
            this.btn_Export.DialogResult = DialogResult.None;
            this.btn_Export.Image = null;
            this.btn_Export.Location = new Point(0x173, 0x1c5);
            this.btn_Export.Name = "btn_Export";
            this.btn_Export.Scheme = ButtonXP.Schemes.Blue;
            this.btn_Export.Size = new Size(0x4b, 0x1a);
            this.btn_Export.TabIndex = 0x2e;
            this.btn_Export.Text = "导  出";
            this.btn_Export.Click += new EventHandler(this.btn_Export_Click);
            this.groupBox2.Controls.Add(this.btn_Addlist);
            this.groupBox2.Controls.Add(this.btn_Add);
            this.groupBox2.Controls.Add(this.btn_Del);
            this.groupBox2.Controls.Add(this.btn_Dellist);
            this.groupBox2.Controls.Add(this.listTable2);
            this.groupBox2.Controls.Add(this.listTable1);
            this.groupBox2.Location = new Point(8, 0x38);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new Size(0x250, 0x8b);
            this.groupBox2.TabIndex = 0x2c;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "选择表";
            this.btn_Addlist.Enabled = false;
            this.btn_Addlist.FlatStyle = FlatStyle.Popup;
            this.btn_Addlist.Location = new Point(0x113, 20);
            this.btn_Addlist.Name = "btn_Addlist";
            this.btn_Addlist.Size = new Size(40, 0x17);
            this.btn_Addlist.TabIndex = 7;
            this.btn_Addlist.Text = ">>";
            this.btn_Addlist.Click += new EventHandler(this.btn_Addlist_Click);
            this.btn_Add.Enabled = false;
            this.btn_Add.FlatStyle = FlatStyle.Popup;
            this.btn_Add.Location = new Point(0x113, 0x30);
            this.btn_Add.Name = "btn_Add";
            this.btn_Add.Size = new Size(40, 0x17);
            this.btn_Add.TabIndex = 8;
            this.btn_Add.Text = ">";
            this.btn_Add.Click += new EventHandler(this.btn_Add_Click);
            this.btn_Del.Enabled = false;
            this.btn_Del.FlatStyle = FlatStyle.Popup;
            this.btn_Del.Location = new Point(0x113, 0x4c);
            this.btn_Del.Name = "btn_Del";
            this.btn_Del.Size = new Size(40, 0x17);
            this.btn_Del.TabIndex = 5;
            this.btn_Del.Text = "<";
            this.btn_Del.Click += new EventHandler(this.btn_Del_Click);
            this.btn_Dellist.Enabled = false;
            this.btn_Dellist.FlatStyle = FlatStyle.Popup;
            this.btn_Dellist.Location = new Point(0x113, 0x68);
            this.btn_Dellist.Name = "btn_Dellist";
            this.btn_Dellist.Size = new Size(40, 0x17);
            this.btn_Dellist.TabIndex = 6;
            this.btn_Dellist.Text = "<<";
            this.btn_Dellist.Click += new EventHandler(this.btn_Dellist_Click);
            this.listTable2.ItemHeight = 12;
            this.listTable2.Location = new Point(0x164, 20);
            this.listTable2.Name = "listTable2";
            this.listTable2.SelectionMode = SelectionMode.MultiExtended;
            this.listTable2.Size = new Size(0xda, 0x70);
            this.listTable2.TabIndex = 1;
            this.listTable2.DoubleClick += new EventHandler(this.listTable2_DoubleClick);
            this.listTable1.ItemHeight = 12;
            this.listTable1.Location = new Point(0x10, 20);
            this.listTable1.Name = "listTable1";
            this.listTable1.SelectionMode = SelectionMode.MultiExtended;
            this.listTable1.Size = new Size(0xda, 0x70);
            this.listTable1.TabIndex = 0;
            this.listTable1.DoubleClick += new EventHandler(this.listTable1_DoubleClick);
            this.progressBar1.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
            this.progressBar1.Location = new Point(8, 0x1e6);
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new Size(0x250, 0x12);
            this.progressBar1.TabIndex = 10;
            this.labelNum.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            this.labelNum.Location = new Point(0x18, 460);
            this.labelNum.Name = "labelNum";
            this.labelNum.Size = new Size(0x2e, 0x16);
            this.labelNum.TabIndex = 9;
            this.labelNum.TextAlign = ContentAlignment.MiddleCenter;
            this.groupBox1.Controls.Add(this.cmbDB);
            this.groupBox1.Controls.Add(this.lblServer);
            this.groupBox1.Controls.Add(this.label1);
            this.groupBox1.Controls.Add(this.label3);
            this.groupBox1.Location = new Point(8, 7);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(0x250, 0x2f);
            this.groupBox1.TabIndex = 0x2b;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "选择数据库";
            this.cmbDB.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cmbDB.Location = new Point(0x187, 20);
            this.cmbDB.Name = "cmbDB";
            this.cmbDB.Size = new Size(0x98, 20);
            this.cmbDB.TabIndex = 2;
            this.cmbDB.SelectedIndexChanged += new EventHandler(this.cmbDB_SelectedIndexChanged);
            this.lblServer.AutoSize = true;
            this.lblServer.Location = new Point(0x68, 0x16);
            this.lblServer.Name = "lblServer";
            this.lblServer.Size = new Size(0x29, 12);
            this.lblServer.TabIndex = 1;
            this.lblServer.Text = "label2";
            this.label1.AutoSize = true;
            this.label1.Location = new Point(0x10, 0x16);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x4d, 12);
            this.label1.TabIndex = 0;
            this.label1.Text = "当前服务器:";
            this.label3.AutoSize = true;
            this.label3.Location = new Point(0x137, 0x16);
            this.label3.Name = "label3";
            this.label3.Size = new Size(0x4d, 12);
            this.label3.TabIndex = 0;
            this.label3.Text = "选择数据库:";
            this.btn_Cancle._Image = null;
            this.btn_Cancle.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btn_Cancle.BackColor = Color.FromArgb(0, 0xec, 0xe9, 0xd8);
            this.btn_Cancle.DefaultScheme = false;
            this.btn_Cancle.DialogResult = DialogResult.None;
            this.btn_Cancle.Image = null;
            this.btn_Cancle.Location = new Point(0x1db, 0x1c5);
            this.btn_Cancle.Name = "btn_Cancle";
            this.btn_Cancle.Scheme = ButtonXP.Schemes.Blue;
            this.btn_Cancle.Size = new Size(0x4b, 0x1a);
            this.btn_Cancle.TabIndex = 0x2d;
            this.btn_Cancle.Text = "取  消";
            this.btn_Cancle.Click += new EventHandler(this.btn_Cancle_Click);
            this.groupBox3.Controls.Add(this.pictureBox1);
            this.groupBox3.Controls.Add(this.txtTargetFolder);
            this.groupBox3.Controls.Add(this.label2);
            this.groupBox3.Controls.Add(this.btn_TargetFold);
            this.groupBox3.Location = new Point(8, 0x189);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new Size(0x250, 50);
            this.groupBox3.TabIndex = 0x2f;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "保存位置";
            this.pictureBox1.Image = Resources.Control;
            this.pictureBox1.Location = new Point(10, 15);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new Size(0x1c, 0x1c);
            this.pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
            this.pictureBox1.TabIndex = 0x35;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.Visible = false;
            this.txtTargetFolder.BorderStyle = BorderStyle.FixedSingle;
            this.txtTargetFolder.Location = new Point(0x68, 0x12);
            this.txtTargetFolder.Name = "txtTargetFolder";
            this.txtTargetFolder.Size = new Size(0x18b, 0x15);
            this.txtTargetFolder.TabIndex = 0x2d;
            this.label2.AutoSize = true;
            this.label2.Location = new Point(40, 0x16);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x41, 12);
            this.label2.TabIndex = 0x2c;
            this.label2.Text = "输出目录:";
            this.btn_TargetFold._Image = null;
            this.btn_TargetFold.BackColor = Color.FromArgb(0, 0xec, 0xe9, 0xd8);
            this.btn_TargetFold.DefaultScheme = false;
            this.btn_TargetFold.DialogResult = DialogResult.None;
            this.btn_TargetFold.Image = null;
            this.btn_TargetFold.Location = new Point(0x1f9, 0x11);
            this.btn_TargetFold.Name = "btn_TargetFold";
            this.btn_TargetFold.Scheme = ButtonXP.Schemes.Blue;
            this.btn_TargetFold.Size = new Size(0x39, 0x17);
            this.btn_TargetFold.TabIndex = 0x2e;
            this.btn_TargetFold.Text = "选择...";
            this.btn_TargetFold.Click += new EventHandler(this.btn_TargetFold_Click);
            this.groupBox4.Controls.Add(this.label8);
            this.groupBox4.Controls.Add(this.txtTabNamepre);
            this.groupBox4.Controls.Add(this.label7);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -