Ejemplo n.º 1
0
        private void img_Click(object sender, EventArgs e)
        {
            using (ImageListEditor editor = new ImageListEditor(parent.imglist))
            {
                editor.ShowDialog();

                if (editor.Canceled)
                {
                    return;
                }
                if (editor.Key == "None")
                {
                    Key             = "";
                    img.Image       = null;
                    lblEdit.Visible = true;
                    return;
                }
                if (!parent.imglist.Images.ContainsKey(editor.Key))
                {
                    return;
                }

                Image eimg = parent.imglist.Images[editor.Key];

                img.Image = eimg;
                Key       = editor.Key;

                lblEdit.Visible = false;
            }
        }
Ejemplo n.º 2
0
        private void img_Click(object sender, EventArgs e)
        {
            using (ImageListEditor editor = new ImageListEditor(parent.imglist))
            {
                editor.ShowDialog();

                if (editor.Canceled) return;
                if (editor.Key == "None")
                {
                    Key = "";
                    img.Image = null;
                    lblEdit.Visible = true;
                    return;
                }
                if (!parent.imglist.Images.ContainsKey(editor.Key)) return;

                Image eimg = parent.imglist.Images[editor.Key];

                img.Image = eimg;
                Key = editor.Key;

                lblEdit.Visible = false;
            }
        }