Fixed notification icon menu

Also fixed console messages as well. The programme
is just about working properly! I'm going to start
creating branches now as it is nearly at ready for a
v1.0!
This commit is contained in:
Terry MacDonald 2020-11-04 18:47:41 +13:00
parent d952059e08
commit dd85aeb0f1
3 changed files with 41 additions and 9 deletions

View File

@ -1218,7 +1218,7 @@ namespace HeliosPlus
}
else
{
bm = IconFromFile.GetLargeBitmapFromFile(fileNameAndPath, true, true);
bm = IconFromFile.GetLargeBitmapFromFile(fileNameAndPath, true, false);
}
return bm;
}
@ -1237,7 +1237,7 @@ namespace HeliosPlus
}
else
{
bm = IconFromFile.GetSmallBitmapFromFile(fileNameAndPath, false, true, false);
bm = IconFromFile.GetSmallBitmapFromFile(fileNameAndPath, false, false, false);
}
return bm;
}

View File

@ -499,14 +499,14 @@ namespace HeliosPlus
// Now run the pre-start applications
List<Process> startProgramsToStop = new List<Process>();
if (shortcutToUse.StartPrograms is List<StartProgram> && shortcutToUse.StartPrograms.Count > 0)
List<StartProgram> startProgramsToStart = shortcutToUse.StartPrograms.Where(program => program.Enabled == true).OrderBy(program => program.Priority).ToList();
if (startProgramsToStart.Count > 0)
{
Console.WriteLine("Starting programs before main game/executable:");
foreach (StartProgram processToStart in shortcutToUse.StartPrograms
.Where(program => program.Enabled == true)
.OrderBy(program => program.Priority))
foreach (StartProgram processToStart in startProgramsToStart)
{
// Start the executable
Console.WriteLine("Starting programs before main game/executable:");
Console.WriteLine($" - Starting process {processToStart.Executable}");
Process process = null;
if (processToStart.ExecutableArgumentsRequired)

View File

@ -144,12 +144,44 @@ namespace HeliosPlus.UIForms
private void runProfileToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Show();
var menuItem = sender as ToolStripMenuItem;
ProfileItem profileToRun = null;
if (menuItem != null)
{
foreach (ProfileItem profile in ProfileRepository.AllProfiles)
{
if (profile.Name.Equals(menuItem.Text))
{
profileToRun = profile;
break;
}
}
// Run the shortcut if it's still there
if (profileToRun != null)
Program.ApplyProfile(profileToRun);
}
}
private void runShortcutToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Show();
var menuItem = sender as ToolStripMenuItem;
ShortcutItem shortcutToRun = null;
if (menuItem != null)
{
foreach (ShortcutItem shortcut in ShortcutRepository.AllShortcuts)
{
if (shortcut.Name.Equals(menuItem.Text))
{
shortcutToRun = shortcut;
break;
}
}
// Run the shortcut if it's still there
if (shortcutToRun != null)
ShortcutRepository.RunShortcut(shortcutToRun);
}
}
private void openApplicationWindowToolStripMenuItem_Click(object sender, EventArgs e)