Commit Graph

390 Commits

Author SHA1 Message Date
Terry MacDonald
85d4a04795 Added Video card mode image to Edit Shortcut form
Now it looks much prettier.
2021-09-23 20:32:29 +12:00
Terry MacDonald
63479cae82 Set the default to log TRACE level log messages
This is just while we're doing in-depth testing.
2021-09-22 21:17:21 +12:00
Terry MacDonald
48e27d30f9 Slightly speed up audio device swapping 2021-09-22 09:05:33 +12:00
Terry MacDonald
1591fd534e Upgraded AMDLibrary to v1.0.0
This is the first actual working version of the AMDLibrary from AMDInfo v1.0.0. This is the first time that all 3 different video libraries are in DisplayMagician and working (mostly). The AMD Screens structu creation logic in ProfileItem still needs to be updated to cope with the AMD Eyefinity configuration, but it at least defaults to the windows one at the moment so it doesn't crash (whew).

Also managed to bugfix the recent libraryfolder.vdf parsing change that a recent Steam Library change oforced on us. The logic wasn't working, and so the parsing didn't work, which in turn caused an exception when it came time to look up the game shortcut validity.
2021-09-18 21:55:43 +12:00
Terry MacDonald
9c0241c720 Corrected Uplay lgging text to Steam 2021-09-10 19:47:50 +12:00
Terry MacDonald
914ee2cc06 Initial partial creation of cancel logic
This code eventually will be used to allow the user to cancel waiting for the game/app. This won't work at the moment though as we actually monitor for the game on the UI thread (a big no no). I'll have to fix this in an upcoming update, but for now we'll leave it here.
2021-09-09 20:53:41 +12:00
Terry MacDonald
6bd9898ea8 Fixed inconsistent NVIDIA HDR display setting
THere was an unneeded check that prevented the NVIDIA HDR settings being applied when it should have been. This in turn meant that the display profile equality matching wasn't working as the applied display profile was sufficiently different to the one selected and applied that it wouldn't match, and would instead display the brand new profile interface. This has been corrected now.
2021-09-09 09:21:53 +12:00
Terry MacDonald
28a8f131b3 Workaround Windows changing display source order
Windows changes the display source order which mucks up the equality matching in DM. This change attempts to mitigate that fact.

There were also errors in the HDR settings captured, which indicate that the HDR changes weren't finishing before they were being recorded. This change attempts to take care of that too.

All tests so far seem to work, so lets see how things go!
2021-09-08 20:04:37 +12:00
Terry MacDonald
fef3dbf1e0 Part 2 of the move to a single ProfileItem
Mostly works now! Only bit still needing work is the Avtive profile detection to detect the non-surround profile when we return from surround. I think it's to do with the windows display number changing :(. I need to check that.
2021-09-07 22:08:54 +12:00
Terry MacDonald
c59f236524 Still vainly trying to get Equals to work
I am a lot closer at the moment, but there is some bit of logic matching that is escaping me. I think I'm just too tired at the moment, and I need a sleep. I bet this will seem simple in the morning.
2021-09-06 22:08:22 +12:00
Terry MacDonald
0c32b206c0 Potential fix for libraryfolders.vdf change
This (hopefully) should fix #38. Big thanks to @DragRedSim for their help. This will attempt to use the new library file liocation if it's available, and will fall back to the older config.vdf discovery mechanism if it doesn't find the new file.
2021-09-05 22:16:16 +12:00
Terry MacDonald
7c21c19056 Fixed Profile Matching
Found an underlying problem of using the OutputID for displayIdentifier matching as the outputID changes after each reboot. CHanged the DisplayIdentifier to record the type of the connection to the display, which stays the same even if the OututID changes. Also made the ProfileItem.Equals look for DisplayIdentifier ids and match them even if they are in a different order. This seems to happen some times, and I'm not sure why the NVIDIA driver does it!
2021-09-05 21:00:36 +12:00
Terry MacDonald
708acd3c12 Fixed CompareTo and some Profile Repository loading order 2021-09-04 20:58:08 +12:00
Terry MacDonald
a112326e50 Implemented new derived class equality logic
Used new derived class equality class from https://codinghelmet.com/articles/equals-override which helped me understand the logic for deriving equality between base classes and derived classes. It has now exposed another error in the way FORCED_VIDEO_MODE is being applied and that is now something else I need to fix!
2021-09-04 16:32:42 +12:00
Terry MacDonald
964d982bd1 Fixed Video mode detection without forced parameter
Accidentally broke the auto detection when no forced video command line option given. Now works again.
2021-09-03 22:15:23 +12:00
Terry MacDonald
eef92abebf Fixed DisplayProfile ImageListView
I'd managed to break the Display Profile imagelistview with one of my code clearing escapades, but now I have managed to fix it again!
2021-09-02 15:09:06 +12:00
Terry MacDonald
65bbd1ab66 Added --force-video-library command line option
This feature will allow users to bypass the automatic driver detection functionality so that they can at least force  the use of the built-in Windows driver if NVIDIA or AMD ever have an issue with their drivers.
2021-09-02 13:47:28 +12:00
Terry MacDonald
9cef45416e First working display background per profile
Added functionality to implement display wallpaper changes with each display profile as per #36 and #10. Tested in Windows 10 ok.
2021-09-02 10:42:26 +12:00
Terry MacDonald
7a4e07f582 Tweak ProfileForm settings button position
Trying to get things to look a little better visually.
2021-08-31 13:26:58 +12:00
Terry MacDonald
8c3e2fd490 Tweaked ShortcutForm UI
Readjusted the placement of the Game components so that I can add some additional process monitoring options when I attempt to make process monitoring more reliable in the future.
2021-08-31 13:19:13 +12:00
Terry MacDonald
ed729a7282 Updated DisplayProfileForm and ShortcutForm 2021-08-31 12:05:42 +12:00
Terry MacDonald
4c8ecc0bf6 Initial completed develop branch merge
Code now compiles, so now it is just some testing to see what is broken!
2021-08-30 12:51:44 +12:00
Terry MacDonald
b374850bfe Merged develop branch to simplify development 2021-08-30 12:35:52 +12:00
Terry MacDonald
1a6282df1a Initial Windows desktop wallpaper functionality
This is the initial windows desktop functionality, and may work. I've added it to the earlier version of DisplayMagician, but I'm not sure I'll release it. This will instead probably be part of v2.0.0.
2021-08-30 12:26:43 +12:00
Terry MacDonald
a0646c2b8a Initial picturebox configuration
Can now select a new wallpaper and have it appear in the wallpaper picturebox. Also can reopen the profilesettings and the wallpaper will be loaded back into the picturebox. Just need to sort out the clear button and the use current buttons.
2021-08-29 22:54:11 +12:00
Terry MacDonald
3781415dbd Disable unused text field 2021-08-29 22:12:26 +12:00
Terry MacDonald
9f0113fd4c Updated ProfileSettingsForm 2021-08-29 19:58:09 +12:00
Terry MacDonald
bb1fa73c7f Fixed ProfileSettingsForm logic 2021-08-28 21:24:39 +12:00
Terry MacDonald
93c85d7d87 [WIP] Adding wallpaper manipulation 2021-08-27 22:26:12 +12:00
Terry MacDonald
cf0a15acdd Add initial wallpaper changing code 2021-08-27 21:15:53 +12:00
Terry MacDonald
012fe76b34 [WIP] Researching broken NVIDIA profile matching 2021-08-27 20:57:02 +12:00
Terry MacDonald
b51aefa0ac Update to DisplayProfileForm 2021-08-27 17:55:59 +12:00
Terry MacDonald
293ca14730 Moved RunProfile to ProfileRepository
It makes WAY more sense here.
2021-08-27 17:53:32 +12:00
Terry MacDonald
067f639901 Added DisplayProfile images 2021-08-25 20:45:36 +12:00
Terry MacDonald
e2ca69e404 First working new NVIDIA library build!
Amazing! This is the first working version of DisplayMagician using the new NVIDIA and Windows CCD library. It works properly, and now I can start to tidy up some of the additioanl functionality I need to sort out before a release. I also then need to work on the AMD library as well!
2021-08-24 22:46:32 +12:00
Terry MacDonald
ddbd6431c5 [WIP] Mostly working NVIDIAProfileItem
NVIDIA Profiles can be created, JSON file saved ok, and the bitmaps and icons are drawn correctly and showin in the Display Profile window. The problem comes when the DisplayProfiles_2.0.json file is loaded. JsonConvert causes an exception trying to populate ProfileBitmap, and I can't figure out why!
2021-08-22 21:45:51 +12:00
Terry MacDonald
508f3751b9 Fixed AMDProfileItem and WindProfileItem
DisplayMagician starts, but displayprofile form doesn't work at all.
2021-08-22 18:58:08 +12:00
Terry MacDonald
998293621e [WIP] Almost ready to test new libs 2021-08-22 16:49:38 +12:00
Terry MacDonald
bd89993770 Removed WindowsDisplayAPI
No longer need WindowsDisplayAPI as I've build a Windows CCD library as part of DisplayMagician itself now.
2021-08-22 15:51:13 +12:00
Terry MacDonald
01ffda8428 [WIP] Graphic library integration part 1 2021-08-22 12:54:39 +12:00
Terry MacDonald
a4662bed6c Removed prior graphics libraries to enable new lib integration.
Tweaked some easy to fix integration errors.
2021-08-21 22:09:41 +12:00
Terry MacDonald
fd98c2e5ca [WIP] Game Library updates 2021-08-21 21:31:48 +12:00
Terry MacDonald
0449ed7d1e Updated list of game libraries in Game Shortcut form 2021-08-01 23:13:53 +12:00
Terry MacDonald
a90c555972 Fix steam launch parameter passing
This change fixes Steam launch parameter passing.
There is still work to test and/or limit launch parameter
passing to only those libraries that support it. This will
need a bit of work. Fixes #27.
2021-07-25 22:10:39 +12:00
Terry MacDonald
df2d89bb69 Working Process Priority
Have managed to get process priority working, but
need to do more testing before I'm sure it works in all
scenarios. I don't have enough different game types to
test the various different code paths, so thats going to
be something that my users will unfortunately need to
bug test. Adds feature #29.
2021-07-25 21:29:00 +12:00
Terry MacDonald
deb90f03a9 [WIP] Initial version of game priority code 2021-07-25 17:14:18 +12:00
Terry MacDonald
28ec42b92d [WIP] Working process priority UI
And also saving and loading. Now only implementation
to go.
2021-07-25 16:41:26 +12:00
Terry MacDonald
ea6d6aa4c2 [WIP] further process priority implementation 2021-07-24 22:15:08 +12:00
Terry MacDonald
f740055cd3 [WIP} Partial process priority implementation 2021-07-24 22:11:49 +12:00
Terry MacDonald
764d759e10 Fixed exceprion with no game shortcut
Fixes #25. When you attempted to create a shortcut
that didnt run a game or executable, the program would
save the shortcut, but would crash when trying to show
it in the Shortcut library. This was because the _shortcutBitmap
wsn't being populated when no game or executable was
chosen. This has been fixed now, as it will use the profile bitmap
as the shortcut bitmap in these instances.
2021-07-24 16:26:10 +12:00
Terry MacDonald
0123e061e0 [WIP] initial library integration into DM
Have almost integrated the new CCD, AMD and NVIDIA
libraries into DIsplayMagician. The CCD library is working
fine. The AMD library is partially completed, but is awaiting
some help from AMD, as it appears one of their driver functions
is broken (or at least incorrectly documented). The NVIDIA
library is currently still under development, but I've still copied
it across so that I could work on the additional profile objects
that need to be prepared in order for this to work.

As I am waiting on a response from AMD, the plan is now that
I will swap over to an NVIDIA based video card in my test machines
and I will start work on the NVIDIA library. The NVIDIA library seems
straight forward compared to AMD, so that hopefully won't take too
long to do. Once that library is compete, I'll test it within NVIDIAInfo
application until its working, and then I'll port it back over to
DisplayMagician. That will then let me complete the last bits of the
integration so that I can complete the last of the NVIDIA tests.
Hopefully by the time all this happens I will have heard back from
AMD and I will be able to continue work with that section of code.
2021-07-24 16:05:38 +12:00
Terry MacDonald
86375b06aa Added initial CCD library code
Added some basic CCD library functionality
to be able to set Windows displays directly
from the code. This will enable future native
HDR support through windows, as well as
allow positioning and screen setup to work
better through here than via the AMD driver.

Will still need to work on AMD Eyefinity support
once this is completed.
2021-06-29 22:15:57 +12:00
Terry MacDonald
33bf28149e Added many DisplayConfigMap functions
Added most of the ADL2 DisplayConfigMap
functions to the ADL library in order to test
them out ans see which ones make sense to
use.
2021-06-27 20:46:32 +12:00
Terry MacDonald
c1d22970f6 [WIP] Fixing incorrect profile test
AMD Profile applying task now correctly reports
a true result when the AMDLibrary reports the
profile has been successfully applied.

Now all the scaffolding is complete, and an AMD
profile can be created, saved, loaded from a JSON file
and then an application of that AMD profile can be
tried.

Now comes the difficult part. I need to test out which
bits of the AMD ADL SDK I need to grab/store/load in
order to actually make the screen layouts change. And
then once that works with separate screens, I need to
add code to undertstand and recognise AMD Eyefinity
screen setups, and to make them able to be used.

This is going to take some time :/.
2021-06-27 15:17:07 +12:00
Terry MacDonald
2285da1844 [WIP] Initial apply AMD profile scaffolding
Have now got it so that an AMD DisplayProfile
now results in the profile attempting to be applied.
2021-06-27 15:10:59 +12:00
Terry MacDonald
240c69fcdb [WIP] Adjusted DisplayView size
Now works with single screens and similar
so that they show correctly on the page without
being hidden by foreground stuff. Still might
make the DisplayView larger if it makes sense.
2021-06-26 22:18:41 +12:00
Terry MacDonald
99d43bc245 [WIP] Initial working AMD displayview
Have managed to get a working displayview
for AMD (not working in spanned mode) and
currently playing with the colours and layout.
Once I have something locked in, I'll troubleshoot
the ProfileDisplay file writing.
2021-06-26 21:54:11 +12:00
Terry MacDonald
6a3068fb32 [WIP] Connecting AMDProfile to screens
Trying to figure out a video card agnostic way
of generating the display icons fo both standard
and spanned displays. Still trying to figure out
exactly which AMD ADL calls I need to make to
get all the information I need. It is NOT very well
documented. It's actually really annoying! AMD
need to do better.
2021-06-25 21:52:02 +12:00
Terry MacDonald
7efd4f0349 Update to v2.0.0 and added functions
Decided that the DisplayProfile changes would
have to be breaking changes if I was going to
add HDR support, and be able to handle adding
future video cards from different manufacturers.
This all requires a change to the DisplayProfile
format. So now this is going to use a file called
DisplayProfiles_2.0.json rather than a file called
DisplayProfiles_1.0.json. This is because the
profiles will need to be generated again from
scratch, as they will all be completely different
to the format in DisplayProfiles_1.0.json.
2021-06-20 16:37:00 +12:00
Terry MacDonald
d2c8c67d44 Updating messages within DisplayProfile 2021-06-19 20:49:22 +12:00
Terry MacDonald
76c94c76ae Update version to v1.2.0 2021-06-19 13:38:32 +12:00
Terry MacDonald
9c00081d7a Updated to v1.2.0 2021-06-13 09:52:30 +12:00
Terry MacDonald
d403f2d0ef Update to v1.1.4 2021-06-08 07:55:52 +12:00
Terry MacDonald
54132777fb Fixed broken application library display
Accidentally broke the applications from displaying
in the ShortcutLibraryForm. Now fixed.
2021-06-08 07:28:36 +12:00
Terry MacDonald
63410627a6 Update version to v1.1.3 2021-06-07 11:05:29 +12:00
Terry MacDonald
c93d2b8378 Fixed coping with gamelibrary removal
DisplayMagician can now handle it if a gamelibrary
is removed, or if you use a shortcut config file from
later version of DisplayMagician with an earlier version
of the DisplayMagician application. It will simply ignore
the incompatible shortcut, and it won't be able to be
edited or used.
2021-06-07 10:57:59 +12:00
Terry MacDonald
109a675f04 Fix for "Pass arguments to Program" issue
This fixes the stupid '"Pass arguments to Program"
not retaining checkbox check bug' error that some
how passed my testing! Fixes #19.

Really sorry to everyone for missing this as I really
did do some extensive testing (or so I thought) but
it looks like I'll need to do another release!
2021-06-07 10:23:59 +12:00
Terry MacDonald
bfb164fd41 Added GOG Game Library Support
Added initial GOG library support.

Also refactored the GameLibraries so that
they also start the game themselves, as
each library is different in how it starts the
game. This is the simplest way to handle that.
2021-06-05 22:41:29 +12:00
Terry MacDonald
84871ba14c Added Epic Game Library support
Added Epic game library support based
on the awesome work by Josef Nemec in
his software Playnite. I just transposed his
hard work into DisplayMagician and made
it all work! Thanks to Josef!

Also fixed up some little bugs in the way the
derived Game classes work with the base class
for some of the propoerties. Now fixed.
2021-06-05 16:58:00 +12:00
Terry MacDonald
f668d7e9d2 Creation of EpicLibrary files 2021-06-03 21:12:09 +12:00
Terry MacDonald
0f294996c1 Refactored stopping start programs
Changed the process stopping logic
to make it more relable, and also make it
much more likely to actually stop the
programs even if they do things like
launch other programs and stop themselves

Added more helpful instructions

Added a link to the Example Start Programs
settings on the wiki by clicking on a button
in the ShortcutForm itself.

Added helpful MessageBox telling people
they need to select a Game Shortcut in order
to run, edit, delete or save it. Also included
text about the mouse right-click menu.

Clarified text on the StartProgramControl.
2021-06-03 21:04:40 +12:00
Terry MacDonald
e31bbbd4aa Added stronger start program closing
Any start program that is started then
tries to doubly make sure that the program
is also closed. Now checks for something to
close in the following order:
- tries to close the process it opened
- if that was closed it tries to find any child
  processes started by the original process in
  case it was a 'launcher' process
- If there are no children with the same parent
  process then it just tries to close all processes
  with the same name as the one it opened.
  That final close also is a forced kill, as I've found
  programs like SimHub resist closing....
2021-06-02 21:53:18 +12:00
Terry MacDonald
abb2a3b905 Fixed starting all start programs
This fixes an edge case where a start program
is already running and DM would skip starting
any additional start programs. Fixes #18.

Also fixed an issue with it trying to stop start
programs processes that were already stopped
by the user or by some other process. It now
logs the fact this wasn't done as it was already
closed.
2021-06-02 20:14:54 +12:00
Terry MacDonald
09bedc9d3a Update version to v1.1.1
Also updating the homepage on
displaymagician.littlebitbig.com.
2021-05-23 10:32:26 +12:00
Terry MacDonald
9ec7b58f89 Fixed Game Shortcut Hotkeys
Fixed the Game Shortcut hotkeys so that
they work properly. Some late code changes
yesterday broke them :(. Sorry for the
inconvenience!

Also stopped the annoying 'bing' everytime
the notification toasts were created by
DisplayMagician when it did things. They are
now silent except for the ones that actually
require your attention, which should stop it
all being quite so jarring.
2021-05-23 10:17:45 +12:00
Terry MacDonald
129ef3d5fd Quick fix for StartPrograms
Fixed startProgram not clearing when
changing shortcuts.
2021-05-21 15:58:41 +12:00
Terry MacDonald
6565e2f2cc Fixed error when removing unsaved startprograms
The startPrograms UI would error when someone tried
to remove an unsaved startprogram from the FLP.
This has now been resolved.

Also managed to update a warning in the logs when
a program starts and the original exe is a loader that
loads another exe then closes itself. I've provided that
warning in the log file now.
2021-05-21 14:41:49 +12:00
Terry MacDonald
c6fb0ac5ad Fixing missing files in setup
DisplayMagician wasn't working when
installed due to missing files in the setup
build file list. This has been corrected and
an installation works fine now.

Also changed the Audio exceptions during
RunShortcut to Error level rather than Warn.
2021-05-21 13:23:07 +12:00
Terry MacDonald
8d5528a35d Made AutoUpdater more robust
AutoUpdater now works more reliably
as it now propoerly maps the JSON to
the objects that AutoUpdater expects
when retrieving the JSON from the
download server.
2021-05-21 10:55:23 +12:00
Terry MacDonald
58c41cf5f7 Added Hotkey Already Registered checks
Added to alert the user and record when a
hotkey is unable to be registered due to it
already being used.
2021-05-21 09:37:45 +12:00
Terry MacDonald
22b332770c Modified the setup installer
Added a couple of libraries
since we've added new functionality
2021-05-20 21:42:18 +12:00
Terry MacDonald
d14ee49996 Update version to 1.1.0
Also fix a csproj error.
2021-05-20 21:21:13 +12:00
Terry MacDonald
627b690e50 Simplified masked control
Made the control mask prettier and
simpler code. Works perfectly.
2021-05-20 18:18:08 +12:00
Terry MacDonald
8fd4c857ec Added help button
Added a help button that opens the
DisplayMagician Wiki. I feel like there
are so many functions and features
available in DisplayMagician that I need
to write some help and guidance on how
to use it.
2021-05-20 17:59:09 +12:00
Terry MacDonald
ce0b8dc829 Change start prog close default
This changes the start program to default
to closing the start program when the main
application closes. I believe this will be the
most common way to do things.
2021-05-20 17:54:29 +12:00
Terry MacDonald
d7d6f46492 Setting ApplyProfile top most
Setting the ApplyProfile to be top most
again since I fixed the latest profile bug
and we need it to work properly again.
2021-05-20 17:43:15 +12:00
Terry MacDonald
77fbec545b Added debug and trace options
Can now add a '--debug' or a
'--trace' option to the DisplayMagician
to force it to generate a TRACE log for that
session only. Once you close the application
it will go back to the normal logging level
set within the Settings Window.
2021-05-20 17:41:38 +12:00
Terry MacDonald
0dc7c9c0d1 Fixing slight logic error during restructure
Managed to break some logic when trying to
add robustness.... effectively doing the
opposite of what I was trying to do :/. Now
*should* be fixed, but we shall see with more
testing.
2021-05-19 22:24:04 +12:00
Terry MacDonald
a4db4b39b7 Updated game library images
Also changed from game library icons
to game library images to better match
the current icon generation logic.
2021-05-19 20:40:26 +12:00
Terry MacDonald
5b99c3ac7a Working Game selection window
Also correctly extracts icons from icon
files and game exes as best it can.
2021-05-18 22:03:02 +12:00
Terry MacDonald
36c085d918 Initially working iconextrator code
This code now will cope with incorrectly
formatted icons, and will simply ignore
them and move on to the next one.

This also fixes a game ILV adaptor error
which was causing argumentnullexceptions
2021-05-18 21:24:36 +12:00
Terry MacDonald
8e46178bbe Removed an old library 2021-05-16 21:48:26 +12:00
Terry MacDonald
5bdb2adba8 Mostly working Game icons!
Well this took enough time! I have
almost corrected all the issues with
the icon parsing functions, but I still
have a couple of edge cases to fix.
2021-05-16 21:46:58 +12:00
Terry MacDonald
22964f07df Made the Game Font readable
Game font was too large in the image
list view, so made it smaller.
2021-05-15 22:09:56 +12:00
Terry MacDonald
94d9da1b7c [WIP] Using single BItmap Generator
Changed to use a single bitmap generator
to try and simplify and standardise the way
that images are extracted from the games.
Have tried to use every method to extract
icons from icon files and from exes, but it's
still not quite right :(
2021-05-15 21:58:46 +12:00
Terry MacDonald
1366ef0ab2 [WIP] Some smaller icons still broken
Currently struggling with the fact that
the smaller game icons don't get extracted
properly, and that they end up tucked into
the top left of the 256x256 bitmap at
32x32 size... so really tiny. Need to find a
fix for this so it always returns a 256x256,
and attempts to grow the 32x32 icons into
256x256 icons.
2021-05-14 21:22:29 +12:00
Terry MacDonald
91a493a35d [WIP] Almost working game selection
This is almost working. I'm struggling with
the icons loaded from various icon files which
are coming in really small rather than the large
size they should be. The .Net Icon constructor
isn't making an Icon the size I requested, so I may
need to change something else.
2021-05-14 20:07:53 +12:00
Terry MacDonald
b84eff07ad [WIP] Nearly completed ilv game selector
This is almost working, but the icons aren't
being grabbed from the game bitmaps and
loaded into the ilb_games ImageListView
2021-05-14 18:17:23 +12:00
Terry MacDonald
dcb55f0063 Initial working dynamic start programs
The startprograms logic should now
work properly. The JSON transformation
from using Enabled to Disable setting has
been tested and works too.
2021-05-14 15:37:40 +12:00
Terry MacDonald
4a1c4cf370 [WIP] Added new start program button
Can now create new start programs. Still
isn't saving and loading the start programs
into the shortcuts properly, and still loads
empty start programs which we need to
filter out.
2021-05-14 10:53:14 +12:00
Terry MacDonald
e2bfa65157 [WIP] Added up and down buttons
Added up and down buttons to the UI
so that you can use the buttons or click
and drag the startup items to where you
want them. All works fine!
2021-05-14 10:40:37 +12:00
Terry MacDonald
829057bcfd [WIP] UI working as intended!
Lots of improvements to make still
but the basic UI is working as it should.
Big thanks to @teawithcookies for the
tip to set DragDropEffects to Move in
order to make DragDrop method fire!
That took me 20 mins to figure out...
2021-05-13 21:50:01 +12:00
Terry MacDonald
a278f183d7 [WIP] First working drag and drop
Drag and drop finally works! But there is
no feedback, and no animation and no
cursor control. And the page still doesn't
actually save the information, and it can't
have new start programs added to it yet.
It's fair to say there is still a lot to do :/
2021-05-11 22:01:51 +12:00
Terry MacDonald
dccd13c019 [WIP] Partially working flowlayout 2021-05-11 16:08:57 +12:00
Terry MacDonald
6131833b25 WIP] First attempt at tablelayout 2021-05-11 15:59:53 +12:00
Terry MacDonald
7534fe6fc6 [WIP] Basic partially working panel
The panel successfully has the usercontrols
put into it, but it doesn't reorganise the rest
of the usercontrols when one is deleted up
to head of the list. I've done some research
and the internet tells me to move from a panel
container to a FlowLayoutPanel or a
TableLayoutPanel to get the automatic redrawing
functionality. It's apparently far easier to swap
than to write the redrawing code yourself.

So thats the plan for later this week.
2021-05-09 21:43:06 +12:00
Terry MacDonald
84c9338be4 [WIP] Basic partially working prototype 2021-05-08 23:22:44 +12:00
Terry MacDonald
7e99af19d1 [WIP] still figuring out user controls 2021-05-08 23:15:01 +12:00
Terry MacDonald
1d752a1021 [WIP] First StartProgram UserControl
First attempt at using a customer User
Control to make it easier to create dynamic
list of start programs to kick off before the
main program is started.

I already have the ability within the data model
to store and track multiple start programs... the
difficulty is in making the WninForms UI handle
a dynamic number of start programs. This is the
basic construction of it, but it needs a LOT of UI
work.
2021-05-08 22:59:38 +12:00
Terry MacDonald
4ec7829a43 Made the shortcut images more reliable
Also added a ton of trace logging to be
able to fix issues remotely.
2021-05-02 22:05:25 +12:00
Terry MacDonald
2e954d5b75 Hotkeys complete!
Managed to add the Hotkey list
that shows the user the entire list
of hotkeys across the application.
Also allows you to delete them all!
This function is now complete, and
is all working based on my testing.
2021-05-01 21:56:31 +12:00
Terry MacDonald
b79aecc7fb Suppress CLS non-compliance
I know its not compliant...that's by
design.
2021-05-01 20:59:26 +12:00
Terry MacDonald
325a1b6012 Working hotkeys of all types
Yay! Managed to get all the hotkey
logic working so all types of hotkeys
work fine. Next step is getting the
list of dynamic hotkeys populated
from the Display Profiles and the
Game Shortcuts, and then hooking up
the Clear All Hotkeys button so that it
clears the dynamic hotkeys too!
2021-05-01 20:58:09 +12:00
Terry MacDonald
b96a846410 First working Hotkeys
In this first working hotkey scenario
the DisplayProfiles and Shortcuts can
be run from Hotkey. I now need to add
the ability to run the mainfor, display profile
config page, and the shortcut library itself.
And of course add the items to the settings
window so they can be changed.
2021-05-01 17:03:15 +12:00
Terry MacDonald
beab71ace4 [WIP] broken Form to form passing 2021-04-30 22:45:11 +12:00
Terry MacDonald
c5121702b2 Fixed the Hotkey selection text
Works fine now. No more errant
selections.
2021-04-30 22:11:36 +12:00
Terry MacDonald
43374ff1b2 Merged in hotfix for 1.0.6 2021-04-30 21:50:41 +12:00
Terry MacDonald
3ae712f578 Update version to v1.0.6 2021-04-30 21:25:34 +12:00
Terry MacDonald
cb08611f39 Fixing tests NuGet reference
Fixing silly OriginLibrary copy paste error.
2021-04-30 17:54:04 +12:00
Terry MacDonald
c4fe410eb9 Fixed missing OriginLibrary references
This iwas a stupid mistake. I forgot to change
the Uplay library references when I copied them
to nmake the OriginLibrary. This caused issues
as they cross pollinated, breaking both :(.
2021-04-30 17:34:11 +12:00
Terry MacDonald
6af0603d8f Fixed OriginLibrary issue
OriginLibrary wasn't added to the validity
checking, so no Origin games would work.
Also added a LOAD more trace logging with the
Origin library so I can see from the logs what's
happening. Also updated the version to 1.0.5.1.
And finally, removed unneeded validityrefresh
from the base ShortcutItem constructor as it
is refreshed later anyway. Should speed up
object creation a little.
2021-04-30 17:28:01 +12:00
Nils Goetje
2bffdbc098 Prevent exception when scanning origin lib 2021-04-29 16:48:24 +02:00
Nils Goetje
0b8117d39b checks matches of regex search before accessing it 2021-04-29 15:21:24 +02:00
Terry MacDonald
0b9f6e7e6f [Wip] Partially working hotkey
Managed to get the hotkeys for
the DisplayProfiles and the Game
Shortccuts to work ok. Still needs
polish for the HotKeyForm, and I
need a way to set the MainWindow,
DisplayProfileWindow and
ShortcutWindow Hotkeys
2021-04-29 22:45:13 +12:00
Terry MacDonald
e9f401960e [WIP] Still moving to NHotkey 2021-04-28 22:14:54 +12:00
Terry MacDonald
209e3f0338 [WIP] Partway through swap to NHotkey
Also trying to port Willy-Kimura's HKL
HotkeySelector code over as well cause
it is ace!
2021-04-27 22:19:44 +12:00
Terry MacDonald
92c0678e79 WIP] commit where I'm up to
This is a stopgap place to commit
while I test out another hotkey lib.
2021-04-27 21:57:27 +12:00
Terry MacDonald
9dc68ff506 Suppress CLS 2021-04-25 22:25:41 +12:00
Terry MacDonald
023a1a8862 [WIP] Shortcut and Profile hotkey UI
Completed the Shortcut and Display Profile
hotkey UI interface to a satisfactory level.
The hotkey settings are stored with the
profile JSON for profiles, and with the
shortcut JSON for shortcuts. This means
they load correctly and are remembered
between runs of DisplayMagician.

Next step is to actually register the Hotkeys
so they work, and then allow them to be
replaced or removed when they are changed.
2021-04-25 21:13:25 +12:00
Terry MacDonald
a5f74576ba Suppress CLS error 2021-04-25 17:06:02 +12:00
Terry MacDonald
e604b1a871 [WIP] Hotkey passing to form working
At this point, we now have a hotkey form
that can generate hotkeys, and we have a way
of passing it some text to make it obvious which
hotkey we are setting. Additonally we can get
the set hotkey back.

Next steps are to store the hotkeys with the
display profiles and the game shortcuts, and
to load them as we load the files in.
2021-04-25 16:54:17 +12:00
Terry MacDonald
0e7ee3acef [WIP] Testing passing hotkeys
Testing the best way to pass hotkeys through
to the Hotkey form in a way that I can reuse it
across the whole application.
2021-04-24 16:06:00 +12:00
Terry MacDonald
b360fc9f37 [WIP] Creating hotkey setting form
This form will show when the user wants
to set a hotkey for a display profile or for
a shortcut. This will not be used for the
setting the main window, or shortcut library
hotkey...those will be set in the settings
window.
2021-04-23 21:42:18 +12:00
Terry MacDonald
fd50594211 [WIP] Adding hotkey buttons to forms 2021-04-23 21:25:42 +12:00
Terry MacDonald
e5be7f65e0 Add HotKeyLibrary to setup
This adds the HotKeyLibrary to the
DisplayMagician setup so that the
HotKey stuff will work once I build
it in!
2021-04-23 20:51:22 +12:00
Terry MacDonald
4ef1100ec2 Updated version to v1.0.5.0 2021-04-23 17:47:18 +12:00
Terry MacDonald
719c7f3350 Updated minimise checkbox to also boot
Made the MainForm's minimise checkbox also
start DisplayMagician on boot.
2021-04-23 17:41:59 +12:00
Terry MacDonald
d7dad2e864 Added Wait for alt game exe option
Added new 'Wait until an alternative
game executable is closed before continuing"
option to the game library part of the
ShortcutForm. This will allow people to
only change display/audio if a different
exe is closed from the game itself.

Closes #9
2021-04-23 14:14:13 +12:00
Terry MacDonald
8356290c3f [WIP] Part way through alt game exe
Have updated the loading and storing of the
alternative game exe monitoring and created
the user interface for it.

Need to next:
- create a file selection dialog
- have the file selected result in the name
   being extracted into the text file
- actually set up the RunShortcut to use
   the alternative monitoring if set
2021-04-21 22:58:45 +12:00
Terry MacDonald
c0b70cb41c Fixing audio and capture permanence 2021-04-21 21:41:36 +12:00
Terry MacDonald
d9d84cc66a Fixed DisplayProfile permanance
Fixed issue that DisplayPermanance was not
working during RunShortcut. Fixes #8

Additionally fixed some issues errors running
a shortcut.
2021-04-20 21:31:59 +12:00
Terry MacDonald
395d4fa5d9 First working version after refactor
Have fixed the mistake I made with the
Parallel.Invoke actions where I accidentally
kept adding the SteamLibrary 3 times!

This now works well, and as a bonus the
game libraries are now thread safe!
2021-04-19 22:32:58 +12:00
Terry MacDonald
4c54e72dc2 [WIP] Moving IsRunning to library
Moving the IsRunning code for the game
libraries to the library itself, rather than having
it within the ShortcutRepository.RunShortcut
function. This should make it easier to modify
each game library detection code to understand
when it is running.
2021-04-19 21:05:57 +12:00
Terry MacDonald
81edd1df2b [WIP] 1st working refactor
The program compiles and pulls
origin game data into the application.
The steam refactor didnt work as there
are 3x entries for each game being loaded
and I need to see why!

Need to also test that the new Origin
shortcuts are being loaded and saved correctly
and that the RunShortcut works now it's had
a massive refactor.
2021-04-19 20:50:29 +12:00
Terry MacDonald
4c46c6315d [WIP] Refactor Gamelibraries singleton pattern
Moved from basic static class to proper thread
safe singleton pattern for the GameLibrary to
simplify the code in ShortcutRepository.

Still only halfway through that ShortcutRepository
code refactor :(
2021-04-18 21:44:52 +12:00
Terry MacDonald
1e4ed0c546 [WIP] initial game library URI refactor 2021-04-18 15:42:00 +12:00
Terry MacDonald
44b620851a [WIP] Origin Games are detected
The Task finds the origin games and
returns them. Just need to add the logic
to actually use the returned data to
populate the game library, as well as
use the game library in the shortcuts
as well as actually run the new library too!
2021-04-16 22:40:58 +12:00
Terry MacDonald
0ec70e42c0 Updated develop changes to match
Updated the develop branch changes from
v1.0.4 to the new string based GameIDs that
we've moved to in order to support the
Origin game ids.
2021-04-10 23:13:05 +12:00
Terry MacDonald
f7d3a04f28 Updating branch with v1.0.4 release code 2021-04-10 23:04:16 +12:00
Terry MacDonald
15bcb0801b Remove uneeded class
No longer require the class
ProcessCommandLines as it's not needed
any longer.
2021-04-10 22:59:17 +12:00