1 2 3 4 5 6 7 8 9 10 11 12 13
| private void pictureBox3_DoubleClick(object sender, EventArgs e)
{
IconSelector iconSelector = new IconSelector();
int num1 = (int)iconSelector.ShowDialog();
this.quests[this.listBox1.SelectedIndex].IconIndex = iconSelector.iconIndex;
Graphics graphics = Graphics.FromImage(this.pictureBox3.Image);
graphics.Clear(Color.Transparent);
int num2 = this.quests[this.listBox1.SelectedIndex].IconIndex / 16;
int num3 = this.quests[this.listBox1.SelectedIndex].IconIndex - num2 * 16;
graphics.DrawImage((Image)this.img, new Rectangle(0, 0, 24, 24), new Rectangle(num3 * 24, num2 * 24, 24, 24), GraphicsUnit.Pixel);
this.label11.Text = this.quests[this.listBox1.SelectedIndex].IconIndex.ToString();
this.pictureBox3.Refresh();
} |
Partager