📄 newproject.cs
字号:
this.treeView1.Size = new Size(0xa3, 0xb6);
this.treeView1.TabIndex = 0;
this.panel1.Controls.Add(this.listView1);
this.panel1.Location = new Point(0xb5, 30);
this.panel1.Name = "panel1";
this.panel1.Size = new Size(0x17b, 0xb6);
this.panel1.TabIndex = 1;
this.listView1.Dock = DockStyle.Fill;
this.listView1.Location = new Point(0, 0);
this.listView1.Name = "listView1";
this.listView1.Size = new Size(0x17b, 0xb6);
this.listView1.TabIndex = 0;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.SelectedIndexChanged += new EventHandler(this.listView1_SelectedIndexChanged);
this.label1.AutoSize = true;
this.label1.Location = new Point(13, 13);
this.label1.Name = "label1";
this.label1.Size = new Size(0x53, 12);
this.label1.TabIndex = 2;
this.label1.Text = "项目类型(&P):";
this.label3.AutoSize = true;
this.label3.Location = new Point(0xb3, 13);
this.label3.Name = "label3";
this.label3.Size = new Size(0x3b, 12);
this.label3.TabIndex = 2;
this.label3.Text = "模板(&T):";
this.lblTooltip.Location = new Point(12, 0xd7);
this.lblTooltip.Name = "lblTooltip";
this.lblTooltip.ReadOnly = true;
this.lblTooltip.Size = new Size(0x224, 0x15);
this.lblTooltip.TabIndex = 3;
this.groupBox1.Location = new Point(12, 0x134);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new Size(0x224, 4);
this.groupBox1.TabIndex = 10;
this.groupBox1.TabStop = false;
this.label2.AutoSize = true;
this.label2.Location = new Point(10, 0xf9);
this.label2.Name = "label2";
this.label2.Size = new Size(0x3b, 12);
this.label2.TabIndex = 11;
this.label2.Text = "名称(&N):";
this.label4.AutoSize = true;
this.label4.Location = new Point(10, 0x113);
this.label4.Name = "label4";
this.label4.Size = new Size(0x3b, 12);
this.label4.TabIndex = 12;
this.label4.Text = "位置(&L):";
this.txtProName.Location = new Point(0x63, 0xf4);
this.txtProName.Name = "txtProName";
this.txtProName.Size = new Size(0x17f, 0x15);
this.txtProName.TabIndex = 13;
this.txtProName.Text = "CodematicDemo";
this.txtProPath.Location = new Point(0x63, 0x10f);
this.txtProPath.Name = "txtProPath";
this.txtProPath.Size = new Size(0x17f, 0x15);
this.txtProPath.TabIndex = 14;
this.btn_browser.Location = new Point(0x1e8, 0x10f);
this.btn_browser.Name = "btn_browser";
this.btn_browser.Size = new Size(0x4b, 0x17);
this.btn_browser.TabIndex = 15;
this.btn_browser.Text = "浏览(&B)...";
this.btn_browser.UseVisualStyleBackColor = true;
this.btn_browser.Click += new EventHandler(this.btn_browser_Click);
this.button2.Location = new Point(0x1e5, 0x141);
this.button2.Name = "button2";
this.button2.Size = new Size(0x4b, 0x17);
this.button2.TabIndex = 0x10;
this.button2.Text = "取消";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new EventHandler(this.button2_Click);
this.btn_ok.Location = new Point(0x189, 0x141);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new Size(0x4b, 0x17);
this.btn_ok.TabIndex = 0x10;
this.btn_ok.Text = "下一步 >";
this.btn_ok.UseVisualStyleBackColor = true;
this.btn_ok.Click += new EventHandler(this.btn_ok_Click);
this.imageList1.ImageStream = (ImageListStreamer) manager.GetObject("imageList1.ImageStream");
this.imageList1.TransparentColor = Color.Transparent;
this.imageList1.Images.SetKeyName(0, "one.gif");
this.imageList1.Images.SetKeyName(1, "s3.gif");
this.imageList1.Images.SetKeyName(2, "f3.gif");
base.AutoScaleDimensions = new SizeF(6f, 12f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(0x23c, 0x164);
base.Controls.Add(this.btn_ok);
base.Controls.Add(this.button2);
base.Controls.Add(this.btn_browser);
base.Controls.Add(this.txtProPath);
base.Controls.Add(this.txtProName);
base.Controls.Add(this.label4);
base.Controls.Add(this.label2);
base.Controls.Add(this.groupBox1);
base.Controls.Add(this.lblTooltip);
base.Controls.Add(this.label3);
base.Controls.Add(this.label1);
base.Controls.Add(this.panel1);
base.Controls.Add(this.treeView1);
base.FormBorderStyle = FormBorderStyle.FixedDialog;
base.HelpButton = true;
base.Icon = (Icon) manager.GetObject("$this.Icon");
base.MaximizeBox = false;
base.MinimizeBox = false;
base.Name = "NewProject";
base.ShowIcon = false;
base.StartPosition = FormStartPosition.CenterScreen;
this.Text = "新建项目";
base.TopMost = true;
base.Load += new EventHandler(this.NewProject_Load);
this.panel1.ResumeLayout(false);
base.ResumeLayout(false);
base.PerformLayout();
}
private void InitListView()
{
this.listView1.Columns.Clear();
this.listView1.Items.Clear();
this.listView1.LargeImageList = this.imageList1;
this.listView1.View = View.LargeIcon;
this.listView1.HideSelection = false;
ListViewGroup group = new ListViewGroup("Codematic 已安装的模版", HorizontalAlignment.Left);
group.Header = "Codematic 已安装的模版";
group.Name = "listViewGroup1";
this.listView1.Groups.AddRange(new ListViewGroup[] { group });
string text = "单类结构";
ListViewItem item = new ListViewItem(text, 0);
item.SubItems.Add(text);
item.ImageIndex = 0;
item.Group = group;
this.listView1.Items.AddRange(new ListViewItem[] { item });
text = "简单三层";
ListViewItem item2 = new ListViewItem(text, 0);
item2.SubItems.Add(text);
item2.ImageIndex = 1;
item2.Group = group;
this.listView1.Items.AddRange(new ListViewItem[] { item2 });
text = "工厂模式结构";
ListViewItem item3 = new ListViewItem(text, 0);
item3.SubItems.Add(text);
item3.ImageIndex = 2;
item3.Group = group;
this.listView1.Items.AddRange(new ListViewItem[] { item3 });
item2.Focused = true;
item2.Selected = true;
}
private void InitTreeView()
{
TreeNode node = new TreeNode("常规", 0, 1);
this.treeView1.Nodes.Add(node);
}
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
string str2;
if ((this.listView1.SelectedItems.Count >= 1) && ((str2 = this.listView1.SelectedItems[0].Text) != null))
{
if (!(str2 == "单类结构"))
{
if (!(str2 == "简单三层"))
{
if (str2 == "工厂模式结构")
{
this.lblTooltip.Text = "创建工厂模式结构的项目";
this.btn_ok.Enabled = true;
}
}
else
{
this.lblTooltip.Text = "创建简单三层的项目";
this.btn_ok.Enabled = true;
}
}
else
{
this.lblTooltip.Text = "创建单类结构的项目";
this.btn_ok.Enabled = false;
}
}
}
private void NewProject_Load(object sender, EventArgs e)
{
if (File.Exists(this.cmcfgfile))
{
this.cfgfile = new INIFile(this.cmcfgfile);
string str = this.cfgfile.IniReadValue("Project", "lastpath");
if (str.Trim() != "")
{
this.txtProPath.Text = str;
}
}
}
private void ThreadWork()
{
this.CopyDirectory(this.folder1, this.folder2);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -