Commit Graph

390 Commits

Author SHA1 Message Date
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
Terry MacDonald
0c4023fa64 Update to v1.0.4 2021-04-10 22:21:56 +12:00
Terry MacDonald
4c58920e61 Attempt to fix shortcut library drawing
This is the first attempt at fixing the shortcut
library drawing issue. When the app is frozen
waiting for some games/apps to finish, the
ImageListView refreshes, but doesn't refresh
with any icons, so it all looks a bit pants.

This is my first attempt at fixing that.
2021-04-10 21:51:51 +12:00
Terry MacDonald
325a15bf6d Fixed game process detection
Reworked the Uplay and Steam game
detection to make them more reliable.
Found a couple of logic errors that were
causing issues with process detection.
Also moved away from accessing
process.MainModule as it was causing
exceptions. Now just using process name
as it is simple and fast.
2021-04-10 21:36:03 +12:00
Terry MacDonald
066a0e30f5 Fixed Steam Update detection (probably)
Have likely fixed the steam update detection
but I'm not able to test at the moment as nothing
needs updating!
2021-04-10 20:08:46 +12:00
Terry MacDonald
b8f1007cd1 Fixed UplayLibrary reading again
This time I know it works as I have checked
games are found even if saved in different
folders on different drives, and even when
Ubiconnect is installed in a non-default
location. It even copes when games are
uninstalled and their remnants are left in
registry.
2021-04-10 19:49:32 +12:00
Terry MacDonald
8c132a79f5 [WIP] Partially working uplay scanning
Updated Uplay library scanning to work
properly, but it requires access to
the HKEY_LOCAL_MACHINE reg key,
which only works with adrministrative
rights. I really don't want to need that,
so I'll be trying to find an alternative way
to get the information I need from the file
system.
2021-04-10 19:19:42 +12:00
Terry MacDonald
b83478a031 Fixed audio volume setting
Modified some logic so that the audio device
volume and capture device volume will still
be applied even if the current device is selected.
Previous logic incorrectly would only change the
volume if the audio device was also changed.
Volume is always evaluated even if the audio
device doesn't have to change (unless don't
change audio device or don't change capture
device are selected).
2021-04-10 16:28:31 +12:00
Terry MacDonald
96749e8ba8 Fixed Desktop link without icon
Logic for determining the shortcut icon
name was flawed, and wouldn't work. Moved
to a new icon naming scheme using shortcut
UUID to make it simpler to update. Icon is written
every time that the shortcut is saved.
2021-04-10 12:25:48 +12:00
Terry MacDonald
26d2e42723 Added some extra exception handling
Added extra exception handling for the
imagelistview in the shortcut form just
in case there is an issue at some point.
2021-04-10 12:03:51 +12:00
Terry MacDonald
07f328b890 Fixing ShortcutForm audio config
Added more robustness and error checks
to handle AudioSwitcher not being able to
detect chipsets, and to cope with situations
with no active audio or capture devices.
Should be much more robust as it also
handles exceptions better, and has better
error logging.
2021-04-10 10:51:20 +12:00
Terry MacDonald
15a80ff0ac Fixed Steam library passing
Steam library processing was missing the
default steam library. This meant that only
people with additional steam libraries were
detecting games. This has been fixed now.

Added in some more TRACE logging for
Steam and for Uplay libraries.
2021-04-09 18:52:05 +12:00
Terry MacDonald
a377f3477f Fixing library with no installed games error
Both Steam and Uplay library logic would error
when the library was installed, but didn't have
any installed games. Thanks to @joeymanson23
for the report. Fixes #4.

Adds a LOT more logging to the Steam and Uplay
libraries to allow for remote troubleshooting via
the log file, especially if the logging settings are
set to TRACE.

Also fixed the long standing issue for being able
to install two copies of DisplayMagician of the
same version. Now the installer will prevent that
from happening!
2021-04-07 23:37:05 +12:00
Terry MacDonald
3fcd90a542 Create app dirs on first boot
Also improve logging detail when
loglevel is set to trace.
2021-04-04 21:49:37 +12:00
Terry MacDonald
ac48efe19d [WIP] Correction of game search 2021-04-02 22:25:38 +13:00
Terry MacDonald
87fcc3e8d0 [WIP] Adding Origin Library 2021-03-31 21:43:34 +13:00
Terry MacDonald
64871f3ddc Update to v1.0.3
Had to update the version so that the
new explorer reboot during setup upgrade
will work.
2021-03-28 22:32:48 +13:00
Terry MacDonald
081d54cbb1 Fixed Game process detection
Also updated the update json so that
it will update correctly.
2021-03-28 21:52:55 +13:00
Terry MacDonald
44e7f0df38 Update toversion 1.0.2 2021-03-28 20:28:42 +13:00
Terry MacDonald
965f73377b Changed shortcut cancellation logic 2021-03-28 20:25:01 +13:00
Terry MacDonald
5b3249642f Can close ApplyingProfile if needed
If there was a problem with applying
a displayprofile, then the exception
would stop the ApplyProfile window
from being closed. And as it was set
to top most window, the user wouldnt
be able to make any changes and would
have to reboot their computer. I have
added an X button up to top right of the
screen to allow people to close the window
when there is a problem.
2021-03-27 21:27:52 +13:00
Terry MacDonald
c7381131f0 DisplayProfile updates properly
DisplayProfile updates after a profile
switch properly. The UI wasn't reflecting
the proper changes after a profile change
made from the DisplayProfile page, but
now it does.
2021-03-27 21:19:30 +13:00
Terry MacDonald
e913640751 Separated profile equals from possible
This change was to separate 'Equals'
(which checks for exactly the same) with
'Possible' (which checks that the connected
displays are available to use. Should make
the profile comparison a lot more accurate.
2021-03-27 16:15:17 +13:00
Terry MacDonald
1b6cc7967d Fixed Profile matching for Surround
Fixed the Profile.Equals logic so that it
could detect the difference between
Surround and non-Surround triple screen
configurations. Now seems to work fine.

Also adjusted the ProfileAdapter so that
the profile imagelistview works correctly.
Moved to using the UUID rather than the
name to allow users to change the name
without affecting the UUID. That was a
change I should have made AGES ago.
2021-03-26 22:57:05 +13:00
Terry MacDonald
11cd923e46 Changed profile matching logic
Relaxed the profile matching logic to
use my looser displayidentifier logic
as it is more likely that connections to
a display is changed rather thant the
display paths, resolution or anything like
that. Will use this as an experiment to
see if it works or not.

Also fixed the shortcut renaming errors
by searching for the UUID, not the shortcut
name which is the pretty much the way
I should have done it in the first place!
2021-03-26 21:54:45 +13:00
Terry MacDonald
5e9c02aa68 Fixed the notify icon when minimised
When the notifyicon was minimised we had
problems as it would close the main window
when trying to update the icon text. This is
fixed now.
2021-03-17 21:38:16 +13:00
Terry MacDonald
baa275b8a6 Option to start pgm only if needed
Added the ability for user to only start a
program if it hasn't been started yet. This
is for things like SimHub that should
already be started by Windows when the
PC first boots.

Also corrects a bug that ignored the autoname
property so that it overwrote the suggested
filename when saving a shortcut.
2021-03-17 21:25:42 +13:00
Terry MacDonald
77110db114 Stop DM closing after running a shortcut
Also allow people to click on the startprograms
checkbox labels to have them change the
checkboxes themselves.
2021-03-17 20:44:59 +13:00
Terry MacDonald
f9de793998 Stop desktop save from closing window
Stop 'save to desktop' button closing the
shortcut window (and the profile window too!)
2021-03-17 20:25:34 +13:00
Terry MacDonald
795f006e2d Updating versions to 1.0.1 2021-03-17 20:13:06 +13:00
Terry MacDonald
87b73adf66 Preparing docs for first release
Also updated the update.json to match.
2021-03-14 21:33:23 +13:00
Terry MacDonald
9f674a1eaf Added donate button and realigned UI 2021-03-14 20:54:03 +13:00
Terry MacDonald
f4c34f5cff Updated nuget packages 2021-03-12 10:09:35 +13:00
Terry MacDonald
75ac861ee7 Changed version to v1.0.0 2021-03-11 21:31:53 +13:00
Terry MacDonald
65bcdf2cd1 Profile changing timer now top most
I had removed the top most setting from
the profile changing window while I was
testing long ago, and I only now
remembered to add it back in!
2021-03-11 21:22:42 +13:00
Terry MacDonald
7b02b9db3b Fixed exception returning from ShortcutForm
ImageListView was too keen when a shortcut was
renamed and it tried updating ShortcutLibraryForm
straight away when it reutned, even before we had
a chance to update the data to ILV uses to populate
itself. The fix was to stop ILV being so keen, and to
suspend ILV from doing redraws until we had a
chance to refresh the UI. Problem solved.
2021-03-11 21:18:19 +13:00
Terry MacDonald
97a586720e Fixes shortcut profile validation
Shortcuts checks for profile validity weren't
very good, but now they work properly. This
helps the notify menu item shortcuts as well.
2021-03-07 17:28:07 +13:00
Terry MacDonald
4531a0d4d5 [WIP] Partially working shortcut detection
Fixed the profile validitiy detection on load,
but now have issue with the shortcut detection
2021-03-07 17:11:46 +13:00
Terry MacDonald
1588cd6a0b Added Save to Desktop Profile Button
Added a button to save a profile shortcut
to the Windows desktop. This will enable
people to quickly change to another display
configuration if they want to using a desktop
display. This will work even if they are unable
to get admin rights to install the background
popup menu.
2021-03-07 14:50:52 +13:00
Terry MacDonald
79597b077f Fixed profile selection for Shortcuts
Fixed the logic for profile selection on
shortcuts so that the profile is either
selected or not based on its existence
or whether the profile is valid to use now
or whether the shortcut is new.
2021-03-07 14:24:58 +13:00
Terry MacDonald
5260d8a087 Refactor shortcut validity
Moved the logic to the right places.
Removed the need for the separate
error and warning lookup arrays.
2021-03-07 13:45:49 +13:00
Terry MacDonald
7b9a676cb6 Disabled internal NLog debugging 2021-03-06 17:55:04 +13:00
Terry MacDonald
07ceed3ec4 Make red error when sc profile gone
This will inform the user to choose another
profile when the profile is used in a shortcut
and yet the profile doesn't exist any longer
2021-03-06 17:43:07 +13:00
Terry MacDonald
cac7810ed5 Added red error triangle
Planning on using this to highlight
shortcuts that cannot work because the
profile has been deleted.
2021-03-05 15:24:11 +13:00
Terry MacDonald
ed4b92fb30 Updated styling of SC profile selector
Updated styling of the profile selector in the
shortcut editing form. It now looks the same
as the others. There is now a slightly annoying
problem where clicking elsewhere in the form
deselects the imagelistview selection, but that
is a small thing to worry about later.
2021-03-05 15:10:53 +13:00
Terry MacDonald
34ae9069c7 Refactored tracking errors
Moved tracking profile errors into ProfileRepository
and moved shortcut errors into ShortcutRepository.
2021-03-05 14:44:53 +13:00
Terry MacDonald
001e351106 Fixing error loading games
It was erroring when loading games into
a blank shortcut screen. This was stopping
us being able to select any games at all.
Fixed another problem with Shortcut.IsValid
causing exception when loading a profle
that no longer existed. It now will correctly
report that the shortcut is isvalid.
2021-03-05 11:12:27 +13:00
Terry MacDonald
634322ed05 Hide all run options when invalid
Added some checks to stop the shortcut 'run'
option being shown in shortcut and button
form when a shortcut is invalid.
2021-03-05 10:45:18 +13:00
Terry MacDonald
f22450b9a0 Fix profile selection issues
Fixed the profiles selection so it doesn't change
when you swap screens. Made the 'View
current display' button refresh the profile validity
too, so that a user now only has to change their
display settings in Windows and then swap back
DisplayMagician and click the View Current Display
button and the profiles will be updated.
2021-03-05 10:34:51 +13:00
Terry MacDonald
fad79cd315 [WIP] fixing profile ILV
Fixing text position and sorting
out the selection rectangle. Have
fixed the shortcut library window
and working fine now.
2021-03-01 21:35:03 +13:00
Terry MacDonald
c3fe6c5b50 Refactor image utils into own class 2021-03-01 20:10:47 +13:00
Terry MacDonald
d6a5b752c9 [WIP] partial profiles ILV render creation 2021-02-28 21:34:59 +13:00
Terry MacDonald
f122719b80 Sped up profile possbility detection
Now caches the possbility detection for
profiles, so it only runs the expensive
detection logic when the UI changes.
2021-02-28 21:24:12 +13:00
Terry MacDonald
7d411b0aff FIxed invalid shortcut detection
Made the shortcuts that were invalid
visually different to the others. This is
now working properly!
2021-02-28 20:55:03 +13:00
Terry MacDonald
3a180d8813 Working shortcut library highlighting
Highlighting colours and structure changed
to work better with the ILV structure. Next step
is to add the ability to visually show invalid
shortcuts to notify when a shortcut won't
work.
2021-02-28 15:34:50 +13:00
Terry MacDonald
29b3989645 Tweaked ILV shortcut display
Aligned the new custom ILV shortcut drawing
so that it looks better.
2021-02-28 11:26:59 +13:00
Terry MacDonald
25df13e52a Library include cleanup 2021-02-21 20:23:41 +13:00
Terry MacDonald
79f535ce08 Fixing broken NLog config 2021-02-20 23:14:16 +13:00
Terry MacDonald
bb37dc908a Changed LogLevel applies immediately
Configured NLog so that the loglevel
UI changes happen straight away. Also
am using NLog to generate the user
messages while it's running.
2021-02-20 22:03:19 +13:00
Terry MacDonald
2959d5f280 Changing the default logging level to info 2021-02-20 21:04:58 +13:00
Terry MacDonald
d9da0a6e8f Shortcut library UI improvements
Added a messagebox to warn the user
when they try to run an invalid shortcut.
It now asks the user if they really want to
do it, or it directly opens the 'edit' window
for if they want to fix things now.
2021-02-15 21:29:12 +13:00
Terry MacDonald
a251962207 Partially added the Uplay Library logging 2021-02-15 20:47:56 +13:00
Terry MacDonald
6b02e2ccbe Added logging and improved readme
Added logging to ProfileRepository and
ShortcutRepository
2021-02-15 20:33:46 +13:00
Terry MacDonald
aece0cce29 Added extra debug logging 2021-02-14 22:42:48 +13:00
Terry MacDonald
b6c007fe6f Updated shortcut repository logging
Added yet more debug logging to the
software so we can get information when
there is an error.
2021-02-14 12:00:47 +13:00
Terry MacDonald
24c1ff29b4 Applied logging to program.cs
Continued to apply logging to the
various software components so that
we can get debugging logs when the
software is released for use.
2021-02-14 09:18:49 +13:00
Terry MacDonald
dd8939b395 Logging changes
Combined DisplayMagicianShared logging into
the main log file to simplify log reporting for the
future. Also started adding info and debug
statements to the program to make the debug
level log work well for troubleshooting. This is
going to take a LONG time to complete, but will
be worth it in the end.
2021-02-10 22:40:22 +13:00
Terry MacDonald
d6834b635c Disabled old FxCop Code analysis
Disabled the FxCopCode Analysis for the
release build in DisplayMagician project.
Should be only using the new .net nuget
package for code analysis.
2021-02-07 15:59:02 +13:00
Terry MacDonald
09a1ca1c96 Updated nuget libraries 2021-02-07 15:47:48 +13:00
Terry MacDonald
a06651190d Upgrade nuget libraries
Upgrade CommanlineUtils, HTMLAgility
and other libraries. Leaving ValveKeyValue
as it requires some breaking changes.
2021-02-07 15:22:54 +13:00
Terry MacDonald
ba636414c0 Improve exception handling of existing ex
Added logger instances for DisplayMagicianShared
functions. Also added logger debug commands to
all exceptions with existing ex objects.
2021-02-07 14:42:17 +13:00
Terry MacDonald
0f38881709 More code analysis suppression 2021-01-28 22:20:00 +13:00
Terry MacDonald
88bd1a71fa Fixing some CodeAnalyzer suggestions 2021-01-28 22:03:02 +13:00
Terry MacDonald
6ab1e0842a Additional suppression messages 2021-01-28 21:34:45 +13:00
Terry MacDonald
3ecababc73 Suppressing CLS compliance errors
Some functions and procedures require CLS
non-compliance due to file formats and the like.
Suppressing these compiler warnings
2021-01-28 21:19:20 +13:00
Terry MacDonald
0afe349eea Converted uint to int
This was done to be more CLS language compliant.
2021-01-28 20:58:35 +13:00
Terry MacDonald
ae106223a0 Removing editorconfig 2021-01-18 07:40:13 +13:00
Terry MacDonald
2b56d3e2b2 Fixing some UI misalignment
Changed some misanchored UI
elements so that they will move correctly
when the UI windows are resized. Also
fixed a mistake that meant the 'Create
Shortcut' message wasn't hidden
when it should be.
2021-01-07 17:31:26 +13:00
Terry MacDonald
3f46beafd3 Reorganisation of Game Start tab
Made a messsage to inform the user
we could't detect any supported game
libraries.
2021-01-07 15:17:37 +13:00
Terry MacDonald
b028ad4478 Align custom paint on form
Fix up misalignment with label
radio button, checkbox when
drawing not enabled on a black
background.
2021-01-07 14:56:29 +13:00
Terry MacDonald
fef3fb34a7 Fully works with no game libraries
Now can handle when no game libraries
are detected. Need to make the game/application
UI nicer by adding groupboxes to it.
2021-01-07 11:51:02 +13:00
Terry MacDonald
8336e910b0 Works without Game libraries installed
Basic checks for game libraries so program
will work with neither Steam or Uplay now.
2021-01-06 16:19:45 +13:00
Terry MacDonald
f1c484637c Modified Game Library installation checks
UplayLibrary was erroring when run without
Uplay installed. Needed to tweak it so that
DisplayMagician will work without Uplay
library or Steam library installed.
2021-01-06 16:00:52 +13:00
Terry MacDonald
ff33dfb95a Fixed SteamGame race condition
Found issue where the IsRunning process
checks were breaking because they were
being running before the steam process
had a chance to create the process. This
meant the information wasn't aviailable for
the SteamGame.IsRunning function to
inspect. Fixed by adding in a 0.5 sec delay.
2020-12-30 22:48:42 +13:00
Terry MacDonald
73d1735769 Added start on boot
Works fine, but just found an error
when DM is minimsed and running a
steamGame.
2020-12-30 22:40:21 +13:00
Terry MacDonald
93fc295bf2 Fixing automatic admin version upgrade
Upgrade processs wasn't upgrading using
elevated privileges. Appears to be doing so
now.
2020-12-28 23:17:13 +13:00
Terry MacDonald
ed167459fa Fixed UplayGame monitoring
Also fixed errors caused by trying to access
32bit processes information from 64-bit
processes by using smoe cool code thanks
to Jeff Mercado and Mike Fuchs:
https://stackoverflow.com/questions/9501771/how-to-avoid-a-win32-exception-when-accessing-process-mainmodule-filename-in-c
2020-12-28 21:34:59 +13:00
Terry MacDonald
c7a1f1ab55 Fix Code Analysis changes that broke things 2020-12-28 10:34:15 +13:00
Terry MacDonald
49329b870e Initial Code Analysis fixes
Also fixed up the Setup properties
file for x64 build configuration.
2020-12-26 21:46:32 +13:00
Terry MacDonald
6759cc4aa0 Renaming main buttons 2020-12-26 20:20:35 +13:00
Terry MacDonald
b5d6f3f680 Fully working Windows Toast 2020-12-26 16:59:45 +13:00
Terry MacDonald
e53f76f0ce Working open and exit toasts
Toasts working for minimised start (allows use to
open the application) and for minimised close
(allows user to open the application or exit the
application).
2020-12-23 21:13:21 +13:00
Terry MacDonald
15386ba756 Basic bidirectional notifications working 2020-12-23 18:29:20 +13:00
Terry MacDonald
2148db3e95 Fixing program settings loglevel
Had missed Fatal loglevel and missed
a mixedcase Error log level. Meant both
logging levels were broken. Now fixed.
2020-12-22 23:23:28 +13:00
Terry MacDonald
26796c9e46 Fixed MainForm control placement 2020-12-22 23:00:25 +13:00
Terry MacDonald
e4ed01f33b Added .Net 4.8 and Win 10 checks to installer 2020-12-21 15:02:06 +13:00
Terry MacDonald
7bc81f0075 Added ShellExtension.dll registration
Now the Desktop Popup Menu works!
2020-12-20 22:27:52 +13:00
Terry MacDonald
9e1ef4a095 [WIP] First working WiX installer
Installer works, but there are a few issues with it.
- It doesn't register the DesktopBackground COM server
- It doesn't create a start menu shortcut with the AUMID
- It doesn't check for .Net Framework 4.8 or later
- It doesn't try to install .Net Framework 4.8 or later if not there
- It doesn't have any customised backgrounds...
- It doesn't ask to run DisplayMagician when install is finished
2020-12-20 20:42:04 +13:00
Terry MacDonald
41fd798a07 Renamed projects to work with WiX file harvesting 2020-12-20 15:50:32 +13:00
Terry MacDonald
3a2b74b049 [WIP] Basic Notification Compat intergration 2020-12-20 15:21:53 +13:00
Terry MacDonald
33689931ca Moved AUMID to Shared project
And also added it to the LogReporter
project.
2020-12-20 12:45:50 +13:00