Commit Graph

26 Commits

Author SHA1 Message Date
Terry MacDonald
3847bae972 [WIP] DisplayUI works but needs error handling
DisplayUI is mostly working but it needs some work
fixing the error situations when the PathInfo can't be
applied properly. Need a way of setting the Task
result from the Task Action. Don't know how to do that
so something new to learn!
2020-10-05 00:18:22 +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
9d5a5ebd62 [WIP] Creates different displayIdentifiers for NVIDIA or other
There are different displayIdentifiers created if the video card
is an NVidia card, or if it is anything else. These identifiers
are saved in the display profiles, and that allows us to compare
the display identifiers we currently have with the ones in various
profiles, and then work out which profiles are valid.

This code committed today ensures that the nvidia device
identifier will always use the NVAPIWrapper lib (whether in
surround mode or not) so that the application allows both
surround mode profiles and non-surround mode profiles
to be selected if the same displays are present.

For all other display adapters it just uses the
WindowsDisplayAPI to create a different displayIdentifier
which isn't as smart. It means that if you have an AMD and
use EyeInfinity, then this isn't clever enough to understand
the profiles use the same matching screens. I will have to
fix this eventually when i build in native AMD support in
the future.
2020-09-18 22:52:18 +12:00
Terry MacDonald
0912ee5896 Added DisplayIdentifiers to Profile storage
DisplayIdentifiers are the minimum GPU/Display
that will allow us to identify whether a profile
will actually work. We look for the same DisplayIdentifiers
or a subset of them to determine whether a profile
will be valid to show. This is different from the data
stored under DisplayTarget, as that is used for detailed
compatibility....
2020-08-19 18:55:50 +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
ee7703255e Fixed SteamGame so it handles copies
Fixed SteamGame so it handles copies, and also
fixed the SteamLibrary so it works properly and
works. HeliosPlus now will run shortcuts and
load the game perfectly!
2020-07-22 21:52:36 +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
Terry MacDonald
b31d233678 [WIP] Attempting to create Shortcut ID
Partial attempt at a Shortcut ID. Need
to refactor slightly to move more logic
to the Shortcut itself rather than in the
form!
2020-05-31 22:09:43 +12:00
Terry MacDonald
4d8e69d6ba [WIP] Redesign to tabs based shortcut form
Changed the shortcutform to use tabs instead
of a large single form. Having to update all the
logic is taking ages.
2020-05-31 14:56:22 +12:00
temacdonald
19a2f1543e [WIP] Progressing ShortcutLibrary loading
Still having issues with the shortcutAdaptor for the
Imagelistviewitem loading. Even though it's based
on the same code as the profileAdaptor it's not
reading the Shortcut bitmap properly. Too tired to
figure out why at the moment, so will be trying again
tomorrow. I expect its something to do with the
different Bitmap format for the two options. May
need to revise that to compare image data.
2020-05-19 21:41:26 +12:00
temacdonald
9dab00bdb4 [WIP] Sort out the ShortcutForm controls
The logic I chose for the ShortcutForm controls is
really not suited towards distributed logic. I am
going to have to centralise the logic into a single
function that will evaulate when to enable the
save button.
2020-05-17 21:19:55 +12:00
temacdonald
4412a75bd9 [WIP] Finished the draft Shortcut class
Have created the Shortcut class for use within the
ShortcutLibrary. Next step is modifying the
ShortcutForm to generate a Shortcut so that I
can check the loading and saving is working ok.
I won't concentrate on the ShortcutForm redesign
until this bit is tested.
2020-05-16 23:16:46 +12:00
temacdonald
d7c4c1f53d [WIP] Initial shortcutlibrary form
Created the initial form for the shortcut library
and will now start working on getting the
shortcuts saving to a similar json format as
the display profiles.
2020-05-16 17:07:52 +12:00
temacdonald
423b3fb656 Working direct Profile to ImageListView
Manged to get the ImageListView working directly
from the Bitmap stored in the Profile. This makes
the refresh of the ILV much faster, and makes it way
easier to use it in other UI forms.
2020-05-16 15:58:59 +12:00
temacdonald
470cba0a1d Renamed the directories to HeliosPlus 2020-05-15 23:25:14 +12:00