📄 customicon.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace XP界面优化精灵
{
/// <summary>
/// IndividuationIcon 的摘要说明。
/// </summary>
public class CustomIcon : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage tp_1;
private System.Windows.Forms.TabPage tp_3;
private System.Windows.Forms.TabPage tp_2;
private System.Windows.Forms.ImageList DesktopIcon;
private System.Windows.Forms.ContextMenu contextMenu;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.TabPage tp_4;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.ListView DeskTopIconList;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ImageList SystemIcon;
private System.Windows.Forms.ImageList FileIcon;
private System.Windows.Forms.ListView SystemIconList;
private System.Windows.Forms.TextBox tb_FileName;
private System.Windows.Forms.ListView FileIconList;
private System.Windows.Forms.Button bn_refresh;
private System.Windows.Forms.PictureBox pb_show;
private System.Windows.Forms.Button bn_changeIcon;
private System.ComponentModel.IContainer components;
private ComboBox cb =new ComboBox ();
public CustomIcon()
{
//
// 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()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("我的电脑");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("我的文档");
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("网上邻居");
System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("回收站(满)");
System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem("回收站(空)");
System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem("控制面板");
System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem("拔号网络");
System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem("计划任务");
System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem("打印机");
System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem("Web文件夹");
System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem("IE浏览器");
System.Windows.Forms.ListViewItem listViewItem12 = new System.Windows.Forms.ListViewItem("URL文件夹");
System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem("预定文件夹");
System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem("我的公文包");
System.Windows.Forms.ListViewItem listViewItem15 = new System.Windows.Forms.ListViewItem("文件夹(关闭)");
System.Windows.Forms.ListViewItem listViewItem16 = new System.Windows.Forms.ListViewItem("文件夹(打开)");
System.Windows.Forms.ListViewItem listViewItem17 = new System.Windows.Forms.ListViewItem("3.5英寸软盘");
System.Windows.Forms.ListViewItem listViewItem18 = new System.Windows.Forms.ListViewItem("5.5英寸软盘");
System.Windows.Forms.ListViewItem listViewItem19 = new System.Windows.Forms.ListViewItem("可移动驱动器");
System.Windows.Forms.ListViewItem listViewItem20 = new System.Windows.Forms.ListViewItem("硬盘");
System.Windows.Forms.ListViewItem listViewItem21 = new System.Windows.Forms.ListViewItem("在线网络");
System.Windows.Forms.ListViewItem listViewItem22 = new System.Windows.Forms.ListViewItem("离线网络");
System.Windows.Forms.ListViewItem listViewItem23 = new System.Windows.Forms.ListViewItem("光盘驱动器");
System.Windows.Forms.ListViewItem listViewItem24 = new System.Windows.Forms.ListViewItem("整个网络");
System.Windows.Forms.ListViewItem listViewItem25 = new System.Windows.Forms.ListViewItem("快捷方式");
System.Windows.Forms.ListViewItem listViewItem26 = new System.Windows.Forms.ListViewItem("共享资源");
System.Windows.Forms.ListViewItem listViewItem27 = new System.Windows.Forms.ListViewItem("我的电脑");
System.Windows.Forms.ListViewItem listViewItem28 = new System.Windows.Forms.ListViewItem("网络工作组");
System.Windows.Forms.ListViewItem listViewItem29 = new System.Windows.Forms.ListViewItem("无关联文件");
System.Windows.Forms.ListViewItem listViewItem30 = new System.Windows.Forms.ListViewItem("文本文件");
System.Windows.Forms.ListViewItem listViewItem31 = new System.Windows.Forms.ListViewItem("位图BMP");
System.Windows.Forms.ListViewItem listViewItem32 = new System.Windows.Forms.ListViewItem("网页htm");
System.Windows.Forms.ListViewItem listViewItem33 = new System.Windows.Forms.ListViewItem("Bat批处理");
System.Windows.Forms.ListViewItem listViewItem34 = new System.Windows.Forms.ListViewItem("INI文件");
System.Windows.Forms.ListViewItem listViewItem35 = new System.Windows.Forms.ListViewItem("ZIP文件");
System.Windows.Forms.ListViewItem listViewItem36 = new System.Windows.Forms.ListViewItem("WAV声音文件");
System.Windows.Forms.ListViewItem listViewItem37 = new System.Windows.Forms.ListViewItem("AVI视频文件");
System.Windows.Forms.ListViewItem listViewItem38 = new System.Windows.Forms.ListViewItem("GIF图像");
System.Windows.Forms.ListViewItem listViewItem39 = new System.Windows.Forms.ListViewItem("JPG图像");
System.Windows.Forms.ListViewItem listViewItem40 = new System.Windows.Forms.ListViewItem("DOC文档");
System.Windows.Forms.ListViewItem listViewItem41 = new System.Windows.Forms.ListViewItem("MS-DOS程序");
System.Windows.Forms.ListViewItem listViewItem42 = new System.Windows.Forms.ListViewItem("MP3音乐文件");
System.Windows.Forms.ListViewItem listViewItem43 = new System.Windows.Forms.ListViewItem("MIDI文件");
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(CustomIcon));
this.tabControl = new System.Windows.Forms.TabControl();
this.tp_1 = new System.Windows.Forms.TabPage();
this.label5 = new System.Windows.Forms.Label();
this.DeskTopIconList = new System.Windows.Forms.ListView();
this.contextMenu = new System.Windows.Forms.ContextMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.DesktopIcon = new System.Windows.Forms.ImageList(this.components);
this.tp_2 = new System.Windows.Forms.TabPage();
this.SystemIconList = new System.Windows.Forms.ListView();
this.SystemIcon = new System.Windows.Forms.ImageList(this.components);
this.label4 = new System.Windows.Forms.Label();
this.tp_3 = new System.Windows.Forms.TabPage();
this.label6 = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.pb_show = new System.Windows.Forms.PictureBox();
this.bn_changeIcon = new System.Windows.Forms.Button();
this.tb_FileName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.FileIconList = new System.Windows.Forms.ListView();
this.FileIcon = new System.Windows.Forms.ImageList(this.components);
this.tp_4 = new System.Windows.Forms.TabPage();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.button2 = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.bn_refresh = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.tabControl.SuspendLayout();
this.tp_1.SuspendLayout();
this.tp_2.SuspendLayout();
this.tp_3.SuspendLayout();
this.groupBox5.SuspendLayout();
this.tp_4.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// tabControl
//
this.tabControl.Controls.Add(this.tp_1);
this.tabControl.Controls.Add(this.tp_2);
this.tabControl.Controls.Add(this.tp_3);
this.tabControl.Controls.Add(this.tp_4);
this.tabControl.Location = new System.Drawing.Point(6, 6);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(496, 374);
this.tabControl.TabIndex = 2;
//
// tp_1
//
this.tp_1.BackColor = System.Drawing.Color.White;
this.tp_1.Controls.Add(this.label5);
this.tp_1.Controls.Add(this.DeskTopIconList);
this.tp_1.Location = new System.Drawing.Point(4, 21);
this.tp_1.Name = "tp_1";
this.tp_1.Size = new System.Drawing.Size(488, 349);
this.tp_1.TabIndex = 0;
this.tp_1.Text = "桌面图标";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(14, 10);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(276, 17);
this.label5.TabIndex = 4;
this.label5.Text = "在相应的图标上双击可更改图标,点右键可以还原";
//
// DeskTopIconList
//
this.DeskTopIconList.BackColor = System.Drawing.Color.White;
this.DeskTopIconList.ContextMenu = this.contextMenu;
listViewItem1.StateImageIndex = 0;
listViewItem2.StateImageIndex = 0;
listViewItem3.StateImageIndex = 0;
listViewItem4.StateImageIndex = 0;
listViewItem5.StateImageIndex = 0;
listViewItem6.StateImageIndex = 0;
listViewItem7.StateImageIndex = 0;
listViewItem7.UseItemStyleForSubItems = false;
this.DeskTopIconList.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3,
listViewItem4,
listViewItem5,
listViewItem6,
listViewItem7,
listViewItem8,
listViewItem9,
listViewItem10,
listViewItem11,
listViewItem12,
listViewItem13,
listViewItem14});
this.DeskTopIconList.LargeImageList = this.DesktopIcon;
this.DeskTopIconList.Location = new System.Drawing.Point(10, 32);
this.DeskTopIconList.MultiSelect = false;
this.DeskTopIconList.Name = "DeskTopIconList";
this.DeskTopIconList.Size = new System.Drawing.Size(468, 306);
this.DeskTopIconList.TabIndex = 1;
//
// contextMenu
//
this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem3,
this.menuItem2});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.Text = "更改图标";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "-";
//
// menuItem2
//
this.menuItem2.Index = 2;
this.menuItem2.Text = "还原";
//
// DesktopIcon
//
this.DesktopIcon.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.DesktopIcon.ImageSize = new System.Drawing.Size(32, 32);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -