diff --git a/DisplayMagician/ShortcutItem.cs b/DisplayMagician/ShortcutItem.cs index 2fc15d9..b7fec17 100644 --- a/DisplayMagician/ShortcutItem.cs +++ b/DisplayMagician/ShortcutItem.cs @@ -1935,9 +1935,13 @@ namespace DisplayMagician // Does the profile we want to Use still exist? // Is the profile still valid right now? i.e. are all the screens available? + if (ProfileToUse == null) + { + return (false,string.Format("The profile is not valid right now and cannot be used.")); + } if (!ProfileToUse.IsPossible) { - return (false,string.Format("The profile '{0}' is not valid right now and cannot be used.",ProfileToUse.Name)); + return (false, string.Format("The profile '{0}' is not valid right now and cannot be used.", ProfileToUse.Name)); } // Is the main application still installed? if (Category.Equals(ShortcutCategory.Application)) diff --git a/DisplayMagician/UIForms/ShortcutForm.cs b/DisplayMagician/UIForms/ShortcutForm.cs index 0d26374..3770d08 100644 --- a/DisplayMagician/UIForms/ShortcutForm.cs +++ b/DisplayMagician/UIForms/ShortcutForm.cs @@ -786,7 +786,7 @@ namespace DisplayMagician.UIForms allGames.AddRange(UplayLibrary.AllInstalledGames); - // Load the Steam Games into the Games ListView + // Load all the Games into the Games ListView foreach (var game in allGames.OrderBy(game => game.Name)) { // Get the bitmap out of the IconPath @@ -805,10 +805,10 @@ namespace DisplayMagician.UIForms // Add the images to the images array il_games.Images.Add(bm); - if (!Visible) + /*if (!Visible) { - return; - } + //return; + }*/ // ADd the game to the game array lv_games.Items.Add(new ListViewItem @@ -930,18 +930,22 @@ namespace DisplayMagician.UIForms // Set the launcher items if we have them if (_shortcutToEdit.GameLibrary.Equals(SupportedGameLibrary.Unknown)) { - // Fill in the game library information to highliught there isn't one detected. - txt_game_launcher.Text = "None detected"; - txt_game_name.Text = "No supported game libraries detected"; - txt_args_game.Text = ""; + if (allGames.Count <= 0) + { + // Fill in the game library information to highliught there isn't one detected. + txt_game_launcher.Text = "None detected"; + txt_game_name.Text = "No supported game libraries detected"; + txt_args_game.Text = ""; - // Disable the Game library option, and select the Executable option instead. - p_game.Enabled = false; - p_game.Visible = false; - rb_wait_executable.Checked = true; - rb_launcher.Enabled = false; - rb_launcher.Visible = false; - lbl_no_game_libraries.Visible = true; + // Disable the Game library option, and select the Executable option instead. + p_game.Enabled = false; + p_game.Visible = false; + rb_wait_executable.Checked = true; + rb_launcher.Enabled = false; + rb_launcher.Visible = false; + lbl_no_game_libraries.Visible = true; + + } } else diff --git a/DisplayMagician/UIForms/ShortcutLibraryForm.cs b/DisplayMagician/UIForms/ShortcutLibraryForm.cs index 233af41..e43e568 100644 --- a/DisplayMagician/UIForms/ShortcutLibraryForm.cs +++ b/DisplayMagician/UIForms/ShortcutLibraryForm.cs @@ -186,6 +186,9 @@ namespace DisplayMagician.UIForms if (_selectedShortcut == null) return; + if (!shortcutValidity[_selectedShortcut.Name]) + return; + // Run the selected shortcut btn_run.PerformClick(); } diff --git a/DisplayMagicianShared/ProfileRepository.cs b/DisplayMagicianShared/ProfileRepository.cs index 384e0ba..5cb371f 100644 --- a/DisplayMagicianShared/ProfileRepository.cs +++ b/DisplayMagicianShared/ProfileRepository.cs @@ -151,6 +151,7 @@ namespace DisplayMagicianShared //Doublecheck it's been added if (ContainsProfile(profile)) { + IsPossibleRefresh(); return true; } else @@ -199,6 +200,7 @@ namespace DisplayMagicianShared if (numRemoved == 1) { SaveProfiles(); + IsPossibleRefresh(); return true; } else if (numRemoved == 0) @@ -248,6 +250,7 @@ namespace DisplayMagicianShared if (numRemoved == 1) { SaveProfiles(); + IsPossibleRefresh(); return true; } else if (numRemoved == 0) @@ -296,6 +299,7 @@ namespace DisplayMagicianShared if (numRemoved == 1) { SaveProfiles(); + IsPossibleRefresh(); return true; } else if (numRemoved == 0) @@ -449,7 +453,8 @@ namespace DisplayMagicianShared SharedLogger.logger.Debug($"ProfileRepository/RenameProfile: The profile was not renamed from {profile.Name} to {renamedName}"); return false; } - + + IsPossibleRefresh(); }