Commit Graph

35 Commits

Author SHA1 Message Date
Terry MacDonald
ccefa80642 Added overlay to inform user UI is locked
This informs the user that the user UI is locked
until they close the game/application that is
started.
2020-11-21 14:48:32 +13:00
Terry MacDonald
e9a821e594 [WIP] Working notifyIcon during run
notifyIcon works if run from Shortcutlibrary,
or from clicked shortcut. Next step is to make
the main window show some sort of indication
that the UI is locked until the game exits....
2020-11-19 22:40:08 +13:00
Terry MacDonald
a56e68d94e Added Uplay to RunShortcut
HeliosPlus now runs Uplay Games and
correctly waits until they have exited before
changing back. It won't wait for Uplay updates
however, as I really don't know how Uplay
marks things as being updated. So I don't
know how to look for the updates occurring!
2020-11-15 21:06:38 +13:00
Terry MacDonald
c7444e379c Fixed Uplay configuration file processing
Accidentally broke the Uplay configuration
file processing but now fixed it again.
2020-11-15 20:28:55 +13:00
Terry MacDonald
dd85aeb0f1 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!
2020-11-04 18:47:41 +13:00
Terry MacDonald
23930a2a15 Added initial ability to minimise to notification area
Used some awesome help from Hans Passant to build
logic to allow minimise to notification area as well as
be able to change profiles etc from the notification area.

https://stackoverflow.com/questions/1730731/how-to-start-winform-app-minimized-to-tray
2020-10-26 14:30:00 +13:00
Terry MacDonald
964853ff34 Changed the HeliosPlus Icon
Still not really happy with this one, but it's better
than the last one at least...
2020-10-22 21:46:36 +13:00
Terry MacDonald
ca1b760d9e Fixed Profile reverting after game execution
The ApplyProfile had some logic that would stop
reverting the profile after the game/exe was exited.
This should now be fixed.

Also attempted a fix to centralise the timer circle
in the middle window while applying a profile.
2020-10-22 20:08:26 +13:00
Terry MacDonald
a5d581fec8 Fixed shortcut editing and icon updates
The shortcut editing window was broken and was
not copying the information across properly to the
new shortcuts when the shortcut was edited. I have
now moved to actually replacing the shortcut when
the form updates it. So basically the ShortcutForm
loads the shortcut info from the ShortcutItem, then
when you save the form, it returns a new ShortcutItem.
The shortcut library then removes the old shortcut
(which removes the icons, and updates the file), then
it saves the new shortcut we just created (which saves
the icons and updates the save file). This was the easiest
way to make the shortcut modification process work.
2020-10-20 21:22:07 +13:00
Terry MacDonald
464545fbc7 Made Icons as reliable as possible
Icon logic works well now except for a single issue.
It will not change the shortcut image if the profile
or the game has been changed, and it needs to.
2020-10-19 22:58:23 +13:00
Terry MacDonald
683bf3d936 Fixed Bitmap processing for Shortcuts
The Bitmap processing wasm't working in the
listitemview. Traced it to a problem with a missing
GenerateThumbnailView call.

Also adjusted when the save to icon cache happens
so that it is part of the ShortcutItem and is called
when a new shortcut is created. This saves times.
2020-10-18 23:04:08 +13:00
Terry MacDonald
3b63953648 Revert "Revert "Refactored Common Base Games""
This reverts commit a71b866545.
2020-10-18 21:17:21 +13:00
Terry MacDonald
a71b866545 Revert "Refactored Common Base Games"
This reverts commit c2c11bd722.
2020-10-18 21:15:19 +13:00
Terry MacDonald
c2c11bd722 Refactored Common Base Games
Created a Common Base Game object in order
to support multiple additional libraries and games
in the future.
2020-10-18 21:02:00 +13:00
Terry MacDonald
3992157793 Correctly close programs that we start
The StartPrograms processes now all correctly are added
to a list of processes to stop only if the user requested they
are stopped.

Additionally, a 300ms delay was added after SteamGame is
launched to give it time to actually run the darn game! It was
erroring due to testing for the launch too quickly. Steam
takes a wee bit of time to start the game, and we need to
account for that.
2020-10-13 22:02:46 +13:00
Terry MacDonald
86776f1aba SteamGame.IsRunning now works correctly
Changed from using the Steam 'Running' Registry
Key to using an actual Process detection method.
Now works reliably and waits as expected!
2020-10-13 21:25:10 +13:00
Terry MacDonald
07d1c040cb Added ApplyProfile exceptions and StartPrograms 2020-10-13 20:22:42 +13:00
Terry MacDonald
12e3229f9d [WIP] Partially working RunShortcut command
The RunShortcut commandline option mostly works
but it fails to cleanly execute thanks to a partially broken
Program.ApplyProfile. The ApplyProfile exception logic
is not working properly and that is causing an exception
in Program.RunShortcut. Just needs some improved
ApplyProfile logic to detect when it does actually
(correctly) fail.
2020-10-11 21:12:52 +13:00
Terry MacDonald
17cc302d17 [WIP] Partial refactor of applying profile display UI 2020-10-04 23:01:03 +13:00
Terry MacDonald
77ae3c4789 Basic working code to apply a display profile change
This code makes the display profile change work. There
are a few things broken still.... namely the showing of a
timer when the profile is being applied, the accuracy of
the display detection code, and the correct logic for
determining a profile can be used.
2020-10-02 18:10:34 +13:00
Terry MacDonald
32ad405904 Removed braces from UUID in filenames
Simplified UUID logic by removing braces from the
filenames and within the storage JSON files.
2020-08-19 10:16:04 +12:00
Terry MacDonald
b95e7bbd39 Fixing Repositories to work on first run 2020-08-07 15:59:23 +12:00
terrymacdonald
41c03c30b5 Saving initial MSTest configuration
First part of installing an MSTest suite.
Included some config file to read in
for testing the ShortcutRepository and
the ProfileRepository. Had the data
handy so it made sense to save it :)
2020-07-26 20:52:46 +12:00
terrymacdonald
5004f5f76a Silenced the System.Drawing.Image exceptions
The ProfileAdapter and ShortcutAdapters used
by the ImageListView Control unfortunately
have to access the sizes of the bitmaps being
loaded into the respective imagelistviews. I
can't find anyway of stopping the GDI+
from complaining about the Bitmap being
accessed by multiple different threads (as
ImageListView creates one thread per image.
This will be fixed once I move to this being a
WPF application as we'll use a different control.
2020-07-24 16:51:48 +12:00
terrymacdonald
f23ae340a7 Fixed DisplayProfileForm profile selection logic
Profile selection logic was running functions multiple
times which was resulting in a lot of extra delay
while using the DisplayProfileFOrm. These changes
streamline it and make it work a lot faster!
2020-07-24 13:11:42 +12:00
terrymacdonald
e83a893640 [WIP] Partial cleanup of compiler warnings
Fixed most of the string related compiler
warnings. Still lots to go!
2020-07-24 11:06:33 +12:00
terrymacdonald
c358bc9087 [WIP] Moving Shortcut run logic to repo
Moved the shortcut running logic from the
main Program into the ShortcutRepository
so that it can be used from the
Shortcut Library UI as well as from the
commandline.

It's marked as WIP because I also moved
the ApplyingChangesForm and accompanying
ApplyTopos/ApplyProfiles logic and I broke
it. It needs refactoring and hopefully
simplifying but I need to work on that next!
2020-07-23 18:31:00 +12:00
terrymacdonald
71928a9b44 [WIP] Created SteamLibrary class to handle library
Pulled out the the library list mgmt from SteamGame
and put it in a new SteamLibrary class. This means I
can replicate the learnings from the ShortcutRepo
amd Profile Repo, and can save separate JSON files
in the future if I so desire.

There is a little bit outstanding to make the SteamGame
Properties to be writeable as well as readable, otherwise
the SteamGame.CopyTo function won't work.
2020-07-21 23:40:33 +12:00
terrymacdonald
c1ce153c68 Updated Shortcut saving to work with the library
Updated the 'Save To Desktop' button in the
ShortcutLibraryForm to use the CreateShortcut
function in the ShortcutItem, and fixed that so
it now uses the IWshRuntimeLibrary to create
a Windows Script Host that will create the
shortcut.
2020-07-21 19:50:41 +12:00
terrymacdonald
85963b3417 Fixed ShortcutAdaptor errors and Saved prompt
Did a fix for the SHortcutAdaptor doing exceptions
for showing the form before loading all the graphics
but can't really do much about it without adding
background loading to the main form. This is a lot of
work considering we'll be moving from WinForms
to WPF UI in the future.

Also fixed the 'Do you want to save' prompt detection
logic so that it correctly waits until all the loading has
finished before monitoring for users making changes.
Should stop the form incorrectly suggesting you
should save unless they've really made a change.
2020-07-15 20:11:38 +12:00
terrymacdonald
0e985238f9 Fixed 'save your changes' message on load
The 'change' detection logic now works (mostly)
but it still incorrectly triggers if you change tabs,
even if the settings don't change. Should probably
look at a proper fix.
2020-07-13 19:53:25 +12:00
terrymacdonald
5b396032ff Shortcut names now update if profile name changed
If a shortcut has Autoname turned on, and if the user
changes the name of the profile, then the shortcut will
be renamed to keep pace with the new profile name.
If autoname is NOT turned on, then the shortcut name
will be kept as is, and the user will need to make any
changes. Please note that HeliosPlus will not make
any changes to any desktop shortcuts saved to the PC.
It will only change the name of the shortcut in the
shortcut library within the App.
2020-06-15 21:57:46 +12:00
temacdonald
23e1dbd244 Transitioned Profiles to using ProfileRepository
Moving to using a ProfileRespository will make it
easier when moving to a WPF style app, and it will
allow some freedom if I want to change the storage
to a database or soemthing different.
2020-06-14 16:20:52 +12:00
temacdonald
e7ad4dc847 [WIP] Fixing Shortcut Bitmap
Partially completed bitmap work.
Need to implement generic bitmap
resizing to work with small and large
icons, and for different sizes for overlay
bitmap.
2020-06-07 20:48:45 +12:00
Terry MacDonald
f59490a1ff [WIP] Improved Shortcut handling
Created ShortcutRepository which handles
the loading/saving and lifecycle management
of shortcuts. There can only be one shortcut
repository at a time, hence it's mainly static
methods.

Also started down the path of troubleshooting
the profileIcon overlays. The ToBitmapOverlay
still isn't working properly, so I need to figure
out how it was working originally, and how I
broke it :). Then I need to unbreak it.
2020-06-01 22:25:52 +12:00