📄 individuationfolder.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO ;
using System.Runtime.InteropServices;
using System.Text ;
namespace XP界面优化精灵
{
/// <summary>
/// IndividuationFolder 的摘要说明。
/// </summary>
public class IndividuationFolder : System.Windows.Forms.Form
{
GetIcon gi=new GetIcon ();
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Button bn_selectPath;
private System.Windows.Forms.TextBox tb_path;
private System.Windows.Forms.Button bn_bg;
private System.Windows.Forms.Label lb_browser;
private System.Windows.Forms.TextBox tb_foldertip;
private System.Windows.Forms.Label lb_fc;
private System.Windows.Forms.Label lb_fbc;
private System.Windows.Forms.Button bn_changeIcon;
private System.Windows.Forms.PictureBox pb_icon;
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage tp_1;
private System.Windows.Forms.Button bn_save;
private System.Windows.Forms.Button bn_revert;
//申明INI文件的写操作函数WritePrivateProfileString()
[ DllImport ( "kernel32" ) ]
private static extern long WritePrivateProfileString ( string section , string key , string val , string filePath ) ;
// //申明INI文件的读操作函数GetPrivateProfileString()
// [ DllImport ( "kernel32" ) ]
// private static extern int GetPrivateProfileString ( string section ,string key , string def , StringBuilder retVal , int size , string filePath ) ;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
string FBackGPath="";
string IcoPath="";
int IconIndex=0;
public IndividuationFolder()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(IndividuationFolder));
this.tabControl = new System.Windows.Forms.TabControl();
this.tp_1 = new System.Windows.Forms.TabPage();
this.bn_revert = new System.Windows.Forms.Button();
this.bn_save = new System.Windows.Forms.Button();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.pb_icon = new System.Windows.Forms.PictureBox();
this.bn_changeIcon = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label7 = new System.Windows.Forms.Label();
this.tb_foldertip = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.lb_fbc = new System.Windows.Forms.Label();
this.lb_fc = new System.Windows.Forms.Label();
this.lb_browser = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.bn_bg = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.bn_selectPath = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.tb_path = new System.Windows.Forms.TextBox();
this.tabControl.SuspendLayout();
this.tp_1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// tabControl
//
this.tabControl.Controls.Add(this.tp_1);
this.tabControl.Location = new System.Drawing.Point(6, 6);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(438, 456);
this.tabControl.TabIndex = 1;
//
// tp_1
//
this.tp_1.BackColor = System.Drawing.Color.White;
this.tp_1.Controls.Add(this.bn_revert);
this.tp_1.Controls.Add(this.bn_save);
this.tp_1.Controls.Add(this.groupBox4);
this.tp_1.Controls.Add(this.groupBox3);
this.tp_1.Controls.Add(this.groupBox2);
this.tp_1.Controls.Add(this.groupBox1);
this.tp_1.Location = new System.Drawing.Point(4, 21);
this.tp_1.Name = "tp_1";
this.tp_1.Size = new System.Drawing.Size(430, 431);
this.tp_1.TabIndex = 0;
this.tp_1.Text = "个性化文件夹";
//
// bn_revert
//
this.bn_revert.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.bn_revert.Location = new System.Drawing.Point(204, 382);
this.bn_revert.Name = "bn_revert";
this.bn_revert.TabIndex = 7;
this.bn_revert.Text = "还原";
this.bn_revert.Click += new System.EventHandler(this.bn_revert_Click);
//
// bn_save
//
this.bn_save.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.bn_save.Location = new System.Drawing.Point(118, 382);
this.bn_save.Name = "bn_save";
this.bn_save.TabIndex = 6;
this.bn_save.Text = "保存";
this.bn_save.Click += new System.EventHandler(this.bn_save_Click);
//
// groupBox4
//
this.groupBox4.Controls.Add(this.pb_icon);
this.groupBox4.Controls.Add(this.bn_changeIcon);
this.groupBox4.Location = new System.Drawing.Point(14, 286);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(402, 74);
this.groupBox4.TabIndex = 5;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "文件夹图标";
//
// pb_icon
//
this.pb_icon.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pb_icon.Location = new System.Drawing.Point(298, 12);
this.pb_icon.Name = "pb_icon";
this.pb_icon.Size = new System.Drawing.Size(68, 54);
this.pb_icon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pb_icon.TabIndex = 7;
this.pb_icon.TabStop = false;
//
// bn_changeIcon
//
this.bn_changeIcon.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.bn_changeIcon.Location = new System.Drawing.Point(68, 30);
this.bn_changeIcon.Name = "bn_changeIcon";
this.bn_changeIcon.Size = new System.Drawing.Size(84, 23);
this.bn_changeIcon.TabIndex = 6;
this.bn_changeIcon.Text = "更改图标...";
this.bn_changeIcon.Click += new System.EventHandler(this.bn_changeIcon_Click);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.label7);
this.groupBox3.Controls.Add(this.tb_foldertip);
this.groupBox3.Location = new System.Drawing.Point(14, 210);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(402, 66);
this.groupBox3.TabIndex = 4;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "提示信息";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 16);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(221, 17);
this.label7.TabIndex = 2;
this.label7.Text = "鼠标在文件夹上停留片刻后出现的文字:";
//
// tb_foldertip
//
this.tb_foldertip.Location = new System.Drawing.Point(12, 36);
this.tb_foldertip.Name = "tb_foldertip";
this.tb_foldertip.Size = new System.Drawing.Size(376, 21);
this.tb_foldertip.TabIndex = 3;
this.tb_foldertip.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.lb_fbc);
this.groupBox2.Controls.Add(this.lb_fc);
this.groupBox2.Controls.Add(this.lb_browser);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.bn_bg);
this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.groupBox2.Location = new System.Drawing.Point(14, 88);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(402, 112);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "文件夹设置";
//
// lb_fbc
//
this.lb_fbc.BackColor = System.Drawing.Color.White;
this.lb_fbc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lb_fbc.Location = new System.Drawing.Point(110, 76);
this.lb_fbc.Name = "lb_fbc";
this.lb_fbc.Size = new System.Drawing.Size(74, 24);
this.lb_fbc.TabIndex = 11;
this.lb_fbc.Click += new System.EventHandler(this.lb_fc_Click);
//
// lb_fc
//
this.lb_fc.BackColor = System.Drawing.Color.Black;
this.lb_fc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lb_fc.Location = new System.Drawing.Point(110, 48);
this.lb_fc.Name = "lb_fc";
this.lb_fc.Size = new System.Drawing.Size(74, 23);
this.lb_fc.TabIndex = 10;
this.lb_fc.Click += new System.EventHandler(this.lb_fc_Click);
//
// lb_browser
//
this.lb_browser.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lb_browser.Location = new System.Drawing.Point(262, 46);
this.lb_browser.Name = "lb_browser";
this.lb_browser.Size = new System.Drawing.Size(96, 28);
this.lb_browser.TabIndex = 9;
this.lb_browser.Text = "文本效果预览";
this.lb_browser.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(290, 14);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(42, 17);
this.label5.TabIndex = 8;
this.label5.Text = "预览区";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(10, 86);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(66, 17);
this.label4.TabIndex = 7;
this.label4.Text = "文本背景色";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(10, 56);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(54, 17);
this.label3.TabIndex = 6;
this.label3.Text = "文本颜色";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(10, 24);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(54, 17);
this.label2.TabIndex = 2;
this.label2.Text = "背景图片";
//
// bn_bg
//
this.bn_bg.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.bn_bg.Location = new System.Drawing.Point(110, 18);
this.bn_bg.Name = "bn_bg";
this.bn_bg.TabIndex = 5;
this.bn_bg.Text = "自定义...";
this.bn_bg.Click += new System.EventHandler(this.bn_bg_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.bn_selectPath);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.tb_path);
this.groupBox1.Location = new System.Drawing.Point(14, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(402, 66);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -