示例#1
0
        private void ButtonChangeIconClick(object sender, EventArgs e)
        {
            KryptonListItem item = (KryptonListItem)this.listCurrentActions.SelectedItem;

            if (item.Tag != null)
            {
                Command cmd      = (Command)item.Tag;
                string  newImage = ImagesDialog.Show();
                if (!string.IsNullOrEmpty(newImage))
                {
                    item.Image = CommandImageCollection.GetImage(newImage);
                    if (this.changedImages.ContainsKey(cmd))
                    {
                        this.changedImages[cmd] = newImage;
                    }
                    else
                    {
                        this.changedImages.Add(cmd, newImage);
                    }
                }

                this.Changed = true;
            }
        }
示例#2
0
        new public static string Show()
        {
            ImagesDialog dlg = new ImagesDialog();

            return(dlg.SelectImage());
        }