//更改图标 private void ReplaceIcon(object sender, EventArgs e) { var frm = new FormReplaceIcon(iconPath) { Icon = this.Icon }; frm.ShowDialog(); if (frm.IconIndex == -1) { return; } iconPath = frm.IconPath; iconIndex = frm.IconIndex; Image image = new TileIcon().ToImage(iconPath, iconIndex); ShowMyIcon(image); }
//更改图标 private void ReplaceIcon(object sender, EventArgs e) { var frm = new FormReplaceIcon(iconPath) { Icon = this.Icon }; frm.ShowDialog(); if (frm.IconIndex == -1) { return; } iconPath = frm.IconPath; iconIndex = frm.IconIndex; Image image = new TileIcon().ToImage(iconPath, iconIndex); if (image == null) { return; } picIconView.Image = image; UseIcoAsPic(); }