mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Working icon selector
It looks like the work is done on the icon selector. Adds #51, hopefully fixing the last issue in #49 too.
This commit is contained in:
parent
4d9216328d
commit
41a75acb1a
@ -296,7 +296,11 @@ namespace DisplayMagician.GameLibraries
|
|||||||
// Note: This may be an icon file, or an exe file.
|
// Note: This may be an icon file, or an exe file.
|
||||||
// This function tries to get a 256x256 Vista sized bitmap from the file
|
// This function tries to get a 256x256 Vista sized bitmap from the file
|
||||||
logger.Trace($"Program/LoadGamesInBackground: Attempting to get game bitmaps from {game.Name}.");
|
logger.Trace($"Program/LoadGamesInBackground: Attempting to get game bitmaps from {game.Name}.");
|
||||||
bmList = ImageUtils.GetMeAllBitmapsFromFile(game.IconPath);
|
bmList.AddRange(ImageUtils.GetMeAllBitmapsFromFile(game.IconPath));
|
||||||
|
if (game.ExePath != game.IconPath)
|
||||||
|
{
|
||||||
|
bmList.AddRange(ImageUtils.GetMeAllBitmapsFromFile(game.ExePath));
|
||||||
|
}
|
||||||
logger.Trace($"Program/LoadGamesInBackground: Got game bitmaps from {game.Name}.");
|
logger.Trace($"Program/LoadGamesInBackground: Got game bitmaps from {game.Name}.");
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -308,38 +312,29 @@ namespace DisplayMagician.GameLibraries
|
|||||||
if (bmList.Count == 0)
|
if (bmList.Count == 0)
|
||||||
{
|
{
|
||||||
ShortcutBitmap bm = new ShortcutBitmap();
|
ShortcutBitmap bm = new ShortcutBitmap();
|
||||||
bm.UUID = Guid.NewGuid().ToString("D");
|
|
||||||
bm.Order = bmList.Count;
|
|
||||||
bm.Source = game.ExePath;
|
|
||||||
if (game.GameLibrary.Equals(SupportedGameLibraryType.Steam))
|
if (game.GameLibrary.Equals(SupportedGameLibraryType.Steam))
|
||||||
{
|
{
|
||||||
bm.Name = "Steam";
|
bm = ImageUtils.CreateShortcutBitmap(Properties.Resources.Steam, "Steam Icon", game.ExePath, bmList.Count);
|
||||||
bm.Image = Properties.Resources.Steam;
|
|
||||||
}
|
}
|
||||||
else if (game.GameLibrary.Equals(SupportedGameLibraryType.Uplay))
|
else if (game.GameLibrary.Equals(SupportedGameLibraryType.Uplay))
|
||||||
{
|
{
|
||||||
bm.Name = "Uplay";
|
bm = ImageUtils.CreateShortcutBitmap(Properties.Resources.Uplay, "Uplay Icon", game.ExePath, bmList.Count);
|
||||||
bm.Image = Properties.Resources.Uplay;
|
|
||||||
}
|
}
|
||||||
else if (game.GameLibrary.Equals(SupportedGameLibraryType.Origin))
|
else if (game.GameLibrary.Equals(SupportedGameLibraryType.Origin))
|
||||||
{
|
{
|
||||||
bm.Name = "Origin";
|
bm = ImageUtils.CreateShortcutBitmap(Properties.Resources.Origin, "Origin Icon", game.ExePath, bmList.Count);
|
||||||
bm.Image = Properties.Resources.Origin;
|
|
||||||
}
|
}
|
||||||
else if (game.GameLibrary.Equals(SupportedGameLibraryType.Epic))
|
else if (game.GameLibrary.Equals(SupportedGameLibraryType.Epic))
|
||||||
{
|
{
|
||||||
bm.Name = "Epic";
|
bm = ImageUtils.CreateShortcutBitmap(Properties.Resources.Epic, "Epic Icon", game.ExePath, bmList.Count);
|
||||||
bm.Image = Properties.Resources.Epic;
|
|
||||||
}
|
}
|
||||||
else if (game.GameLibrary.Equals(SupportedGameLibraryType.GOG))
|
else if (game.GameLibrary.Equals(SupportedGameLibraryType.GOG))
|
||||||
{
|
{
|
||||||
bm.Name = "GOG";
|
bm = ImageUtils.CreateShortcutBitmap(Properties.Resources.GOG, "GOG Icon", game.ExePath, bmList.Count);
|
||||||
bm.Image = Properties.Resources.GOG;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bm.Name = "DisplayMagician";
|
bm = ImageUtils.CreateShortcutBitmap(Properties.Resources.DisplayMagician.ToBitmap(), "DisplayMagician Icon", game.ExePath, bmList.Count);
|
||||||
bm.Image = Properties.Resources.DisplayMagician.ToBitmap();
|
|
||||||
}
|
}
|
||||||
// Add the shortcutbitmap to the list
|
// Add the shortcutbitmap to the list
|
||||||
bmList.Add(bm);
|
bmList.Add(bm);
|
||||||
|
@ -26,8 +26,8 @@ using System.Resources;
|
|||||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
[assembly: AssemblyVersion("2.1.0.132")]
|
[assembly: AssemblyVersion("2.1.0.142")]
|
||||||
[assembly: AssemblyFileVersion("2.1.0.132")]
|
[assembly: AssemblyFileVersion("2.1.0.142")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|
||||||
|
35
DisplayMagician/UIForms/ChooseIconForm.Designer.cs
generated
35
DisplayMagician/UIForms/ChooseIconForm.Designer.cs
generated
@ -31,36 +31,43 @@ namespace DisplayMagician.UIForms
|
|||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChooseIconForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChooseIconForm));
|
||||||
this.lv_icons = new System.Windows.Forms.ListView();
|
this.lv_icons = new System.Windows.Forms.ListView();
|
||||||
|
this.columnHeaderName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.pb_selected_icon = new System.Windows.Forms.PictureBox();
|
this.pb_selected_icon = new System.Windows.Forms.PictureBox();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.btn_add = new System.Windows.Forms.Button();
|
this.btn_add = new System.Windows.Forms.Button();
|
||||||
this.btn_select = new System.Windows.Forms.Button();
|
this.btn_select = new System.Windows.Forms.Button();
|
||||||
this.btn_back = new System.Windows.Forms.Button();
|
this.btn_back = new System.Windows.Forms.Button();
|
||||||
this.columnHeaderName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeaderSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pb_selected_icon)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pb_selected_icon)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// lv_icons
|
// lv_icons
|
||||||
//
|
//
|
||||||
this.lv_icons.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
this.lv_icons.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
this.columnHeaderName});
|
this.columnHeaderName,
|
||||||
this.lv_icons.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
this.columnHeaderSize});
|
||||||
|
this.lv_icons.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||||
this.lv_icons.HideSelection = false;
|
this.lv_icons.HideSelection = false;
|
||||||
this.lv_icons.Location = new System.Drawing.Point(26, 40);
|
this.lv_icons.Location = new System.Drawing.Point(26, 40);
|
||||||
this.lv_icons.MultiSelect = false;
|
this.lv_icons.MultiSelect = false;
|
||||||
this.lv_icons.Name = "lv_icons";
|
this.lv_icons.Name = "lv_icons";
|
||||||
this.lv_icons.ShowGroups = false;
|
this.lv_icons.ShowGroups = false;
|
||||||
this.lv_icons.Size = new System.Drawing.Size(561, 200);
|
this.lv_icons.Size = new System.Drawing.Size(370, 200);
|
||||||
this.lv_icons.TabIndex = 0;
|
this.lv_icons.TabIndex = 0;
|
||||||
this.lv_icons.UseCompatibleStateImageBehavior = false;
|
this.lv_icons.UseCompatibleStateImageBehavior = false;
|
||||||
this.lv_icons.View = System.Windows.Forms.View.Details;
|
this.lv_icons.View = System.Windows.Forms.View.Details;
|
||||||
this.lv_icons.SelectedIndexChanged += new System.EventHandler(this.lv_icons_SelectedIndexChanged);
|
this.lv_icons.SelectedIndexChanged += new System.EventHandler(this.lv_icons_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
|
// columnHeaderName
|
||||||
|
//
|
||||||
|
this.columnHeaderName.Text = "Name";
|
||||||
|
this.columnHeaderName.Width = 270;
|
||||||
|
//
|
||||||
// pb_selected_icon
|
// pb_selected_icon
|
||||||
//
|
//
|
||||||
this.pb_selected_icon.BackColor = System.Drawing.Color.DimGray;
|
this.pb_selected_icon.BackColor = System.Drawing.Color.DimGray;
|
||||||
this.pb_selected_icon.Location = new System.Drawing.Point(593, 40);
|
this.pb_selected_icon.Location = new System.Drawing.Point(402, 40);
|
||||||
this.pb_selected_icon.Name = "pb_selected_icon";
|
this.pb_selected_icon.Name = "pb_selected_icon";
|
||||||
this.pb_selected_icon.Size = new System.Drawing.Size(200, 200);
|
this.pb_selected_icon.Size = new System.Drawing.Size(200, 200);
|
||||||
this.pb_selected_icon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
this.pb_selected_icon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
@ -73,7 +80,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.label1.BackColor = System.Drawing.Color.Black;
|
this.label1.BackColor = System.Drawing.Color.Black;
|
||||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.label1.ForeColor = System.Drawing.Color.White;
|
this.label1.ForeColor = System.Drawing.Color.White;
|
||||||
this.label1.Location = new System.Drawing.Point(238, 21);
|
this.label1.Location = new System.Drawing.Point(139, 21);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(125, 16);
|
this.label1.Size = new System.Drawing.Size(125, 16);
|
||||||
this.label1.TabIndex = 2;
|
this.label1.TabIndex = 2;
|
||||||
@ -86,7 +93,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.label2.BackColor = System.Drawing.Color.Black;
|
this.label2.BackColor = System.Drawing.Color.Black;
|
||||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.label2.ForeColor = System.Drawing.Color.White;
|
this.label2.ForeColor = System.Drawing.Color.White;
|
||||||
this.label2.Location = new System.Drawing.Point(652, 21);
|
this.label2.Location = new System.Drawing.Point(457, 21);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(93, 16);
|
this.label2.Size = new System.Drawing.Size(93, 16);
|
||||||
this.label2.TabIndex = 3;
|
this.label2.TabIndex = 3;
|
||||||
@ -110,7 +117,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.btn_select.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.btn_select.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.btn_select.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btn_select.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btn_select.ForeColor = System.Drawing.Color.White;
|
this.btn_select.ForeColor = System.Drawing.Color.White;
|
||||||
this.btn_select.Location = new System.Drawing.Point(314, 261);
|
this.btn_select.Location = new System.Drawing.Point(218, 261);
|
||||||
this.btn_select.Name = "btn_select";
|
this.btn_select.Name = "btn_select";
|
||||||
this.btn_select.Size = new System.Drawing.Size(176, 30);
|
this.btn_select.Size = new System.Drawing.Size(176, 30);
|
||||||
this.btn_select.TabIndex = 40;
|
this.btn_select.TabIndex = 40;
|
||||||
@ -123,7 +130,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.btn_back.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
this.btn_back.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||||
this.btn_back.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btn_back.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btn_back.ForeColor = System.Drawing.Color.White;
|
this.btn_back.ForeColor = System.Drawing.Color.White;
|
||||||
this.btn_back.Location = new System.Drawing.Point(714, 261);
|
this.btn_back.Location = new System.Drawing.Point(525, 261);
|
||||||
this.btn_back.Name = "btn_back";
|
this.btn_back.Name = "btn_back";
|
||||||
this.btn_back.Size = new System.Drawing.Size(79, 30);
|
this.btn_back.Size = new System.Drawing.Size(79, 30);
|
||||||
this.btn_back.TabIndex = 41;
|
this.btn_back.TabIndex = 41;
|
||||||
@ -131,17 +138,17 @@ namespace DisplayMagician.UIForms
|
|||||||
this.btn_back.UseVisualStyleBackColor = true;
|
this.btn_back.UseVisualStyleBackColor = true;
|
||||||
this.btn_back.Click += new System.EventHandler(this.btn_back_Click);
|
this.btn_back.Click += new System.EventHandler(this.btn_back_Click);
|
||||||
//
|
//
|
||||||
// columnHeaderName
|
// columnHeaderSize
|
||||||
//
|
//
|
||||||
this.columnHeaderName.Text = "Name";
|
this.columnHeaderSize.Text = "Size";
|
||||||
this.columnHeaderName.Width = 550;
|
this.columnHeaderSize.Width = 70;
|
||||||
//
|
//
|
||||||
// ChooseIconForm
|
// ChooseIconForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.Black;
|
this.BackColor = System.Drawing.Color.Black;
|
||||||
this.ClientSize = new System.Drawing.Size(819, 319);
|
this.ClientSize = new System.Drawing.Size(629, 319);
|
||||||
this.Controls.Add(this.btn_back);
|
this.Controls.Add(this.btn_back);
|
||||||
this.Controls.Add(this.btn_select);
|
this.Controls.Add(this.btn_select);
|
||||||
this.Controls.Add(this.btn_add);
|
this.Controls.Add(this.btn_add);
|
||||||
@ -156,6 +163,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.Name = "ChooseIconForm";
|
this.Name = "ChooseIconForm";
|
||||||
this.ShowIcon = false;
|
this.ShowIcon = false;
|
||||||
this.ShowInTaskbar = false;
|
this.ShowInTaskbar = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "Choose shortcut icon";
|
this.Text = "Choose shortcut icon";
|
||||||
this.TopMost = true;
|
this.TopMost = true;
|
||||||
this.Load += new System.EventHandler(this.ChooseIconForm_Load);
|
this.Load += new System.EventHandler(this.ChooseIconForm_Load);
|
||||||
@ -175,5 +183,6 @@ namespace DisplayMagician.UIForms
|
|||||||
private System.Windows.Forms.Button btn_select;
|
private System.Windows.Forms.Button btn_select;
|
||||||
private System.Windows.Forms.Button btn_back;
|
private System.Windows.Forms.Button btn_back;
|
||||||
private System.Windows.Forms.ColumnHeader columnHeaderName;
|
private System.Windows.Forms.ColumnHeader columnHeaderName;
|
||||||
|
private System.Windows.Forms.ColumnHeader columnHeaderSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -46,7 +46,11 @@ namespace DisplayMagician.UIForms
|
|||||||
int imageCount = 1;
|
int imageCount = 1;
|
||||||
foreach (ShortcutBitmap sc in AvailableImages)
|
foreach (ShortcutBitmap sc in AvailableImages)
|
||||||
{
|
{
|
||||||
ListViewItem lvi = new ListViewItem($"Image {sc.Order} from {sc.Source}");
|
string[] stringsToAdd = new string[] {
|
||||||
|
$"Image {sc.Order} from {sc.Name}",
|
||||||
|
$"{sc.Size.Width} x {sc.Size.Height}"
|
||||||
|
};
|
||||||
|
ListViewItem lvi = new ListViewItem(stringsToAdd);
|
||||||
lvi.Name = sc.UUID;
|
lvi.Name = sc.UUID;
|
||||||
if (sc.Equals(SelectedImage))
|
if (sc.Equals(SelectedImage))
|
||||||
{
|
{
|
||||||
|
@ -1403,8 +1403,12 @@ namespace DisplayMagician.UIForms
|
|||||||
// If the game is selected, then grab images from the game
|
// If the game is selected, then grab images from the game
|
||||||
if (shortcutGame != null)
|
if (shortcutGame != null)
|
||||||
{
|
{
|
||||||
_availableImages.AddRange(ImageUtils.GetMeAllBitmapsFromFile(shortcutGame.ExePath));
|
_availableImages.AddRange(ImageUtils.GetMeAllBitmapsFromFile(shortcutGame.IconPath));
|
||||||
_availableImages.AddRange(ImageUtils.GetMeAllBitmapsFromFile(shortcutGame.IconPath));
|
if (shortcutGame.ExePath != shortcutGame.IconPath)
|
||||||
|
{
|
||||||
|
_availableImages.AddRange(ImageUtils.GetMeAllBitmapsFromFile(shortcutGame.ExePath));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// If the different exe to monitor is set, then grab the icons from there too!
|
// If the different exe to monitor is set, then grab the icons from there too!
|
||||||
if (!String.IsNullOrWhiteSpace(_shortcutToEdit.DifferentGameExeToMonitor) && File.Exists(_shortcutToEdit.DifferentGameExeToMonitor))
|
if (!String.IsNullOrWhiteSpace(_shortcutToEdit.DifferentGameExeToMonitor) && File.Exists(_shortcutToEdit.DifferentGameExeToMonitor))
|
||||||
@ -1621,6 +1625,11 @@ namespace DisplayMagician.UIForms
|
|||||||
// Empty the bitmaps
|
// Empty the bitmaps
|
||||||
EmptyTheImages();
|
EmptyTheImages();
|
||||||
|
|
||||||
|
if (!String.IsNullOrWhiteSpace(txt_executable.Text) && File.Exists(txt_executable.Text))
|
||||||
|
{
|
||||||
|
UpdateExeImagesUI();
|
||||||
|
}
|
||||||
|
|
||||||
SuggestShortcutName();
|
SuggestShortcutName();
|
||||||
EnableSaveButtonIfValid();
|
EnableSaveButtonIfValid();
|
||||||
}
|
}
|
||||||
@ -1971,6 +1980,21 @@ namespace DisplayMagician.UIForms
|
|||||||
private void btn_exe_to_start_Click(object sender, EventArgs e)
|
private void btn_exe_to_start_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
txt_executable.Text = getExeFile();
|
txt_executable.Text = getExeFile();
|
||||||
|
UpdateExeImagesUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateExeImagesUI()
|
||||||
|
{
|
||||||
|
_availableImages = new List<ShortcutBitmap>();
|
||||||
|
_availableImages.AddRange(ImageUtils.GetMeAllBitmapsFromFile(txt_executable.Text));
|
||||||
|
if (rb_wait_alternative_executable.Checked && File.Exists(txt_alternative_executable.Text))
|
||||||
|
{
|
||||||
|
_availableImages.AddRange(ImageUtils.GetMeAllBitmapsFromFile(txt_alternative_executable.Text));
|
||||||
|
}
|
||||||
|
_selectedImage = ImageUtils.GetMeLargestAvailableBitmap(_availableImages);
|
||||||
|
_shortcutToEdit.SelectedImage = _selectedImage;
|
||||||
|
pb_exe_icon.Image = _selectedImage.Image;
|
||||||
|
btn_choose_exe_icon.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void txt_shortcut_save_name_Click(object sender, EventArgs e)
|
private void txt_shortcut_save_name_Click(object sender, EventArgs e)
|
||||||
@ -2700,11 +2724,11 @@ namespace DisplayMagician.UIForms
|
|||||||
|
|
||||||
private void btn_choose_exe_icon_Click(object sender, EventArgs e)
|
private void btn_choose_exe_icon_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (rb_standalone.Checked && _shortcutToEdit.AvailableImages.Count > 0)
|
if (rb_standalone.Checked && _availableImages.Count > 0)
|
||||||
{
|
{
|
||||||
ChooseIconForm exeIconForm = new ChooseIconForm();
|
ChooseIconForm exeIconForm = new ChooseIconForm();
|
||||||
exeIconForm.AvailableImages = _shortcutToEdit.AvailableImages;
|
exeIconForm.AvailableImages = _availableImages;
|
||||||
exeIconForm.SelectedImage = _shortcutToEdit.SelectedImage;
|
exeIconForm.SelectedImage = _selectedImage;
|
||||||
if (exeIconForm.ShowDialog() == DialogResult.OK)
|
if (exeIconForm.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
_availableImages = exeIconForm.AvailableImages;
|
_availableImages = exeIconForm.AvailableImages;
|
||||||
@ -2720,8 +2744,8 @@ namespace DisplayMagician.UIForms
|
|||||||
if (rb_launcher.Checked && _shortcutToEdit.AvailableImages.Count > 0)
|
if (rb_launcher.Checked && _shortcutToEdit.AvailableImages.Count > 0)
|
||||||
{
|
{
|
||||||
ChooseIconForm gameIconForm = new ChooseIconForm();
|
ChooseIconForm gameIconForm = new ChooseIconForm();
|
||||||
gameIconForm.AvailableImages = _shortcutToEdit.AvailableImages;
|
gameIconForm.AvailableImages = _availableImages;
|
||||||
gameIconForm.SelectedImage = _shortcutToEdit.SelectedImage;
|
gameIconForm.SelectedImage = _selectedImage;
|
||||||
if (gameIconForm.ShowDialog() == DialogResult.OK)
|
if (gameIconForm.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
_availableImages = gameIconForm.AvailableImages;
|
_availableImages = gameIconForm.AvailableImages;
|
||||||
|
Loading…
Reference in New Issue
Block a user