mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Merge branch 'develop' into feature-installed-programs
This commit is contained in:
@ -26,8 +26,8 @@ using System.Resources;
|
|||||||
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
[assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")]
|
||||||
|
|
||||||
// Version information
|
// Version information
|
||||||
[assembly: AssemblyVersion("2.4.1.1")]
|
[assembly: AssemblyVersion("2.4.1.4")]
|
||||||
[assembly: AssemblyFileVersion("2.4.1.1")]
|
[assembly: AssemblyFileVersion("2.4.1.4")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en" )]
|
||||||
[assembly: CLSCompliant(true)]
|
[assembly: CLSCompliant(true)]
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.lbl_hotkey_assigned.ForeColor = System.Drawing.Color.White;
|
this.lbl_hotkey_assigned.ForeColor = System.Drawing.Color.White;
|
||||||
this.lbl_hotkey_assigned.Location = new System.Drawing.Point(21, 39);
|
this.lbl_hotkey_assigned.Location = new System.Drawing.Point(21, 39);
|
||||||
this.lbl_hotkey_assigned.Name = "lbl_hotkey_assigned";
|
this.lbl_hotkey_assigned.Name = "lbl_hotkey_assigned";
|
||||||
this.lbl_hotkey_assigned.Size = new System.Drawing.Size(57, 16);
|
this.lbl_hotkey_assigned.Size = new System.Drawing.Size(56, 16);
|
||||||
this.lbl_hotkey_assigned.TabIndex = 36;
|
this.lbl_hotkey_assigned.TabIndex = 36;
|
||||||
this.lbl_hotkey_assigned.Text = "Hotkey: ";
|
this.lbl_hotkey_assigned.Text = "Hotkey: ";
|
||||||
this.lbl_hotkey_assigned.Visible = false;
|
this.lbl_hotkey_assigned.Visible = false;
|
||||||
|
@ -548,7 +548,7 @@ namespace DisplayMagician.UIForms
|
|||||||
// Refresh the profiles to see whats valid
|
// Refresh the profiles to see whats valid
|
||||||
ProfileRepository.IsPossibleRefresh();
|
ProfileRepository.IsPossibleRefresh();
|
||||||
// Reload the profiles in case we swapped to another program to change it
|
// Reload the profiles in case we swapped to another program to change it
|
||||||
ProfileRepository.UpdateActiveProfile();
|
ProfileRepository.UpdateActiveProfile(false);
|
||||||
// Change to the current selected Profile
|
// Change to the current selected Profile
|
||||||
ChangeSelectedProfile(ProfileRepository.GetActiveProfile());
|
ChangeSelectedProfile(ProfileRepository.GetActiveProfile());
|
||||||
// Refresh the Profile UI
|
// Refresh the Profile UI
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
<data name="pb_down_arrow.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="pb_down_arrow.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
|
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
|
||||||
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJ
|
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAB3RJ
|
||||||
TUUH5AUIFiwD9MaxfQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAXHSURBVHhe
|
TUUH5AUIFiwD9MaxfQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAXHSURBVHhe
|
||||||
7dy7il1VHMfxHQWJrYpYBBwtktlnJ7EQ8QHURrARfAFBwbcQQdTCQtF3EIlaWNkpqBgrczLjBQMpLIKV
|
7dy7il1VHMfxHQWJrYpYBBwtktlnJ7EQ8QHURrARfAFBwbcQQdTCQtF3EIlaWNkpqBgrczLjBQMpLIKV
|
||||||
hTfQJOPeM3uZzMnJ5MycfVlr7c8HviSZc6ny++fADCkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
hTfQJOPeM3uZzMnJ5MycfVlr7c8HviSZc6ny++fADCkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
@ -160,7 +160,7 @@
|
|||||||
<value>248, 17</value>
|
<value>248, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="lbl_save_profile.Text" xml:space="preserve">
|
<data name="lbl_save_profile.Text" xml:space="preserve">
|
||||||
<value>Setup your display layout in NVIDIA Control Panel, AMD Radeon Adrenaline or Windows Display Settings, then return to DisplayMagician and click 'Save' to store this Display Profile for later use. If you make any Taskbar changes please press 'View Current Display' button after waiting 5 seconds.</value>
|
<value>Setup your display layout in NVIDIA Control Panel, AMD Radeon Adrenaline or Windows Display Settings, then return to DisplayMagician and click 'Save' to store this Display Profile for later use. It may take up to 20 seconds to save the Display Profile.</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="dialog_save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="dialog_save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>358, 17</value>
|
<value>358, 17</value>
|
||||||
@ -174,7 +174,7 @@
|
|||||||
L6wlizhexCplZoSlcvyZ9LL6fY9biU/PTk3K2iKzGYsIw4TRGGWQAUJ00yc+RCdBumRHifhALn6CJYlV
|
L6wlizhexCplZoSlcvyZ9LL6fY9biU/PTk3K2iKzGYsIw4TRGGWQAUJ00yc+RCdBumRHifhALn6CJYlV
|
||||||
4g1WMV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B/+uwqMMQy2qwMOIkCpiJCis
|
||||||
D8qt24dJFU2HKl19A7uRQ0iogjJ1IRpFwiEVkXMIT10Rcgjf1qcTh5opVQWz4oM0QUWK0BGzCKVKO9/O
|
D8qt24dJFU2HKl19A7uRQ0iogjJ1IRpFwiEVkXMIT10Rcgjf1qcTh5opVQWz4oM0QUWK0BGzCKVKO9/O
|
||||||
|
@ -478,7 +478,7 @@ namespace DisplayMagicianShared
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public bool CreateProfileFromCurrentDisplaySettings()
|
public bool CreateProfileFromCurrentDisplaySettings(bool fastScan = true)
|
||||||
{
|
{
|
||||||
// Calling the 3 different libraries automatically gets the different configs from each of the 3 video libraries.
|
// Calling the 3 different libraries automatically gets the different configs from each of the 3 video libraries.
|
||||||
// If the video library isn't in use then it also fills in the defaults so that the JSON file can save properly
|
// If the video library isn't in use then it also fills in the defaults so that the JSON file can save properly
|
||||||
@ -495,16 +495,16 @@ namespace DisplayMagicianShared
|
|||||||
if (VideoMode == VIDEO_MODE.NVIDIA && nvidiaLibrary.IsInstalled)
|
if (VideoMode == VIDEO_MODE.NVIDIA && nvidiaLibrary.IsInstalled)
|
||||||
{
|
{
|
||||||
nvidiaLibrary.UpdateActiveConfig();
|
nvidiaLibrary.UpdateActiveConfig();
|
||||||
winLibrary.UpdateActiveConfig();
|
winLibrary.UpdateActiveConfig(fastScan);
|
||||||
}
|
}
|
||||||
else if (VideoMode == VIDEO_MODE.AMD && amdLibrary.IsInstalled)
|
else if (VideoMode == VIDEO_MODE.AMD && amdLibrary.IsInstalled)
|
||||||
{
|
{
|
||||||
amdLibrary.UpdateActiveConfig();
|
amdLibrary.UpdateActiveConfig();
|
||||||
winLibrary.UpdateActiveConfig();
|
winLibrary.UpdateActiveConfig(fastScan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
winLibrary.UpdateActiveConfig();
|
winLibrary.UpdateActiveConfig(fastScan);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grab the profile data from the current stored config (that we just updated)
|
// Grab the profile data from the current stored config (that we just updated)
|
||||||
|
@ -696,7 +696,7 @@ namespace DisplayMagicianShared
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void UpdateActiveProfile()
|
public static void UpdateActiveProfile(bool fastScan = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
SharedLogger.logger.Debug($"ProfileRepository/UpdateActiveProfile: Updating the profile currently active (in use now).");
|
SharedLogger.logger.Debug($"ProfileRepository/UpdateActiveProfile: Updating the profile currently active (in use now).");
|
||||||
@ -751,7 +751,7 @@ namespace DisplayMagicianShared
|
|||||||
//ShellHelper.TellShellToWriteSettings();
|
//ShellHelper.TellShellToWriteSettings();
|
||||||
//WinLibrary.RefreshTaskBars();
|
//WinLibrary.RefreshTaskBars();
|
||||||
|
|
||||||
profile.CreateProfileFromCurrentDisplaySettings();
|
profile.CreateProfileFromCurrentDisplaySettings(fastScan);
|
||||||
|
|
||||||
if (_profilesLoaded && _allProfiles.Count > 0)
|
if (_profilesLoaded && _allProfiles.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -473,12 +473,12 @@ namespace DisplayMagicianShared.Windows
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UpdateActiveConfig()
|
public bool UpdateActiveConfig(bool fastScan = true)
|
||||||
{
|
{
|
||||||
SharedLogger.logger.Trace($"WinLibrary/UpdateActiveConfig: Updating the currently active config");
|
SharedLogger.logger.Trace($"WinLibrary/UpdateActiveConfig: Updating the currently active config");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_activeDisplayConfig = GetActiveConfig();
|
_activeDisplayConfig = GetActiveConfig(fastScan);
|
||||||
_allConnectedDisplayIdentifiers = GetAllConnectedDisplayIdentifiers();
|
_allConnectedDisplayIdentifiers = GetAllConnectedDisplayIdentifiers();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -490,14 +490,14 @@ namespace DisplayMagicianShared.Windows
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WINDOWS_DISPLAY_CONFIG GetActiveConfig()
|
public WINDOWS_DISPLAY_CONFIG GetActiveConfig(bool fastScan = true)
|
||||||
{
|
{
|
||||||
SharedLogger.logger.Trace($"WinLibrary/GetActiveConfig: Getting the currently active config");
|
SharedLogger.logger.Trace($"WinLibrary/GetActiveConfig: Getting the currently active config");
|
||||||
// We'll leave virtual refresh rate aware until we can reliably detect Windows 11 versions.
|
// We'll leave virtual refresh rate aware until we can reliably detect Windows 11 versions.
|
||||||
return GetWindowsDisplayConfig(QDC.QDC_ONLY_ACTIVE_PATHS);
|
return GetWindowsDisplayConfig(QDC.QDC_ONLY_ACTIVE_PATHS, fastScan);
|
||||||
}
|
}
|
||||||
|
|
||||||
private WINDOWS_DISPLAY_CONFIG GetWindowsDisplayConfig(QDC selector = QDC.QDC_ONLY_ACTIVE_PATHS)
|
private WINDOWS_DISPLAY_CONFIG GetWindowsDisplayConfig(QDC selector = QDC.QDC_ONLY_ACTIVE_PATHS, bool fastScan = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Prepare the empty windows display config
|
// Prepare the empty windows display config
|
||||||
@ -909,25 +909,32 @@ namespace DisplayMagicianShared.Windows
|
|||||||
// Check whether Windows has actually added the registry keys that outline the taskbar position
|
// Check whether Windows has actually added the registry keys that outline the taskbar position
|
||||||
if (retryNeeded)
|
if (retryNeeded)
|
||||||
{
|
{
|
||||||
// We wait until the reg key is populated
|
if (fastScan)
|
||||||
for (int count = 1; count <= 4; count++)
|
|
||||||
{
|
{
|
||||||
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: We were unable to get all the Windows Taskbar Layouts! So we need to try again. Attempt {count} of 4.");
|
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: Skipping retrying Windows Taskbar Layouts and just accepting the first locations");
|
||||||
|
|
||||||
// Wait 5 seconds
|
|
||||||
System.Threading.Thread.Sleep(5000);
|
|
||||||
// then try again
|
|
||||||
retryNeeded = false;
|
|
||||||
taskBarStuckRectangles = TaskBarLayout.GetAllCurrentTaskBarLayouts(windowsDisplayConfig.DisplaySources, out retryNeeded);
|
|
||||||
|
|
||||||
if (!retryNeeded)
|
|
||||||
{
|
|
||||||
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: We successfully got the Windows Taskbar Layouts on attempt {count}! So we can stop trying to get them");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
// We wait until the reg key is populated
|
||||||
|
for (int count = 1; count <= 4; count++)
|
||||||
|
{
|
||||||
|
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: We were unable to get all the Windows Taskbar Layouts! So we need to try again. Attempt {count} of 4.");
|
||||||
|
|
||||||
|
// Wait 5 seconds
|
||||||
|
System.Threading.Thread.Sleep(5000);
|
||||||
|
// then try again
|
||||||
|
retryNeeded = false;
|
||||||
|
taskBarStuckRectangles = TaskBarLayout.GetAllCurrentTaskBarLayouts(windowsDisplayConfig.DisplaySources, out retryNeeded);
|
||||||
|
|
||||||
|
if (!retryNeeded)
|
||||||
|
{
|
||||||
|
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: We successfully got the Windows Taskbar Layouts on attempt {count}! So we can stop trying to get them");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Now we try to get the taskbar settings too
|
// Now we try to get the taskbar settings too
|
||||||
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: Attempting to get the Windows Taskbar Settings.");
|
SharedLogger.logger.Trace($"WinLibrary/GetWindowsDisplayConfig: Attempting to get the Windows Taskbar Settings.");
|
||||||
|
Reference in New Issue
Block a user