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

📄 ucaddinmanage.cs

📁 通过数据库结构自动 生成三层结构代码,相当不错的一款软件
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.label4 = new Label();
            this.label3 = new Label();
            this.label2 = new Label();
            this.label1 = new Label();
            this.tabPage_List = new TabPage();
            this.listView1 = new ListView();
            this.contextMenu1 = new ContextMenu();
            this.menu_ShowMain = new MenuItem();
            this.tabPage_Code = new TabPage();
            this.tabControlAddIn.SuspendLayout();
            this.tabPage_Add.SuspendLayout();
            this.tabPage_List.SuspendLayout();
            base.SuspendLayout();
            this.tabControlAddIn.Controls.Add(this.tabPage_Add);
            this.tabControlAddIn.Controls.Add(this.tabPage_List);
            this.tabControlAddIn.Controls.Add(this.tabPage_Code);
            this.tabControlAddIn.Dock = DockStyle.Fill;
            this.tabControlAddIn.Location = new Point(0, 0);
            this.tabControlAddIn.Name = "tabControlAddIn";
            this.tabControlAddIn.SelectedIndex = 0;
            this.tabControlAddIn.Size = new Size(0x170, 0x10b);
            this.tabControlAddIn.TabIndex = 0;
            this.tabPage_Add.Controls.Add(this.btnBrow);
            this.tabPage_Add.Controls.Add(this.btn_Add);
            this.tabPage_Add.Controls.Add(this.txtFile);
            this.tabPage_Add.Controls.Add(this.txtVersion);
            this.tabPage_Add.Controls.Add(this.txtClassname);
            this.tabPage_Add.Controls.Add(this.txtAssembly);
            this.tabPage_Add.Controls.Add(this.txtDecr);
            this.tabPage_Add.Controls.Add(this.txtName);
            this.tabPage_Add.Controls.Add(this.label6);
            this.tabPage_Add.Controls.Add(this.label5);
            this.tabPage_Add.Controls.Add(this.label4);
            this.tabPage_Add.Controls.Add(this.label3);
            this.tabPage_Add.Controls.Add(this.label2);
            this.tabPage_Add.Controls.Add(this.label1);
            this.tabPage_Add.Location = new Point(4, 0x15);
            this.tabPage_Add.Name = "tabPage_Add";
            this.tabPage_Add.Padding = new Padding(3);
            this.tabPage_Add.Size = new Size(360, 0xf2);
            this.tabPage_Add.TabIndex = 1;
            this.tabPage_Add.Text = "增加组件";
            this.tabPage_Add.UseVisualStyleBackColor = true;
            this.btnBrow.Location = new Point(0x10c, 0x10);
            this.btnBrow.Name = "btnBrow";
            this.btnBrow.Size = new Size(0x21, 0x17);
            this.btnBrow.TabIndex = 3;
            this.btnBrow.Text = "...";
            this.btnBrow.UseVisualStyleBackColor = true;
            this.btnBrow.Click += new EventHandler(this.btnBrow_Click);
            this.btn_Add.Location = new Point(0x53, 0xaf);
            this.btn_Add.Name = "btn_Add";
            this.btn_Add.Size = new Size(0x4b, 0x17);
            this.btn_Add.TabIndex = 2;
            this.btn_Add.Text = "添加";
            this.btn_Add.UseVisualStyleBackColor = true;
            this.btn_Add.Click += new EventHandler(this.btn_Add_Click);
            this.txtFile.Location = new Point(0x53, 0x12);
            this.txtFile.Name = "txtFile";
            this.txtFile.Size = new Size(0xb6, 0x15);
            this.txtFile.TabIndex = 1;
            this.txtVersion.Location = new Point(0x53, 0x8f);
            this.txtVersion.Name = "txtVersion";
            this.txtVersion.Size = new Size(0xb6, 0x15);
            this.txtVersion.TabIndex = 1;
            this.txtClassname.Location = new Point(0x53, 0x76);
            this.txtClassname.Name = "txtClassname";
            this.txtClassname.Size = new Size(0xb6, 0x15);
            this.txtClassname.TabIndex = 1;
            this.txtAssembly.Location = new Point(0x53, 0x5d);
            this.txtAssembly.Name = "txtAssembly";
            this.txtAssembly.Size = new Size(0xb6, 0x15);
            this.txtAssembly.TabIndex = 1;
            this.txtDecr.Location = new Point(0x53, 0x44);
            this.txtDecr.Name = "txtDecr";
            this.txtDecr.Size = new Size(0xb6, 0x15);
            this.txtDecr.TabIndex = 1;
            this.txtName.Location = new Point(0x53, 0x2b);
            this.txtName.Name = "txtName";
            this.txtName.Size = new Size(0xb6, 0x15);
            this.txtName.TabIndex = 1;
            this.label6.AutoSize = true;
            this.label6.Location = new Point(12, 0x15);
            this.label6.Name = "label6";
            this.label6.Size = new Size(0x41, 12);
            this.label6.TabIndex = 0;
            this.label6.Text = "选择文件:";
            this.label5.AutoSize = true;
            this.label5.Location = new Point(0x24, 0x92);
            this.label5.Name = "label5";
            this.label5.Size = new Size(0x29, 12);
            this.label5.TabIndex = 0;
            this.label5.Text = "版本:";
            this.label4.AutoSize = true;
            this.label4.Location = new Point(0x24, 0x79);
            this.label4.Name = "label4";
            this.label4.Size = new Size(0x29, 12);
            this.label4.TabIndex = 0;
            this.label4.Text = "类名:";
            this.label3.AutoSize = true;
            this.label3.Location = new Point(0x18, 0x60);
            this.label3.Name = "label3";
            this.label3.Size = new Size(0x35, 12);
            this.label3.TabIndex = 0;
            this.label3.Text = "程序集:";
            this.label2.AutoSize = true;
            this.label2.Location = new Point(0x24, 0x47);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x29, 12);
            this.label2.TabIndex = 0;
            this.label2.Text = "说明:";
            this.label1.AutoSize = true;
            this.label1.Location = new Point(0x24, 0x2e);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x29, 12);
            this.label1.TabIndex = 0;
            this.label1.Text = "名称:";
            this.tabPage_List.Controls.Add(this.listView1);
            this.tabPage_List.Location = new Point(4, 0x15);
            this.tabPage_List.Name = "tabPage_List";
            this.tabPage_List.Padding = new Padding(3);
            this.tabPage_List.Size = new Size(360, 0xf2);
            this.tabPage_List.TabIndex = 0;
            this.tabPage_List.Text = "组件列表";
            this.tabPage_List.UseVisualStyleBackColor = true;
            this.listView1.ContextMenu = this.contextMenu1;
            this.listView1.Dock = DockStyle.Fill;
            this.listView1.Location = new Point(3, 3);
            this.listView1.Name = "listView1";
            this.listView1.Size = new Size(0x162, 0xec);
            this.listView1.TabIndex = 0;
            this.listView1.UseCompatibleStateImageBehavior = false;
            this.contextMenu1.MenuItems.AddRange(new MenuItem[] { this.menu_ShowMain });
            this.menu_ShowMain.Index = 0;
            this.menu_ShowMain.Text = "删除";
            this.menu_ShowMain.Click += new EventHandler(this.menu_ShowMain_Click);
            this.tabPage_Code.Location = new Point(4, 0x15);
            this.tabPage_Code.Name = "tabPage_Code";
            this.tabPage_Code.Size = new Size(360, 0xf2);
            this.tabPage_Code.TabIndex = 2;
            this.tabPage_Code.Text = "编辑文件";
            this.tabPage_Code.UseVisualStyleBackColor = true;
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.tabControlAddIn);
            base.Name = "UcAddInManage";
            base.Size = new Size(0x170, 0x10b);
            this.tabControlAddIn.ResumeLayout(false);
            this.tabPage_Add.ResumeLayout(false);
            this.tabPage_Add.PerformLayout();
            this.tabPage_List.ResumeLayout(false);
            base.ResumeLayout(false);
        }

        private bool IsValidPlugin(System.Type t)
        {
            foreach (System.Type type in t.GetInterfaces())
            {
                if (((type.FullName == "LTP.IBuilder.IBuilderDAL") || (type.FullName == "LTP.IBuilder.IBuilderDALTran")) || (type.FullName == "LTP.IBuilder.IBuilderBLL"))
                {
                    return true;
                }
            }
            return false;
        }

        private void LoadAddinFile()
        {
            string strContent = this.addin.LoadFile();
            this.codeview.SettxtContent("XML", strContent);
        }

        private void menu_ShowMain_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.listView1.SelectedItems.Count < 1)
                {
                    MessageBox.Show(this, "请先选择数据项!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                else
                {
                    int num = 0;
                    foreach (ListViewItem item in this.listView1.SelectedItems)
                    {
                        string text = item.SubItems[0].Text;
                        this.addin.DeleteAddIn(text);
                        this.listView1.Items.Remove(this.listView1.SelectedItems[0]);
                        num++;
                    }
                    this.BindlistView();
                    this.LoadAddinFile();
                    MessageBox.Show(this, num + "项已删除。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(this, "删除失败,请重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                LogInfo.WriteLog(exception);
            }
        }
    }
}

⌨️ 快捷键说明

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