mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 00:22:18 -05:00
restructured code (wip), add game launcher and quick access
This commit is contained in:
1 parent
41cf8ae3e2
commit
5836f88ef0
144 files changed
+2769
-804
No files matched your search
@@ -5,6 +5,8 @@ VisualStudioVersion = 17.0.32014.148
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ColorControl", "ColorControl\ColorControl.csproj", "{A6005D08-70F0-44CB-A384-9219EBA84F21}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nspector", "Nspector\Nspector.csproj", "{76797290-48F5-4A82-86C3-FAD25DAE4500}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -21,6 +23,14 @@ Global
|
||||
{A6005D08-70F0-44CB-A384-9219EBA84F21}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A6005D08-70F0-44CB-A384-9219EBA84F21}.Release|x64.ActiveCfg = Release|x64
|
||||
{A6005D08-70F0-44CB-A384-9219EBA84F21}.Release|x64.Build.0 = Release|x64
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{76797290-48F5-4A82-86C3-FAD25DAE4500}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0-windows10.0.20348.0</TargetFramework>
|
||||
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
@@ -18,8 +18,8 @@
|
||||
<PublisherName>Maassoft</PublisherName>
|
||||
<Company>Maassoft</Company>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>6.0.0.0</ApplicationVersion>
|
||||
<Version>6.0.0.0</Version>
|
||||
<ApplicationVersion>7.0.0.0</ApplicationVersion>
|
||||
<Version>7.0.0.0</Version>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>false</BootstrapperEnabled>
|
||||
@@ -53,7 +53,10 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="RemoteControlPanel.cs">
|
||||
<Compile Update="Services\Common\QuickAccessForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="services\lg\RemoteControlPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Resources\LG_register.json" />
|
||||
@@ -93,12 +96,9 @@
|
||||
<PackageReference Include="TaskScheduler" Version="2.9.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="nspector\CustomSettingNames.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="nspector\Reference.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<ProjectReference Include="..\Nspector\Nspector.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Common
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
namespace ColorControl.Common
|
||||
{
|
||||
public static class ProcessExtensions
|
||||
{
|
||||
private static string FindIndexedProcessName(int pid, string processName, IEnumerable<Process> processes = null)
|
||||
{
|
||||
var processesByName = processes == null ? Process.GetProcessesByName(processName) : processes.Where(p => p.ProcessName.Equals(processName, StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
string processIndexedName = null;
|
||||
|
||||
for (var index = 0; index < processesByName.Length; index++)
|
||||
{
|
||||
processIndexedName = index == 0 ? processName : processName + "#" + index;
|
||||
var processId = new PerformanceCounter("Process", "ID Process", processIndexedName);
|
||||
if ((int)processId.NextValue() == pid)
|
||||
{
|
||||
return processIndexedName;
|
||||
}
|
||||
}
|
||||
|
||||
return processIndexedName;
|
||||
}
|
||||
|
||||
private static Process FindPidFromIndexedProcessName(string indexedProcessName, IEnumerable<Process> processes = null)
|
||||
{
|
||||
var parentId = new PerformanceCounter("Process", "Creating Process ID", indexedProcessName);
|
||||
var parentProcessId = (int)parentId.NextValue();
|
||||
|
||||
try
|
||||
{
|
||||
return processes == null ? Process.GetProcessById(parentProcessId) : processes.FirstOrDefault(p => p.Id == parentProcessId);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Process Parent(this Process process, IEnumerable<Process> processes = null)
|
||||
{
|
||||
var indexedProcessName = FindIndexedProcessName(process.Id, process.ProcessName, processes);
|
||||
if (indexedProcessName == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return FindPidFromIndexedProcessName(indexedProcessName, processes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.Win32;
|
||||
using ColorControl.Forms;
|
||||
using Microsoft.Win32;
|
||||
using Microsoft.Win32.TaskScheduler;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NStandard;
|
||||
using NWin32;
|
||||
using NWin32.NativeTypes;
|
||||
using System;
|
||||
@@ -23,7 +23,7 @@ using System.Windows.Forms;
|
||||
using Windows.Devices.Enumeration;
|
||||
using Windows.Devices.Enumeration.Pnp;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Common
|
||||
{
|
||||
static class Utils
|
||||
{
|
||||
@@ -36,23 +36,6 @@ namespace ColorControl
|
||||
Win = 8
|
||||
}
|
||||
|
||||
public enum UserNotificationState : int
|
||||
{
|
||||
QUNS_NOT_PRESENT = 1,
|
||||
QUNS_BUSY,
|
||||
QUNS_RUNNING_D3D_FULL_SCREEN,
|
||||
QUNS_PRESENTATION_MODE,
|
||||
QUNS_ACCEPTS_NOTIFICATIONS,
|
||||
QUNS_QUIET_TIME,
|
||||
QUNS_APP
|
||||
}
|
||||
|
||||
public static UserNotificationState[] NotificationsDisabledStates = new[] {
|
||||
UserNotificationState.QUNS_BUSY,
|
||||
UserNotificationState.QUNS_RUNNING_D3D_FULL_SCREEN,
|
||||
UserNotificationState.QUNS_PRESENTATION_MODE,
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
internal struct POWERBROADCAST_SETTING
|
||||
{
|
||||
@@ -80,12 +63,6 @@ namespace ColorControl
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool UnregisterHotKey(IntPtr hWnd, int id);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public extern static bool ShutdownBlockReasonCreate(IntPtr hWnd, [MarshalAs(UnmanagedType.LPWStr)] string pwszReason);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public extern static bool ShutdownBlockReasonDestroy(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool EnumDisplaySettingsA(string deviceName, int modeNum, out DEVMODEA devMode);
|
||||
|
||||
@@ -100,27 +77,14 @@ namespace ColorControl
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool FreeConsole();
|
||||
|
||||
[DllImport("shell32.dll")]
|
||||
public static extern int SHQueryUserNotificationState(out UserNotificationState pquns);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
|
||||
|
||||
[DllImport(@"User32", SetLastError = true)]
|
||||
public static extern IntPtr RegisterPowerSettingNotification(IntPtr hRecipient, ref Guid PowerSettingGuid, Int32 Flags);
|
||||
|
||||
[DllImport("User32.dll", SetLastError = true)]
|
||||
public static extern bool UnregisterPowerSettingNotification(IntPtr hWnd);
|
||||
|
||||
//[DllImport("Wtsapi32.dll")]
|
||||
//public extern static bool WTSRegisterSessionNotification(IntPtr hWnd, uint dwFlags);
|
||||
|
||||
//[DllImport("Wtsapi32.dll")]
|
||||
//public extern static bool WTSUnRegisterSessionNotification(IntPtr hWnd);
|
||||
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
private static bool WinKeyDown = false;
|
||||
private static UserNotificationState LastNotificationState;
|
||||
private static Keys[] KeysWithoutModifiers = new[] { Keys.F13, Keys.F14, Keys.F15, Keys.F16, Keys.F17, Keys.F18, Keys.F19, Keys.F20, Keys.F21, Keys.F22, Keys.F23, Keys.F24 };
|
||||
|
||||
public static Bitmap SubPixelShift(Bitmap bitmap)
|
||||
@@ -216,6 +180,34 @@ namespace ColorControl
|
||||
return (mods, key);
|
||||
}
|
||||
|
||||
public static Keys ShortcutToKeys(string shortcut)
|
||||
{
|
||||
var (mods, key) = ParseShortcut(shortcut);
|
||||
|
||||
var keys = Keys.None;
|
||||
|
||||
if (((uint)mods & (uint)ModKeys.Alt) > 0)
|
||||
{
|
||||
keys |= Keys.Alt;
|
||||
}
|
||||
if (((uint)mods & (uint)ModKeys.Control) > 0)
|
||||
{
|
||||
keys |= Keys.Control;
|
||||
}
|
||||
if (((uint)mods & (uint)ModKeys.Shift) > 0)
|
||||
{
|
||||
keys |= Keys.Shift;
|
||||
}
|
||||
if (((uint)mods & (uint)ModKeys.Win) > 0)
|
||||
{
|
||||
keys |= Keys.Control;
|
||||
}
|
||||
|
||||
keys |= (Keys)key;
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
internal static bool ExecuteElevated(string args)
|
||||
{
|
||||
var info = new ProcessStartInfo(Process.GetCurrentProcess().MainModule.FileName, args)
|
||||
@@ -413,16 +405,6 @@ namespace ColorControl
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetNotifyIconText(NotifyIcon ni, string text)
|
||||
{
|
||||
text = text.Substring(0, Math.Min(text.Length, 127));
|
||||
Type t = typeof(NotifyIcon);
|
||||
BindingFlags hidden = BindingFlags.NonPublic | BindingFlags.Instance;
|
||||
t.GetField("text", hidden).SetValue(ni, text);
|
||||
if ((bool)t.GetField("added", hidden).GetValue(ni))
|
||||
t.GetMethod("UpdateIcon", hidden).Invoke(ni, new object[] { true });
|
||||
}
|
||||
|
||||
internal static Image GenerateGradientBitmap(int width, int height)
|
||||
{
|
||||
var bitmap = new Bitmap(512, height);
|
||||
@@ -554,7 +536,7 @@ namespace ColorControl
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageForms.ErrorOk("Could not create/delete task: " + e.Message);
|
||||
//MessageForms.ErrorOk("Could not create/delete task: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,164 +588,6 @@ namespace ColorControl
|
||||
return true;
|
||||
}
|
||||
|
||||
public static ToolStripMenuItem BuildDropDownMenuEx(ContextMenuStrip mnuParent, string name, Type enumType, EventHandler clickEvent, object tag = null, int min = 0, int max = 0)
|
||||
{
|
||||
var subMenuName = $"{mnuParent.Name}_{name}";
|
||||
var subMenuItems = mnuParent.Items.Find(subMenuName, false);
|
||||
|
||||
if (subMenuItems.Length > 0)
|
||||
{
|
||||
return subMenuItems[0] as ToolStripMenuItem;
|
||||
}
|
||||
|
||||
ToolStripMenuItem subMenuItem;
|
||||
subMenuItem = (ToolStripMenuItem)mnuParent.Items.Add(name);
|
||||
subMenuItem.Name = subMenuName;
|
||||
|
||||
if (enumType != null)
|
||||
{
|
||||
foreach (var enumValue in Enum.GetValues(enumType))
|
||||
{
|
||||
var itemText = (enumValue as IConvertible).GetDescription() ?? enumValue.ToString();
|
||||
var item = subMenuItem.DropDownItems.Add(itemText);
|
||||
item.Tag = tag;
|
||||
var strValue = enumValue.ToString();
|
||||
if (strValue.EndsWith("_"))
|
||||
{
|
||||
strValue = strValue.Substring(0, strValue.Length - 1);
|
||||
}
|
||||
item.AccessibleName = strValue;
|
||||
item.Click += clickEvent;
|
||||
}
|
||||
}
|
||||
else if (min >= 0 && max > min)
|
||||
{
|
||||
for (var i = 0; i <= 10; i++)
|
||||
{
|
||||
var value = i * (max / 10);
|
||||
|
||||
var subSubItemName = $"{subMenuName}_{value}";
|
||||
|
||||
var item = subMenuItem.DropDownItems.Add(value.ToString());
|
||||
item.Name = subSubItemName;
|
||||
item.Tag = tag;
|
||||
item.Click += clickEvent;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
subMenuItem.Tag = tag;
|
||||
subMenuItem.Click += clickEvent;
|
||||
}
|
||||
|
||||
return subMenuItem;
|
||||
}
|
||||
|
||||
public static void BuildDropDownMenu(ToolStripDropDownItem mnuParent, string name, Type enumType, object colorData, string propertyName, EventHandler clickEvent)
|
||||
{
|
||||
PropertyInfo property = null;
|
||||
var subMenuItems = mnuParent.DropDownItems.Find("miColorSettings_" + name, false);
|
||||
ToolStripMenuItem subMenuItem;
|
||||
if (subMenuItems.Length == 0)
|
||||
{
|
||||
subMenuItem = (ToolStripMenuItem)mnuParent.DropDownItems.Add(name);
|
||||
subMenuItem.Name = "miColorSettings_" + name;
|
||||
|
||||
if (colorData != null)
|
||||
{
|
||||
property = colorData.GetType().GetDeclaredProperty(propertyName);
|
||||
subMenuItem.Tag = property;
|
||||
}
|
||||
|
||||
foreach (var enumValue in Enum.GetValues(enumType))
|
||||
{
|
||||
var item = subMenuItem.DropDownItems.Add(enumValue.ToString());
|
||||
item.Tag = enumValue;
|
||||
item.Click += clickEvent;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
subMenuItem = (ToolStripMenuItem)subMenuItems[0];
|
||||
property = (PropertyInfo)subMenuItem.Tag;
|
||||
}
|
||||
|
||||
if (colorData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var value = property.GetValue(colorData);
|
||||
|
||||
foreach (var item in subMenuItem.DropDownItems)
|
||||
{
|
||||
if (item is ToolStripMenuItem)
|
||||
{
|
||||
var menuItem = (ToolStripMenuItem)item;
|
||||
if (menuItem.Tag != null)
|
||||
{
|
||||
menuItem.Checked = menuItem.Tag.Equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void BuildComboBox<T>(ComboBox comboBox, params T[] skip) where T : IConvertible
|
||||
{
|
||||
if (comboBox.Items.Count == 0)
|
||||
{
|
||||
foreach (var enumValue in Enum.GetValues(typeof(T)))
|
||||
{
|
||||
if (skip.Contains((T)enumValue))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var item = new EnumComboBoxItem
|
||||
{
|
||||
Name = ((T)enumValue).GetDescription(),
|
||||
Id = (int)enumValue
|
||||
};
|
||||
|
||||
comboBox.Items.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int SetComboBoxEnumIndex(ComboBox comboBox, int value)
|
||||
{
|
||||
if (comboBox.Items.Count == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
var index = 0;
|
||||
|
||||
for (var i = 0; i < comboBox.Items.Count; i++)
|
||||
{
|
||||
var item = comboBox.Items[i] as EnumComboBoxItem;
|
||||
if (item.Id == value)
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
comboBox.SelectedIndex = index;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
public static T GetComboBoxEnumItem<T>(ComboBox comboBox) where T : IConvertible
|
||||
{
|
||||
if (comboBox.SelectedIndex == -1)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), "None");
|
||||
}
|
||||
|
||||
var item = comboBox.SelectedItem as EnumComboBoxItem;
|
||||
|
||||
return (T)Enum.Parse(typeof(T), item.Id.ToString());
|
||||
}
|
||||
|
||||
public static string FormatKeyboardShortcut(KeyEventArgs keyEvent)
|
||||
{
|
||||
var pressedModifiers = keyEvent.Modifiers;
|
||||
@@ -824,80 +648,6 @@ namespace ColorControl
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitListView(ListView listView, IEnumerable<string> columns)
|
||||
{
|
||||
foreach (var name in columns)
|
||||
{
|
||||
var columnName = name;
|
||||
var parts = name.Split('|');
|
||||
|
||||
var width = 120;
|
||||
if (parts.Length > 1)
|
||||
{
|
||||
width = int.Parse(parts[1]);
|
||||
columnName = parts[0];
|
||||
}
|
||||
|
||||
var header = listView.Columns.Add(columnName);
|
||||
header.Width = width == 120 ? -2 : width;
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddOrUpdateListItem<T>(ListView listView, List<T> presets, Config config, T preset = null, ListViewItem specItem = null) where T : PresetBase
|
||||
{
|
||||
ListViewItem item = null;
|
||||
if (preset == null)
|
||||
{
|
||||
item = listView.SelectedItems[0];
|
||||
preset = (T)item.Tag;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = specItem;
|
||||
}
|
||||
|
||||
if (preset.id == 0)
|
||||
{
|
||||
preset.id = preset.GetHashCode();
|
||||
}
|
||||
|
||||
var values = preset.GetDisplayValues(config);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
item = listView.Items.Add(values[0]);
|
||||
item.Tag = preset;
|
||||
for (var i = 1; i < values.Count; i++)
|
||||
{
|
||||
item.SubItems.Add(values[i]);
|
||||
}
|
||||
if (!presets.Any(x => x.id == preset.id))
|
||||
{
|
||||
presets.Add(preset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Text = values[0];
|
||||
for (var i = 1; i < values.Count; i++)
|
||||
{
|
||||
if (item.SubItems.Count == i)
|
||||
{
|
||||
item.SubItems.Add(values[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems[i].Text = values[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (listView.ListViewItemSorter is ListViewColumnSorter sorter && sorter?.Order != SortOrder.None)
|
||||
{
|
||||
listView.Sort();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool OpenConsole()
|
||||
{
|
||||
if (ConsoleOpened)
|
||||
@@ -942,9 +692,15 @@ namespace ColorControl
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void StartProcess(string fileName, string arguments = null, bool hidden = false, bool wait = false)
|
||||
public static void StartProcess(string fileName, string arguments = null, bool hidden = false, bool wait = false, bool setWorkingDir = false, bool elevate = false)
|
||||
{
|
||||
var process = Process.Start(new ProcessStartInfo(fileName, arguments) { UseShellExecute = true, WindowStyle = hidden ? ProcessWindowStyle.Hidden : ProcessWindowStyle.Normal });
|
||||
var process = Process.Start(new ProcessStartInfo(fileName, arguments)
|
||||
{
|
||||
Verb = elevate ? "runas" : string.Empty, // indicates to elevate privileges
|
||||
UseShellExecute = true,
|
||||
WindowStyle = hidden ? ProcessWindowStyle.Hidden : ProcessWindowStyle.Normal,
|
||||
WorkingDirectory = setWorkingDir ? Path.GetDirectoryName(fileName) : null
|
||||
});
|
||||
if (wait)
|
||||
{
|
||||
process.WaitForExit();
|
||||
@@ -966,79 +722,6 @@ namespace ColorControl
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsForegroundFullScreenAndDisabledNotifications(Screen screen = null)
|
||||
{
|
||||
return IsNotificationDisabled() && IsForegroundFullScreen(screen);
|
||||
}
|
||||
|
||||
public static bool IsNotificationDisabled()
|
||||
{
|
||||
var result = SHQueryUserNotificationState(out var state);
|
||||
|
||||
if (result == NativeConstants.ERROR_SUCCESS && state != LastNotificationState)
|
||||
{
|
||||
Logger.Debug($"Detected NotificationState change from {LastNotificationState} to {state}");
|
||||
LastNotificationState = state;
|
||||
}
|
||||
|
||||
return NotificationsDisabledStates.Contains(state);
|
||||
//return state != UserNotificationState.QUNS_ACCEPTS_NOTIFICATIONS && state != UserNotificationState.QUNS_QUIET_TIME;
|
||||
}
|
||||
|
||||
public static bool IsForegroundFullScreen(Screen screen = null)
|
||||
{
|
||||
if (screen == null)
|
||||
{
|
||||
screen = Screen.PrimaryScreen;
|
||||
}
|
||||
var hWnd = NativeMethods.GetForegroundWindow();
|
||||
|
||||
NativeMethods.GetWindowRect(hWnd, out var rect);
|
||||
|
||||
/* in case you want the process name:
|
||||
uint procId = 0;
|
||||
GetWindowThreadProcessId(hWnd, out procId);
|
||||
var proc = System.Diagnostics.Process.GetProcessById((int)procId);
|
||||
Console.WriteLine(proc.ProcessName);
|
||||
*/
|
||||
|
||||
return screen.Bounds.Width <= (rect.right - rect.left) && screen.Bounds.Height <= (rect.bottom - rect.top);
|
||||
}
|
||||
|
||||
public static (uint, bool) GetForegroundProcessIdAndIfFullScreen(Screen screen = null)
|
||||
{
|
||||
if (screen == null)
|
||||
{
|
||||
screen = Screen.PrimaryScreen;
|
||||
}
|
||||
var hWnd = NativeMethods.GetForegroundWindow();
|
||||
|
||||
if (hWnd == IntPtr.Zero)
|
||||
{
|
||||
return (0, false);
|
||||
}
|
||||
|
||||
NativeMethods.GetWindowRect(hWnd, out var rect);
|
||||
|
||||
GetWindowThreadProcessId(hWnd, out var processId);
|
||||
|
||||
var isFullScreen = screen.Bounds.Width <= (rect.right - rect.left) && screen.Bounds.Height <= (rect.bottom - rect.top);
|
||||
|
||||
return (processId, isFullScreen);
|
||||
}
|
||||
|
||||
public static Process GetForegroundFullScreenProcess(Screen screen = null)
|
||||
{
|
||||
var (processId, isFullScreen) = GetForegroundProcessIdAndIfFullScreen(screen);
|
||||
|
||||
if (!isFullScreen)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Process.GetProcessById((int)processId);
|
||||
}
|
||||
|
||||
public static void ParseWords(List<string> target, string text)
|
||||
{
|
||||
target.Clear();
|
||||
@@ -1113,63 +796,23 @@ namespace ColorControl
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EnumComboBoxItem
|
||||
{
|
||||
public string Name;
|
||||
public int Id;
|
||||
|
||||
public override string ToString()
|
||||
public static FileInfo SelectFile(string ext = "*.exe", string filter = "Application EXE Name|*.exe|Application Absolute Path|*.exe")
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
var openDialog = new OpenFileDialog();
|
||||
openDialog.DefaultExt = ext;
|
||||
openDialog.Filter = filter;
|
||||
|
||||
public static class ProcessExtensions
|
||||
{
|
||||
private static string FindIndexedProcessName(int pid, string processName, IEnumerable<Process> processes = null)
|
||||
{
|
||||
var processesByName = processes == null ? Process.GetProcessesByName(processName) : processes.Where(p => p.ProcessName.Equals(processName, StringComparison.OrdinalIgnoreCase)).ToArray();
|
||||
string processIndexedName = null;
|
||||
|
||||
for (var index = 0; index < processesByName.Length; index++)
|
||||
if (openDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
processIndexedName = index == 0 ? processName : processName + "#" + index;
|
||||
var processId = new PerformanceCounter("Process", "ID Process", processIndexedName);
|
||||
if ((int)processId.NextValue() == pid)
|
||||
{
|
||||
return processIndexedName;
|
||||
}
|
||||
return new FileInfo(openDialog.FileName);
|
||||
//if (openDialog.FilterIndex == 2)
|
||||
// applicationName = openDialog.FileName;
|
||||
|
||||
//return applicationName;
|
||||
}
|
||||
|
||||
return processIndexedName;
|
||||
}
|
||||
|
||||
private static Process FindPidFromIndexedProcessName(string indexedProcessName, IEnumerable<Process> processes = null)
|
||||
{
|
||||
var parentId = new PerformanceCounter("Process", "Creating Process ID", indexedProcessName);
|
||||
var parentProcessId = (int)parentId.NextValue();
|
||||
|
||||
try
|
||||
{
|
||||
return processes == null ? Process.GetProcessById(parentProcessId) : processes.FirstOrDefault(p => p.Id == parentProcessId);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Process Parent(this Process process, IEnumerable<Process> processes = null)
|
||||
{
|
||||
var indexedProcessName = FindIndexedProcessName(process.Id, process.ProcessName, processes);
|
||||
if (indexedProcessName == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return FindPidFromIndexedProcessName(indexedProcessName, processes);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Net.NetworkInformation;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Common
|
||||
{
|
||||
class WOL
|
||||
{
|
||||
@@ -25,6 +25,11 @@ namespace ColorControl
|
||||
public ListViewSortState NvPresetsSortState { get; set; }
|
||||
public ListViewSortState AmdPresetsSortState { get; set; }
|
||||
public ListViewSortState LgPresetsSortState { get; set; }
|
||||
public ListViewSortState GamePresetsSortState { get; set; }
|
||||
public string NvQuickAccessShortcut { get; set; }
|
||||
public string AmdQuickAccessShortcut { get; set; }
|
||||
public string LgQuickAccessShortcut { get; set; }
|
||||
public string GameQuickAccessShortcut { get; set; }
|
||||
|
||||
public Config()
|
||||
{
|
||||
@@ -39,6 +44,7 @@ namespace ColorControl
|
||||
LgPresetsSortState = new ListViewSortState();
|
||||
NvPresetsSortState = new ListViewSortState();
|
||||
AmdPresetsSortState = new ListViewSortState();
|
||||
GamePresetsSortState = new ListViewSortState();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,466 @@
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Services.Common;
|
||||
using NStandard;
|
||||
using NWin32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl.Forms
|
||||
{
|
||||
static class FormUtils
|
||||
{
|
||||
public enum UserNotificationState : int
|
||||
{
|
||||
QUNS_NOT_PRESENT = 1,
|
||||
QUNS_BUSY,
|
||||
QUNS_RUNNING_D3D_FULL_SCREEN,
|
||||
QUNS_PRESENTATION_MODE,
|
||||
QUNS_ACCEPTS_NOTIFICATIONS,
|
||||
QUNS_QUIET_TIME,
|
||||
QUNS_APP
|
||||
}
|
||||
|
||||
public static UserNotificationState[] NotificationsDisabledStates = new[] {
|
||||
UserNotificationState.QUNS_BUSY,
|
||||
UserNotificationState.QUNS_RUNNING_D3D_FULL_SCREEN,
|
||||
UserNotificationState.QUNS_PRESENTATION_MODE,
|
||||
};
|
||||
|
||||
[DllImport("shell32.dll")]
|
||||
public static extern int SHQueryUserNotificationState(out UserNotificationState pquns);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
|
||||
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
private static UserNotificationState LastNotificationState;
|
||||
|
||||
public static void SetNotifyIconText(NotifyIcon ni, string text)
|
||||
{
|
||||
text = text.Substring(0, Math.Min(text.Length, 127));
|
||||
Type t = typeof(NotifyIcon);
|
||||
BindingFlags hidden = BindingFlags.NonPublic | BindingFlags.Instance;
|
||||
t.GetField("text", hidden).SetValue(ni, text);
|
||||
if ((bool)t.GetField("added", hidden).GetValue(ni))
|
||||
t.GetMethod("UpdateIcon", hidden).Invoke(ni, new object[] { true });
|
||||
}
|
||||
|
||||
public static ToolStripMenuItem BuildDropDownMenuEx(ContextMenuStrip mnuParent, string name, Type enumType, EventHandler clickEvent, object tag = null, int min = 0, int max = 0)
|
||||
{
|
||||
var subMenuName = $"{mnuParent.Name}_{name}";
|
||||
var subMenuItems = mnuParent.Items.Find(subMenuName, false);
|
||||
|
||||
if (subMenuItems.Length > 0)
|
||||
{
|
||||
return subMenuItems[0] as ToolStripMenuItem;
|
||||
}
|
||||
|
||||
ToolStripMenuItem subMenuItem;
|
||||
subMenuItem = (ToolStripMenuItem)mnuParent.Items.Add(name);
|
||||
subMenuItem.Name = subMenuName;
|
||||
|
||||
if (enumType != null)
|
||||
{
|
||||
foreach (var enumValue in Enum.GetValues(enumType))
|
||||
{
|
||||
var itemText = (enumValue as IConvertible).GetDescription() ?? enumValue.ToString();
|
||||
var item = subMenuItem.DropDownItems.Add(itemText);
|
||||
item.Tag = tag;
|
||||
var strValue = enumValue.ToString();
|
||||
if (strValue.EndsWith("_"))
|
||||
{
|
||||
strValue = strValue.Substring(0, strValue.Length - 1);
|
||||
}
|
||||
item.AccessibleName = strValue;
|
||||
item.Click += clickEvent;
|
||||
}
|
||||
}
|
||||
else if (min >= 0 && max > min)
|
||||
{
|
||||
for (var i = 0; i <= 10; i++)
|
||||
{
|
||||
var value = i * (max / 10);
|
||||
|
||||
var subSubItemName = $"{subMenuName}_{value}";
|
||||
|
||||
var item = subMenuItem.DropDownItems.Add(value.ToString());
|
||||
item.Name = subSubItemName;
|
||||
item.Tag = tag;
|
||||
item.Click += clickEvent;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
subMenuItem.Tag = tag;
|
||||
subMenuItem.Click += clickEvent;
|
||||
}
|
||||
|
||||
return subMenuItem;
|
||||
}
|
||||
|
||||
public static void BuildDropDownMenu(ToolStripDropDownItem mnuParent, string name, Type enumType, object colorData, string propertyName, EventHandler clickEvent)
|
||||
{
|
||||
PropertyInfo property = null;
|
||||
var subMenuItems = mnuParent.DropDownItems.Find("miColorSettings_" + name, false);
|
||||
ToolStripMenuItem subMenuItem;
|
||||
if (subMenuItems.Length == 0)
|
||||
{
|
||||
subMenuItem = (ToolStripMenuItem)mnuParent.DropDownItems.Add(name);
|
||||
subMenuItem.Name = "miColorSettings_" + name;
|
||||
|
||||
if (colorData != null)
|
||||
{
|
||||
property = colorData.GetType().GetDeclaredProperty(propertyName);
|
||||
subMenuItem.Tag = property;
|
||||
}
|
||||
|
||||
foreach (var enumValue in Enum.GetValues(enumType))
|
||||
{
|
||||
var item = subMenuItem.DropDownItems.Add(enumValue.ToString());
|
||||
item.Tag = enumValue;
|
||||
item.Click += clickEvent;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
subMenuItem = (ToolStripMenuItem)subMenuItems[0];
|
||||
property = (PropertyInfo)subMenuItem.Tag;
|
||||
}
|
||||
|
||||
if (colorData == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var value = property.GetValue(colorData);
|
||||
|
||||
foreach (var item in subMenuItem.DropDownItems)
|
||||
{
|
||||
if (item is ToolStripMenuItem)
|
||||
{
|
||||
var menuItem = (ToolStripMenuItem)item;
|
||||
if (menuItem.Tag != null)
|
||||
{
|
||||
menuItem.Checked = menuItem.Tag.Equals(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void BuildComboBox<T>(ComboBox comboBox, params T[] skip) where T : IConvertible
|
||||
{
|
||||
if (comboBox.Items.Count == 0)
|
||||
{
|
||||
foreach (var enumValue in Enum.GetValues(typeof(T)))
|
||||
{
|
||||
if (skip.Contains((T)enumValue))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var item = new EnumComboBoxItem
|
||||
{
|
||||
Name = ((T)enumValue).GetDescription(),
|
||||
Id = (int)enumValue
|
||||
};
|
||||
|
||||
comboBox.Items.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int SetComboBoxEnumIndex(ComboBox comboBox, int value)
|
||||
{
|
||||
if (comboBox.Items.Count == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
var index = 0;
|
||||
|
||||
for (var i = 0; i < comboBox.Items.Count; i++)
|
||||
{
|
||||
var item = comboBox.Items[i] as EnumComboBoxItem;
|
||||
if (item.Id == value)
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
comboBox.SelectedIndex = index;
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
public static T GetComboBoxEnumItem<T>(ComboBox comboBox) where T : IConvertible
|
||||
{
|
||||
if (comboBox.SelectedIndex == -1)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), "None");
|
||||
}
|
||||
|
||||
var item = comboBox.SelectedItem as EnumComboBoxItem;
|
||||
|
||||
return (T)Enum.Parse(typeof(T), item.Id.ToString());
|
||||
}
|
||||
|
||||
public static void InitListView(ListView listView, IEnumerable<string> columns)
|
||||
{
|
||||
foreach (var name in columns)
|
||||
{
|
||||
var columnName = name;
|
||||
var parts = name.Split('|');
|
||||
|
||||
var width = 120;
|
||||
if (parts.Length > 1)
|
||||
{
|
||||
width = int.Parse(parts[1]);
|
||||
columnName = parts[0];
|
||||
}
|
||||
|
||||
var header = listView.Columns.Add(columnName);
|
||||
header.Width = width == 120 ? -2 : width;
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddOrUpdateListItem<T>(ListView listView, List<T> presets, Config config, T preset = null, ListViewItem specItem = null) where T : PresetBase
|
||||
{
|
||||
ListViewItem item = null;
|
||||
if (preset == null)
|
||||
{
|
||||
item = listView.SelectedItems[0];
|
||||
preset = (T)item.Tag;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = specItem;
|
||||
}
|
||||
|
||||
if (preset.id == 0)
|
||||
{
|
||||
preset.id = preset.GetHashCode();
|
||||
}
|
||||
|
||||
var values = preset.GetDisplayValues(config);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
item = listView.Items.Add(values[0]);
|
||||
item.Tag = preset;
|
||||
item.Checked = preset.ShowInQuickAccess;
|
||||
for (var i = 1; i < values.Count; i++)
|
||||
{
|
||||
item.SubItems.Add(values[i]);
|
||||
}
|
||||
if (!presets.Any(x => x.id == preset.id))
|
||||
{
|
||||
presets.Add(preset);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Text = values[0];
|
||||
item.Checked = preset.ShowInQuickAccess;
|
||||
for (var i = 1; i < values.Count; i++)
|
||||
{
|
||||
if (item.SubItems.Count == i)
|
||||
{
|
||||
item.SubItems.Add(values[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems[i].Text = values[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (listView.ListViewItemSorter is ListViewColumnSorter sorter && sorter?.Order != SortOrder.None)
|
||||
{
|
||||
listView.Sort();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsForegroundFullScreenAndDisabledNotifications(Screen screen = null)
|
||||
{
|
||||
return IsNotificationDisabled() && IsForegroundFullScreen(screen);
|
||||
}
|
||||
|
||||
public static bool IsNotificationDisabled()
|
||||
{
|
||||
var result = SHQueryUserNotificationState(out var state);
|
||||
|
||||
if (result == NativeConstants.ERROR_SUCCESS && state != LastNotificationState)
|
||||
{
|
||||
Logger.Debug($"Detected NotificationState change from {LastNotificationState} to {state}");
|
||||
LastNotificationState = state;
|
||||
}
|
||||
|
||||
return NotificationsDisabledStates.Contains(state);
|
||||
//return state != UserNotificationState.QUNS_ACCEPTS_NOTIFICATIONS && state != UserNotificationState.QUNS_QUIET_TIME;
|
||||
}
|
||||
|
||||
public static bool IsForegroundFullScreen(Screen screen = null)
|
||||
{
|
||||
if (screen == null)
|
||||
{
|
||||
screen = Screen.PrimaryScreen;
|
||||
}
|
||||
var hWnd = NativeMethods.GetForegroundWindow();
|
||||
|
||||
NativeMethods.GetWindowRect(hWnd, out var rect);
|
||||
|
||||
/* in case you want the process name:
|
||||
uint procId = 0;
|
||||
GetWindowThreadProcessId(hWnd, out procId);
|
||||
var proc = System.Diagnostics.Process.GetProcessById((int)procId);
|
||||
Console.WriteLine(proc.ProcessName);
|
||||
*/
|
||||
|
||||
return screen.Bounds.Width <= (rect.right - rect.left) && screen.Bounds.Height <= (rect.bottom - rect.top);
|
||||
}
|
||||
|
||||
public static (uint, bool) GetForegroundProcessIdAndIfFullScreen(Screen screen = null)
|
||||
{
|
||||
if (screen == null)
|
||||
{
|
||||
screen = Screen.PrimaryScreen;
|
||||
}
|
||||
var hWnd = NativeMethods.GetForegroundWindow();
|
||||
|
||||
if (hWnd == IntPtr.Zero)
|
||||
{
|
||||
return (0, false);
|
||||
}
|
||||
|
||||
NativeMethods.GetWindowRect(hWnd, out var rect);
|
||||
|
||||
GetWindowThreadProcessId(hWnd, out var processId);
|
||||
|
||||
var isFullScreen = screen.Bounds.Width <= (rect.right - rect.left) && screen.Bounds.Height <= (rect.bottom - rect.top);
|
||||
|
||||
return (processId, isFullScreen);
|
||||
}
|
||||
|
||||
public static Process GetForegroundFullScreenProcess(Screen screen = null)
|
||||
{
|
||||
var (processId, isFullScreen) = GetForegroundProcessIdAndIfFullScreen(screen);
|
||||
|
||||
if (!isFullScreen)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Process.GetProcessById((int)processId);
|
||||
}
|
||||
|
||||
public static void EnableControls(Control parent, bool enable = true, IEnumerable<Control> excludedControls = null)
|
||||
{
|
||||
for (var i = 0; i < parent.Controls.Count; i++)
|
||||
{
|
||||
var control = parent.Controls[i];
|
||||
if (!excludedControls?.Contains(control) ?? true)
|
||||
{
|
||||
control.Enabled = enable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddStepToTextBox(TextBox textBox, string step)
|
||||
{
|
||||
var text = textBox.Text;
|
||||
if (string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
text = step;
|
||||
}
|
||||
else
|
||||
{
|
||||
var pos = textBox.SelectionStart;
|
||||
while (pos < text.Length && text.CharAt(pos) != ',')
|
||||
{
|
||||
pos++;
|
||||
}
|
||||
if (pos == text.Length)
|
||||
{
|
||||
text += ", " + step;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = text.Substring(0, pos + 1) + " " + step + ", " + text.Substring(pos + 1).Trim();
|
||||
}
|
||||
}
|
||||
textBox.Text = text.Trim();
|
||||
}
|
||||
|
||||
public static T GetSelectedItemTag<T>(this ListView listView)
|
||||
{
|
||||
if (listView.SelectedItems.Count > 0)
|
||||
{
|
||||
var item = listView.SelectedItems[0];
|
||||
return (T)item.Tag;
|
||||
}
|
||||
else
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
}
|
||||
|
||||
public static void FireEvent(this Control ctrl, string eventName, params object[] eventParams)
|
||||
{
|
||||
//EventSelectedIndexChanged
|
||||
var propertyInfo = ctrl.GetType().GetProperty("Events", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
|
||||
var eventHandlerList = propertyInfo.GetValue(ctrl) as EventHandlerList;
|
||||
|
||||
var headField = typeof(EventHandlerList).GetField("_head", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
var assembly = typeof(EventHandlerList).Assembly;
|
||||
var listEntryType = assembly.GetTypes().FirstOrDefault(t => t.Name == "ListEntry");
|
||||
|
||||
var nextField = listEntryType.GetField("_next", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
var handlerField = listEntryType.GetField("_handler", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
var entry = headField.GetValue(eventHandlerList);
|
||||
Delegate foundHandler = null;
|
||||
|
||||
while (entry != null)
|
||||
{
|
||||
var handler = handlerField.GetValue(entry) as Delegate;
|
||||
|
||||
if (handler.Method.Name.Contains(eventName))
|
||||
{
|
||||
foundHandler = handler;
|
||||
break;
|
||||
}
|
||||
|
||||
entry = nextField.GetValue(entry);
|
||||
}
|
||||
|
||||
if (foundHandler == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var invocationList = foundHandler.GetInvocationList();
|
||||
foreach (var item in invocationList)
|
||||
{
|
||||
item.Method.Invoke(item.Target, eventParams);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class EnumComboBoxItem
|
||||
{
|
||||
public string Name;
|
||||
public int Id;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using ColorControl.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Forms
|
||||
{
|
||||
class MessageForms
|
||||
{
|
||||
@@ -13,7 +14,8 @@ namespace ColorControl
|
||||
Text,
|
||||
Numeric,
|
||||
DropDown,
|
||||
Flags
|
||||
Flags,
|
||||
Shortcut,
|
||||
}
|
||||
|
||||
public class FieldDefinition
|
||||
@@ -27,6 +29,19 @@ namespace ColorControl
|
||||
public object Value { get; set; }
|
||||
}
|
||||
|
||||
public class MessageForm : Form
|
||||
{
|
||||
public void edtShortcut_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
((TextBox)sender).Text = Utils.FormatKeyboardShortcut(e);
|
||||
}
|
||||
|
||||
public void edtShortcut_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
Utils.HandleKeyboardShortcutUp(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static Form MainForm;
|
||||
|
||||
public static void WarningOk(string text)
|
||||
@@ -70,7 +85,7 @@ namespace ColorControl
|
||||
{
|
||||
var values = new List<FieldDefinition>();
|
||||
|
||||
var prompt = new Form()
|
||||
var prompt = new MessageForm()
|
||||
{
|
||||
Width = 500,
|
||||
Height = 90 + (fields.Count() * 55),
|
||||
@@ -81,6 +96,7 @@ namespace ColorControl
|
||||
|
||||
var top = 10;
|
||||
var boxes = new List<Control>();
|
||||
var counter = 1;
|
||||
|
||||
foreach (var field in fields)
|
||||
{
|
||||
@@ -91,7 +107,7 @@ namespace ColorControl
|
||||
|
||||
Control control;
|
||||
|
||||
switch(field.FieldType)
|
||||
switch (field.FieldType)
|
||||
{
|
||||
case FieldType.Text:
|
||||
var textBox = new MaskedTextBox() { Left = 40, Top = top, Width = 400 };
|
||||
@@ -111,6 +127,27 @@ namespace ColorControl
|
||||
control = textBox;
|
||||
break;
|
||||
|
||||
case FieldType.Shortcut:
|
||||
var shortcutTextBox = new TextBox()
|
||||
{
|
||||
Left = 40,
|
||||
Top = top,
|
||||
Width = 200,
|
||||
Name = $"edtShortcut_{counter}",
|
||||
ReadOnly = true
|
||||
};
|
||||
|
||||
shortcutTextBox.KeyDown += prompt.edtShortcut_KeyDown;
|
||||
shortcutTextBox.KeyUp += prompt.edtShortcut_KeyUp;
|
||||
|
||||
if (field.Value != null)
|
||||
{
|
||||
shortcutTextBox.Text = field.Value.ToString();
|
||||
}
|
||||
|
||||
control = shortcutTextBox;
|
||||
break;
|
||||
|
||||
case FieldType.Numeric:
|
||||
var numericEdit = new NumericUpDown() { Left = 40, Top = top, Width = 400 };
|
||||
|
||||
@@ -183,6 +220,7 @@ namespace ColorControl
|
||||
prompt.Controls.Add(control);
|
||||
boxes.Add(control);
|
||||
control.Tag = field;
|
||||
counter++;
|
||||
}
|
||||
|
||||
var confirmation = new Button() { Text = "OK", Left = 365, Width = 75, Top = prompt.ClientRectangle.Height - 30 };
|
||||
File renamed without changes.
Generated
+537
-5
@@ -32,6 +32,8 @@
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.tcMain = new System.Windows.Forms.TabControl();
|
||||
this.tabNVIDIA = new System.Windows.Forms.TabPage();
|
||||
this.btnNvSettings = new System.Windows.Forms.Button();
|
||||
this.chkNvShowInQuickAccess = new System.Windows.Forms.CheckBox();
|
||||
this.lblNvPresetName = new System.Windows.Forms.Label();
|
||||
this.edtNvPresetName = new System.Windows.Forms.TextBox();
|
||||
this.btnAddModesNv = new System.Windows.Forms.Button();
|
||||
@@ -77,6 +79,7 @@
|
||||
this.btnApply = new System.Windows.Forms.Button();
|
||||
this.lvNvPresets = new System.Windows.Forms.ListView();
|
||||
this.tabAMD = new System.Windows.Forms.TabPage();
|
||||
this.chkAmdQuickAccess = new System.Windows.Forms.CheckBox();
|
||||
this.lblAmdPresetName = new System.Windows.Forms.Label();
|
||||
this.edtAmdPresetName = new System.Windows.Forms.TextBox();
|
||||
this.btnAddAmd = new System.Windows.Forms.Button();
|
||||
@@ -108,6 +111,8 @@
|
||||
this.lvAmdPresets = new System.Windows.Forms.ListView();
|
||||
this.tabLG = new System.Windows.Forms.TabPage();
|
||||
this.scLgController = new System.Windows.Forms.SplitContainer();
|
||||
this.btnLgSettings = new System.Windows.Forms.Button();
|
||||
this.chkLgQuickAccess = new System.Windows.Forms.CheckBox();
|
||||
this.cbxLgPcHdmiPort = new System.Windows.Forms.ComboBox();
|
||||
this.lblLgPcHdmiPort = new System.Windows.Forms.Label();
|
||||
this.edtLgPresetDescription = new System.Windows.Forms.TextBox();
|
||||
@@ -158,11 +163,40 @@
|
||||
this.mnuLgActions = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuLgNvPresets = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuLgAmdPresets = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuLgProgram = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.btnCloneLg = new System.Windows.Forms.Button();
|
||||
this.lblStepsLg = new System.Windows.Forms.Label();
|
||||
this.btnLgDeviceFilterRefresh = new System.Windows.Forms.Button();
|
||||
this.clbLgPower = new System.Windows.Forms.CheckedListBox();
|
||||
this.lblLgError = new System.Windows.Forms.Label();
|
||||
this.tabGameLauncher = new System.Windows.Forms.TabPage();
|
||||
this.chkGameQuickAccess = new System.Windows.Forms.CheckBox();
|
||||
this.btnGameSettings = new System.Windows.Forms.Button();
|
||||
this.mnuGameActions = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuGameNvInspector = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.miGameSetQuickAccessShortcut = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.chkGameRunAsAdmin = new System.Windows.Forms.CheckBox();
|
||||
this.lblGameParameters = new System.Windows.Forms.Label();
|
||||
this.edtGameParameters = new System.Windows.Forms.TextBox();
|
||||
this.btnGameBrowse = new System.Windows.Forms.Button();
|
||||
this.lblGameFilePath = new System.Windows.Forms.Label();
|
||||
this.edtGamePath = new System.Windows.Forms.TextBox();
|
||||
this.edtGamePrelaunchSteps = new System.Windows.Forms.TextBox();
|
||||
this.btnGameAddStep = new System.Windows.Forms.Button();
|
||||
this.mnuGameAddStep = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.mnuGameNvidiaPresets = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuGameAmdPresets = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuGameLgPresets = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuGameStartProgram = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.lblGamePreLaunch = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.edtGameName = new System.Windows.Forms.TextBox();
|
||||
this.btnGameDelete = new System.Windows.Forms.Button();
|
||||
this.btnGameClone = new System.Windows.Forms.Button();
|
||||
this.btnGameSave = new System.Windows.Forms.Button();
|
||||
this.btnGameAdd = new System.Windows.Forms.Button();
|
||||
this.btnGameLaunch = new System.Windows.Forms.Button();
|
||||
this.lvGamePresets = new System.Windows.Forms.ListView();
|
||||
this.tabOptions = new System.Windows.Forms.TabPage();
|
||||
this.grpNvidiaOptions = new System.Windows.Forms.GroupBox();
|
||||
this.lblDitheringMode = new System.Windows.Forms.Label();
|
||||
@@ -209,6 +243,10 @@
|
||||
this.lbPlugins = new System.Windows.Forms.ListBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.lblInfo = new System.Windows.Forms.Label();
|
||||
this.mnuNvSettings = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.miNvProfileInspector = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.miNvSettings = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.btnAmdSettings = new System.Windows.Forms.Button();
|
||||
this.tcMain.SuspendLayout();
|
||||
this.tabNVIDIA.SuspendLayout();
|
||||
this.mnuNvPresets.SuspendLayout();
|
||||
@@ -220,6 +258,9 @@
|
||||
this.scLgController.SuspendLayout();
|
||||
this.mnuLgExpert.SuspendLayout();
|
||||
this.mnuLgButtons.SuspendLayout();
|
||||
this.tabGameLauncher.SuspendLayout();
|
||||
this.mnuGameActions.SuspendLayout();
|
||||
this.mnuGameAddStep.SuspendLayout();
|
||||
this.tabOptions.SuspendLayout();
|
||||
this.grpNvidiaOptions.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbGradient)).BeginInit();
|
||||
@@ -234,6 +275,7 @@
|
||||
this.tabInfo.SuspendLayout();
|
||||
this.grpNVIDIAInfo.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.mnuNvSettings.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tcMain
|
||||
@@ -244,6 +286,7 @@
|
||||
this.tcMain.Controls.Add(this.tabNVIDIA);
|
||||
this.tcMain.Controls.Add(this.tabAMD);
|
||||
this.tcMain.Controls.Add(this.tabLG);
|
||||
this.tcMain.Controls.Add(this.tabGameLauncher);
|
||||
this.tcMain.Controls.Add(this.tabOptions);
|
||||
this.tcMain.Controls.Add(this.tabLog);
|
||||
this.tcMain.Controls.Add(this.tabInfo);
|
||||
@@ -257,6 +300,8 @@
|
||||
//
|
||||
// tabNVIDIA
|
||||
//
|
||||
this.tabNVIDIA.Controls.Add(this.btnNvSettings);
|
||||
this.tabNVIDIA.Controls.Add(this.chkNvShowInQuickAccess);
|
||||
this.tabNVIDIA.Controls.Add(this.lblNvPresetName);
|
||||
this.tabNVIDIA.Controls.Add(this.edtNvPresetName);
|
||||
this.tabNVIDIA.Controls.Add(this.btnAddModesNv);
|
||||
@@ -278,6 +323,30 @@
|
||||
this.tabNVIDIA.Text = "NVIDIA controller";
|
||||
this.tabNVIDIA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnNvSettings
|
||||
//
|
||||
this.btnNvSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnNvSettings.Location = new System.Drawing.Point(1017, 428);
|
||||
this.btnNvSettings.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnNvSettings.Name = "btnNvSettings";
|
||||
this.btnNvSettings.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnNvSettings.TabIndex = 59;
|
||||
this.btnNvSettings.Text = "Settings...";
|
||||
this.btnNvSettings.UseVisualStyleBackColor = true;
|
||||
this.btnNvSettings.Click += new System.EventHandler(this.btnNvSettings_Click);
|
||||
//
|
||||
// chkNvShowInQuickAccess
|
||||
//
|
||||
this.chkNvShowInQuickAccess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.chkNvShowInQuickAccess.AutoSize = true;
|
||||
this.chkNvShowInQuickAccess.Location = new System.Drawing.Point(343, 465);
|
||||
this.chkNvShowInQuickAccess.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.chkNvShowInQuickAccess.Name = "chkNvShowInQuickAccess";
|
||||
this.chkNvShowInQuickAccess.Size = new System.Drawing.Size(141, 19);
|
||||
this.chkNvShowInQuickAccess.TabIndex = 45;
|
||||
this.chkNvShowInQuickAccess.Text = "Show in Quick Access";
|
||||
this.chkNvShowInQuickAccess.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblNvPresetName
|
||||
//
|
||||
this.lblNvPresetName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@@ -682,6 +751,7 @@
|
||||
this.lvNvPresets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lvNvPresets.CheckBoxes = true;
|
||||
this.lvNvPresets.ContextMenuStrip = this.mnuNvPresets;
|
||||
this.lvNvPresets.FullRowSelect = true;
|
||||
this.lvNvPresets.Location = new System.Drawing.Point(7, 7);
|
||||
@@ -694,11 +764,15 @@
|
||||
this.lvNvPresets.UseCompatibleStateImageBehavior = false;
|
||||
this.lvNvPresets.View = System.Windows.Forms.View.Details;
|
||||
this.lvNvPresets.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvLgPresets_ColumnClick);
|
||||
this.lvNvPresets.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.lvNvPresets_ItemCheck);
|
||||
this.lvNvPresets.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvNvPresets_ItemChecked);
|
||||
this.lvNvPresets.SelectedIndexChanged += new System.EventHandler(this.lvNvPresets_SelectedIndexChanged);
|
||||
this.lvNvPresets.DoubleClick += new System.EventHandler(this.btnApply_Click);
|
||||
//
|
||||
// tabAMD
|
||||
//
|
||||
this.tabAMD.Controls.Add(this.btnAmdSettings);
|
||||
this.tabAMD.Controls.Add(this.chkAmdQuickAccess);
|
||||
this.tabAMD.Controls.Add(this.lblAmdPresetName);
|
||||
this.tabAMD.Controls.Add(this.edtAmdPresetName);
|
||||
this.tabAMD.Controls.Add(this.btnAddAmd);
|
||||
@@ -720,6 +794,18 @@
|
||||
this.tabAMD.Text = "AMD controller";
|
||||
this.tabAMD.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkAmdQuickAccess
|
||||
//
|
||||
this.chkAmdQuickAccess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.chkAmdQuickAccess.AutoSize = true;
|
||||
this.chkAmdQuickAccess.Location = new System.Drawing.Point(343, 465);
|
||||
this.chkAmdQuickAccess.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.chkAmdQuickAccess.Name = "chkAmdQuickAccess";
|
||||
this.chkAmdQuickAccess.Size = new System.Drawing.Size(141, 19);
|
||||
this.chkAmdQuickAccess.TabIndex = 46;
|
||||
this.chkAmdQuickAccess.Text = "Show in Quick Access";
|
||||
this.chkAmdQuickAccess.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblAmdPresetName
|
||||
//
|
||||
this.lblAmdPresetName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@@ -995,6 +1081,7 @@
|
||||
this.lvAmdPresets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lvAmdPresets.CheckBoxes = true;
|
||||
this.lvAmdPresets.ContextMenuStrip = this.mnuAmdPresets;
|
||||
this.lvAmdPresets.FullRowSelect = true;
|
||||
this.lvAmdPresets.Location = new System.Drawing.Point(7, 7);
|
||||
@@ -1007,6 +1094,8 @@
|
||||
this.lvAmdPresets.UseCompatibleStateImageBehavior = false;
|
||||
this.lvAmdPresets.View = System.Windows.Forms.View.Details;
|
||||
this.lvAmdPresets.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvLgPresets_ColumnClick);
|
||||
this.lvAmdPresets.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.lvNvPresets_ItemCheck);
|
||||
this.lvAmdPresets.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvAmdPresets_ItemChecked);
|
||||
this.lvAmdPresets.SelectedIndexChanged += new System.EventHandler(this.lvAmdPresets_SelectedIndexChanged);
|
||||
this.lvAmdPresets.DoubleClick += new System.EventHandler(this.btnApplyAmd_Click);
|
||||
//
|
||||
@@ -1031,6 +1120,8 @@
|
||||
//
|
||||
// scLgController.Panel1
|
||||
//
|
||||
this.scLgController.Panel1.Controls.Add(this.btnLgSettings);
|
||||
this.scLgController.Panel1.Controls.Add(this.chkLgQuickAccess);
|
||||
this.scLgController.Panel1.Controls.Add(this.cbxLgPcHdmiPort);
|
||||
this.scLgController.Panel1.Controls.Add(this.lblLgPcHdmiPort);
|
||||
this.scLgController.Panel1.Controls.Add(this.edtLgPresetDescription);
|
||||
@@ -1083,6 +1174,30 @@
|
||||
this.scLgController.SplitterWidth = 5;
|
||||
this.scLgController.TabIndex = 43;
|
||||
//
|
||||
// btnLgSettings
|
||||
//
|
||||
this.btnLgSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnLgSettings.Location = new System.Drawing.Point(804, 264);
|
||||
this.btnLgSettings.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnLgSettings.Name = "btnLgSettings";
|
||||
this.btnLgSettings.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnLgSettings.TabIndex = 64;
|
||||
this.btnLgSettings.Text = "Settings...";
|
||||
this.btnLgSettings.UseVisualStyleBackColor = true;
|
||||
this.btnLgSettings.Click += new System.EventHandler(this.btnLgSettings_Click);
|
||||
//
|
||||
// chkLgQuickAccess
|
||||
//
|
||||
this.chkLgQuickAccess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.chkLgQuickAccess.AutoSize = true;
|
||||
this.chkLgQuickAccess.Location = new System.Drawing.Point(341, 300);
|
||||
this.chkLgQuickAccess.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.chkLgQuickAccess.Name = "chkLgQuickAccess";
|
||||
this.chkLgQuickAccess.Size = new System.Drawing.Size(96, 19);
|
||||
this.chkLgQuickAccess.TabIndex = 63;
|
||||
this.chkLgQuickAccess.Text = "Quick Access";
|
||||
this.chkLgQuickAccess.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbxLgPcHdmiPort
|
||||
//
|
||||
this.cbxLgPcHdmiPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
@@ -1274,7 +1389,7 @@
|
||||
this.mnuLgOLEDMotionPro,
|
||||
this.miLgExpertSeparator1});
|
||||
this.mnuLgExpert.Name = "mnuLgButtons";
|
||||
this.mnuLgExpert.Size = new System.Drawing.Size(321, 32);
|
||||
this.mnuLgExpert.Size = new System.Drawing.Size(359, 32);
|
||||
this.mnuLgExpert.Opening += new System.ComponentModel.CancelEventHandler(this.mnuLgExpert_Opening);
|
||||
//
|
||||
// mnuLgOLEDMotionPro
|
||||
@@ -1283,7 +1398,7 @@
|
||||
this.miLgEnableMotionPro,
|
||||
this.miLgDisableMotionPro});
|
||||
this.mnuLgOLEDMotionPro.Name = "mnuLgOLEDMotionPro";
|
||||
this.mnuLgOLEDMotionPro.Size = new System.Drawing.Size(320, 22);
|
||||
this.mnuLgOLEDMotionPro.Size = new System.Drawing.Size(358, 22);
|
||||
this.mnuLgOLEDMotionPro.Text = "Activate OLED Motion Pro (B9/C9/E9/W9/C2/G2 only)";
|
||||
//
|
||||
// miLgEnableMotionPro
|
||||
@@ -1303,7 +1418,7 @@
|
||||
// miLgExpertSeparator1
|
||||
//
|
||||
this.miLgExpertSeparator1.Name = "miLgExpertSeparator1";
|
||||
this.miLgExpertSeparator1.Size = new System.Drawing.Size(317, 6);
|
||||
this.miLgExpertSeparator1.Size = new System.Drawing.Size(355, 6);
|
||||
//
|
||||
// chkLgRemoteControlShow
|
||||
//
|
||||
@@ -1370,6 +1485,7 @@
|
||||
this.lvLgPresets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lvLgPresets.CheckBoxes = true;
|
||||
this.lvLgPresets.FullRowSelect = true;
|
||||
this.lvLgPresets.Location = new System.Drawing.Point(6, 152);
|
||||
this.lvLgPresets.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
@@ -1381,6 +1497,7 @@
|
||||
this.lvLgPresets.UseCompatibleStateImageBehavior = false;
|
||||
this.lvLgPresets.View = System.Windows.Forms.View.Details;
|
||||
this.lvLgPresets.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvLgPresets_ColumnClick);
|
||||
this.lvLgPresets.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvLgPresets_ItemChecked);
|
||||
this.lvLgPresets.SelectedIndexChanged += new System.EventHandler(this.lvLgPresets_SelectedIndexChanged);
|
||||
this.lvLgPresets.DoubleClick += new System.EventHandler(this.lvLgPresets_DoubleClick);
|
||||
//
|
||||
@@ -1601,9 +1718,10 @@
|
||||
this.mnuLgRcButtons,
|
||||
this.mnuLgActions,
|
||||
this.mnuLgNvPresets,
|
||||
this.mnuLgAmdPresets});
|
||||
this.mnuLgAmdPresets,
|
||||
this.mnuLgProgram});
|
||||
this.mnuLgButtons.Name = "mnuLgButtons";
|
||||
this.mnuLgButtons.Size = new System.Drawing.Size(153, 92);
|
||||
this.mnuLgButtons.Size = new System.Drawing.Size(153, 114);
|
||||
this.mnuLgButtons.Opening += new System.ComponentModel.CancelEventHandler(this.mnuLgButtons_Opening);
|
||||
//
|
||||
// mnuLgRcButtons
|
||||
@@ -1630,6 +1748,13 @@
|
||||
this.mnuLgAmdPresets.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLgAmdPresets.Text = "AMD presets";
|
||||
//
|
||||
// mnuLgProgram
|
||||
//
|
||||
this.mnuLgProgram.Name = "mnuLgProgram";
|
||||
this.mnuLgProgram.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuLgProgram.Text = "Start Program";
|
||||
this.mnuLgProgram.Click += new System.EventHandler(this.mnuLgProgram_Click);
|
||||
//
|
||||
// btnCloneLg
|
||||
//
|
||||
this.btnCloneLg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@@ -1700,6 +1825,335 @@
|
||||
this.lblLgError.Text = "ErrorText";
|
||||
this.lblLgError.Visible = false;
|
||||
//
|
||||
// tabGameLauncher
|
||||
//
|
||||
this.tabGameLauncher.Controls.Add(this.chkGameQuickAccess);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameSettings);
|
||||
this.tabGameLauncher.Controls.Add(this.chkGameRunAsAdmin);
|
||||
this.tabGameLauncher.Controls.Add(this.lblGameParameters);
|
||||
this.tabGameLauncher.Controls.Add(this.edtGameParameters);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameBrowse);
|
||||
this.tabGameLauncher.Controls.Add(this.lblGameFilePath);
|
||||
this.tabGameLauncher.Controls.Add(this.edtGamePath);
|
||||
this.tabGameLauncher.Controls.Add(this.edtGamePrelaunchSteps);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameAddStep);
|
||||
this.tabGameLauncher.Controls.Add(this.lblGamePreLaunch);
|
||||
this.tabGameLauncher.Controls.Add(this.label4);
|
||||
this.tabGameLauncher.Controls.Add(this.edtGameName);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameDelete);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameClone);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameSave);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameAdd);
|
||||
this.tabGameLauncher.Controls.Add(this.btnGameLaunch);
|
||||
this.tabGameLauncher.Controls.Add(this.lvGamePresets);
|
||||
this.tabGameLauncher.Location = new System.Drawing.Point(4, 24);
|
||||
this.tabGameLauncher.Name = "tabGameLauncher";
|
||||
this.tabGameLauncher.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabGameLauncher.Size = new System.Drawing.Size(1114, 525);
|
||||
this.tabGameLauncher.TabIndex = 6;
|
||||
this.tabGameLauncher.Text = "Game Launcher";
|
||||
this.tabGameLauncher.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkGameQuickAccess
|
||||
//
|
||||
this.chkGameQuickAccess.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.chkGameQuickAccess.AutoSize = true;
|
||||
this.chkGameQuickAccess.Location = new System.Drawing.Point(353, 387);
|
||||
this.chkGameQuickAccess.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.chkGameQuickAccess.Name = "chkGameQuickAccess";
|
||||
this.chkGameQuickAccess.Size = new System.Drawing.Size(141, 19);
|
||||
this.chkGameQuickAccess.TabIndex = 44;
|
||||
this.chkGameQuickAccess.Text = "Show in Quick Access";
|
||||
this.chkGameQuickAccess.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btnGameSettings
|
||||
//
|
||||
this.btnGameSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnGameSettings.ContextMenuStrip = this.mnuGameActions;
|
||||
this.btnGameSettings.Location = new System.Drawing.Point(1018, 351);
|
||||
this.btnGameSettings.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameSettings.Name = "btnGameSettings";
|
||||
this.btnGameSettings.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameSettings.TabIndex = 43;
|
||||
this.btnGameSettings.Text = "Settings...";
|
||||
this.btnGameSettings.UseVisualStyleBackColor = true;
|
||||
this.btnGameSettings.Click += new System.EventHandler(this.btnGameActions_Click);
|
||||
//
|
||||
// mnuGameActions
|
||||
//
|
||||
this.mnuGameActions.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.mnuGameActions.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuGameNvInspector,
|
||||
this.miGameSetQuickAccessShortcut});
|
||||
this.mnuGameActions.Name = "mnuLgButtons";
|
||||
this.mnuGameActions.Size = new System.Drawing.Size(212, 48);
|
||||
this.mnuGameActions.Opening += new System.ComponentModel.CancelEventHandler(this.mnuGameActions_Opening);
|
||||
//
|
||||
// mnuGameNvInspector
|
||||
//
|
||||
this.mnuGameNvInspector.Name = "mnuGameNvInspector";
|
||||
this.mnuGameNvInspector.Size = new System.Drawing.Size(211, 22);
|
||||
this.mnuGameNvInspector.Text = "NVIDIA Profile Inspector";
|
||||
this.mnuGameNvInspector.Click += new System.EventHandler(this.mnuGameNvInspector_Click);
|
||||
//
|
||||
// miGameSetQuickAccessShortcut
|
||||
//
|
||||
this.miGameSetQuickAccessShortcut.Name = "miGameSetQuickAccessShortcut";
|
||||
this.miGameSetQuickAccessShortcut.Size = new System.Drawing.Size(211, 22);
|
||||
this.miGameSetQuickAccessShortcut.Text = "Set Quick Access Shortcut";
|
||||
this.miGameSetQuickAccessShortcut.Click += new System.EventHandler(this.miGameSetQuickAccessShortcut_Click);
|
||||
//
|
||||
// chkGameRunAsAdmin
|
||||
//
|
||||
this.chkGameRunAsAdmin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.chkGameRunAsAdmin.AutoSize = true;
|
||||
this.chkGameRunAsAdmin.Location = new System.Drawing.Point(881, 415);
|
||||
this.chkGameRunAsAdmin.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.chkGameRunAsAdmin.Name = "chkGameRunAsAdmin";
|
||||
this.chkGameRunAsAdmin.Size = new System.Drawing.Size(135, 19);
|
||||
this.chkGameRunAsAdmin.TabIndex = 42;
|
||||
this.chkGameRunAsAdmin.Text = "Run as administrator";
|
||||
this.chkGameRunAsAdmin.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblGameParameters
|
||||
//
|
||||
this.lblGameParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblGameParameters.AutoSize = true;
|
||||
this.lblGameParameters.Location = new System.Drawing.Point(8, 445);
|
||||
this.lblGameParameters.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblGameParameters.Name = "lblGameParameters";
|
||||
this.lblGameParameters.Size = new System.Drawing.Size(69, 15);
|
||||
this.lblGameParameters.TabIndex = 41;
|
||||
this.lblGameParameters.Text = "Parameters:";
|
||||
//
|
||||
// edtGameParameters
|
||||
//
|
||||
this.edtGameParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.edtGameParameters.Enabled = false;
|
||||
this.edtGameParameters.Location = new System.Drawing.Point(112, 442);
|
||||
this.edtGameParameters.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.edtGameParameters.Name = "edtGameParameters";
|
||||
this.edtGameParameters.Size = new System.Drawing.Size(665, 23);
|
||||
this.edtGameParameters.TabIndex = 40;
|
||||
//
|
||||
// btnGameBrowse
|
||||
//
|
||||
this.btnGameBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameBrowse.ContextMenuStrip = this.mnuLgButtons;
|
||||
this.btnGameBrowse.Enabled = false;
|
||||
this.btnGameBrowse.Location = new System.Drawing.Point(785, 410);
|
||||
this.btnGameBrowse.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameBrowse.Name = "btnGameBrowse";
|
||||
this.btnGameBrowse.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameBrowse.TabIndex = 39;
|
||||
this.btnGameBrowse.Text = "Browse...";
|
||||
this.btnGameBrowse.UseVisualStyleBackColor = true;
|
||||
this.btnGameBrowse.Click += new System.EventHandler(this.btnGameBrowse_Click);
|
||||
//
|
||||
// lblGameFilePath
|
||||
//
|
||||
this.lblGameFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblGameFilePath.AutoSize = true;
|
||||
this.lblGameFilePath.Location = new System.Drawing.Point(8, 417);
|
||||
this.lblGameFilePath.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblGameFilePath.Name = "lblGameFilePath";
|
||||
this.lblGameFilePath.Size = new System.Drawing.Size(51, 15);
|
||||
this.lblGameFilePath.TabIndex = 38;
|
||||
this.lblGameFilePath.Text = "File/URI:";
|
||||
//
|
||||
// edtGamePath
|
||||
//
|
||||
this.edtGamePath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.edtGamePath.Enabled = false;
|
||||
this.edtGamePath.Location = new System.Drawing.Point(112, 413);
|
||||
this.edtGamePath.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.edtGamePath.Name = "edtGamePath";
|
||||
this.edtGamePath.Size = new System.Drawing.Size(665, 23);
|
||||
this.edtGamePath.TabIndex = 37;
|
||||
//
|
||||
// edtGamePrelaunchSteps
|
||||
//
|
||||
this.edtGamePrelaunchSteps.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.edtGamePrelaunchSteps.Enabled = false;
|
||||
this.edtGamePrelaunchSteps.Location = new System.Drawing.Point(112, 471);
|
||||
this.edtGamePrelaunchSteps.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.edtGamePrelaunchSteps.Multiline = true;
|
||||
this.edtGamePrelaunchSteps.Name = "edtGamePrelaunchSteps";
|
||||
this.edtGamePrelaunchSteps.Size = new System.Drawing.Size(665, 48);
|
||||
this.edtGamePrelaunchSteps.TabIndex = 35;
|
||||
//
|
||||
// btnGameAddStep
|
||||
//
|
||||
this.btnGameAddStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameAddStep.ContextMenuStrip = this.mnuGameAddStep;
|
||||
this.btnGameAddStep.Enabled = false;
|
||||
this.btnGameAddStep.Location = new System.Drawing.Point(785, 470);
|
||||
this.btnGameAddStep.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameAddStep.Name = "btnGameAddStep";
|
||||
this.btnGameAddStep.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameAddStep.TabIndex = 36;
|
||||
this.btnGameAddStep.Text = "Add step";
|
||||
this.btnGameAddStep.UseVisualStyleBackColor = true;
|
||||
this.btnGameAddStep.Click += new System.EventHandler(this.btnGameAddStep_Click);
|
||||
//
|
||||
// mnuGameAddStep
|
||||
//
|
||||
this.mnuGameAddStep.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.mnuGameAddStep.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuGameNvidiaPresets,
|
||||
this.mnuGameAmdPresets,
|
||||
this.mnuGameLgPresets,
|
||||
this.mnuGameStartProgram});
|
||||
this.mnuGameAddStep.Name = "mnuLgButtons";
|
||||
this.mnuGameAddStep.Size = new System.Drawing.Size(153, 92);
|
||||
this.mnuGameAddStep.Opening += new System.ComponentModel.CancelEventHandler(this.mnuGameAddStep_Opening);
|
||||
//
|
||||
// mnuGameNvidiaPresets
|
||||
//
|
||||
this.mnuGameNvidiaPresets.Name = "mnuGameNvidiaPresets";
|
||||
this.mnuGameNvidiaPresets.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuGameNvidiaPresets.Text = "NVIDIA presets";
|
||||
//
|
||||
// mnuGameAmdPresets
|
||||
//
|
||||
this.mnuGameAmdPresets.Name = "mnuGameAmdPresets";
|
||||
this.mnuGameAmdPresets.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuGameAmdPresets.Text = "AMD presets";
|
||||
//
|
||||
// mnuGameLgPresets
|
||||
//
|
||||
this.mnuGameLgPresets.Name = "mnuGameLgPresets";
|
||||
this.mnuGameLgPresets.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuGameLgPresets.Text = "LG presets";
|
||||
//
|
||||
// mnuGameStartProgram
|
||||
//
|
||||
this.mnuGameStartProgram.Name = "mnuGameStartProgram";
|
||||
this.mnuGameStartProgram.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuGameStartProgram.Text = "Start Program";
|
||||
this.mnuGameStartProgram.Click += new System.EventHandler(this.mnuGameStartProgram_Click);
|
||||
//
|
||||
// lblGamePreLaunch
|
||||
//
|
||||
this.lblGamePreLaunch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lblGamePreLaunch.AutoSize = true;
|
||||
this.lblGamePreLaunch.Location = new System.Drawing.Point(8, 477);
|
||||
this.lblGamePreLaunch.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblGamePreLaunch.Name = "lblGamePreLaunch";
|
||||
this.lblGamePreLaunch.Size = new System.Drawing.Size(98, 15);
|
||||
this.lblGamePreLaunch.TabIndex = 34;
|
||||
this.lblGamePreLaunch.Text = "Pre-launch steps:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(8, 388);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(42, 15);
|
||||
this.label4.TabIndex = 33;
|
||||
this.label4.Text = "Name:";
|
||||
//
|
||||
// edtGameName
|
||||
//
|
||||
this.edtGameName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.edtGameName.Enabled = false;
|
||||
this.edtGameName.Location = new System.Drawing.Point(112, 384);
|
||||
this.edtGameName.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.edtGameName.Name = "edtGameName";
|
||||
this.edtGameName.Size = new System.Drawing.Size(233, 23);
|
||||
this.edtGameName.TabIndex = 32;
|
||||
//
|
||||
// btnGameDelete
|
||||
//
|
||||
this.btnGameDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameDelete.Enabled = false;
|
||||
this.btnGameDelete.Location = new System.Drawing.Point(291, 351);
|
||||
this.btnGameDelete.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameDelete.Name = "btnGameDelete";
|
||||
this.btnGameDelete.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameDelete.TabIndex = 30;
|
||||
this.btnGameDelete.Text = "Delete";
|
||||
this.btnGameDelete.UseVisualStyleBackColor = true;
|
||||
this.btnGameDelete.Click += new System.EventHandler(this.btnGameDelete_Click);
|
||||
//
|
||||
// btnGameClone
|
||||
//
|
||||
this.btnGameClone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameClone.Enabled = false;
|
||||
this.btnGameClone.Location = new System.Drawing.Point(103, 351);
|
||||
this.btnGameClone.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameClone.Name = "btnGameClone";
|
||||
this.btnGameClone.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameClone.TabIndex = 29;
|
||||
this.btnGameClone.Text = "Clone";
|
||||
this.btnGameClone.UseVisualStyleBackColor = true;
|
||||
this.btnGameClone.Click += new System.EventHandler(this.btnGameClone_Click);
|
||||
//
|
||||
// btnGameSave
|
||||
//
|
||||
this.btnGameSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameSave.Enabled = false;
|
||||
this.btnGameSave.Location = new System.Drawing.Point(387, 351);
|
||||
this.btnGameSave.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameSave.Name = "btnGameSave";
|
||||
this.btnGameSave.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameSave.TabIndex = 28;
|
||||
this.btnGameSave.Text = "Save";
|
||||
this.btnGameSave.UseVisualStyleBackColor = true;
|
||||
this.btnGameSave.Click += new System.EventHandler(this.btnGameSave_Click);
|
||||
//
|
||||
// btnGameAdd
|
||||
//
|
||||
this.btnGameAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameAdd.ContextMenuStrip = this.mnuNvPresets;
|
||||
this.btnGameAdd.Location = new System.Drawing.Point(199, 351);
|
||||
this.btnGameAdd.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameAdd.Name = "btnGameAdd";
|
||||
this.btnGameAdd.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameAdd.TabIndex = 25;
|
||||
this.btnGameAdd.Text = "Add";
|
||||
this.btnGameAdd.UseVisualStyleBackColor = true;
|
||||
this.btnGameAdd.Click += new System.EventHandler(this.btnGameAdd_Click);
|
||||
//
|
||||
// btnGameLaunch
|
||||
//
|
||||
this.btnGameLaunch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnGameLaunch.Enabled = false;
|
||||
this.btnGameLaunch.Location = new System.Drawing.Point(8, 351);
|
||||
this.btnGameLaunch.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnGameLaunch.Name = "btnGameLaunch";
|
||||
this.btnGameLaunch.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnGameLaunch.TabIndex = 24;
|
||||
this.btnGameLaunch.Text = "Launch";
|
||||
this.btnGameLaunch.UseVisualStyleBackColor = true;
|
||||
this.btnGameLaunch.Click += new System.EventHandler(this.btnGameLaunch_Click);
|
||||
//
|
||||
// lvGamePresets
|
||||
//
|
||||
this.lvGamePresets.AllowDrop = true;
|
||||
this.lvGamePresets.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lvGamePresets.CheckBoxes = true;
|
||||
this.lvGamePresets.FullRowSelect = true;
|
||||
this.lvGamePresets.Location = new System.Drawing.Point(8, 8);
|
||||
this.lvGamePresets.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.lvGamePresets.MultiSelect = false;
|
||||
this.lvGamePresets.Name = "lvGamePresets";
|
||||
this.lvGamePresets.ShowItemToolTips = true;
|
||||
this.lvGamePresets.Size = new System.Drawing.Size(1098, 335);
|
||||
this.lvGamePresets.TabIndex = 23;
|
||||
this.lvGamePresets.UseCompatibleStateImageBehavior = false;
|
||||
this.lvGamePresets.View = System.Windows.Forms.View.Details;
|
||||
this.lvGamePresets.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvLgPresets_ColumnClick);
|
||||
this.lvGamePresets.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lvGamePresets_ItemChecked);
|
||||
this.lvGamePresets.SelectedIndexChanged += new System.EventHandler(this.lvGamePresets_SelectedIndexChanged);
|
||||
this.lvGamePresets.DragDrop += new System.Windows.Forms.DragEventHandler(this.lvGamePresets_DragDrop);
|
||||
this.lvGamePresets.DragEnter += new System.Windows.Forms.DragEventHandler(this.lvGamePresets_DragEnter);
|
||||
this.lvGamePresets.DoubleClick += new System.EventHandler(this.lvGamePresets_DoubleClick);
|
||||
//
|
||||
// tabOptions
|
||||
//
|
||||
this.tabOptions.Controls.Add(this.grpNvidiaOptions);
|
||||
@@ -2290,6 +2744,41 @@
|
||||
this.lblInfo.TabIndex = 1;
|
||||
this.lblInfo.Text = "Info";
|
||||
//
|
||||
// mnuNvSettings
|
||||
//
|
||||
this.mnuNvSettings.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.mnuNvSettings.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.miNvProfileInspector,
|
||||
this.miNvSettings});
|
||||
this.mnuNvSettings.Name = "mnuLgButtons";
|
||||
this.mnuNvSettings.Size = new System.Drawing.Size(202, 48);
|
||||
//
|
||||
// miNvProfileInspector
|
||||
//
|
||||
this.miNvProfileInspector.Name = "miNvProfileInspector";
|
||||
this.miNvProfileInspector.Size = new System.Drawing.Size(201, 22);
|
||||
this.miNvProfileInspector.Text = "NVIDIA Profile Inspector";
|
||||
this.miNvProfileInspector.Click += new System.EventHandler(this.miNvProfileInspector_Click);
|
||||
//
|
||||
// miNvSettings
|
||||
//
|
||||
this.miNvSettings.Name = "miNvSettings";
|
||||
this.miNvSettings.Size = new System.Drawing.Size(201, 22);
|
||||
this.miNvSettings.Text = "Settings";
|
||||
this.miNvSettings.Click += new System.EventHandler(this.miNvSettings_Click);
|
||||
//
|
||||
// btnAmdSettings
|
||||
//
|
||||
this.btnAmdSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnAmdSettings.Location = new System.Drawing.Point(1017, 429);
|
||||
this.btnAmdSettings.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnAmdSettings.Name = "btnAmdSettings";
|
||||
this.btnAmdSettings.Size = new System.Drawing.Size(88, 27);
|
||||
this.btnAmdSettings.TabIndex = 60;
|
||||
this.btnAmdSettings.Text = "Settings...";
|
||||
this.btnAmdSettings.UseVisualStyleBackColor = true;
|
||||
this.btnAmdSettings.Click += new System.EventHandler(this.btnAmdSettings_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
@@ -2324,6 +2813,10 @@
|
||||
this.scLgController.ResumeLayout(false);
|
||||
this.mnuLgExpert.ResumeLayout(false);
|
||||
this.mnuLgButtons.ResumeLayout(false);
|
||||
this.tabGameLauncher.ResumeLayout(false);
|
||||
this.tabGameLauncher.PerformLayout();
|
||||
this.mnuGameActions.ResumeLayout(false);
|
||||
this.mnuGameAddStep.ResumeLayout(false);
|
||||
this.tabOptions.ResumeLayout(false);
|
||||
this.grpNvidiaOptions.ResumeLayout(false);
|
||||
this.grpNvidiaOptions.PerformLayout();
|
||||
@@ -2345,6 +2838,7 @@
|
||||
this.grpNVIDIAInfo.ResumeLayout(false);
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
this.mnuNvSettings.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -2530,6 +3024,44 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem miNvResolutionIncluded;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuNvDriverSettings;
|
||||
private System.Windows.Forms.ToolStripMenuItem miNvDriverSettingsIncluded;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuLgProgram;
|
||||
private System.Windows.Forms.TabPage tabGameLauncher;
|
||||
private System.Windows.Forms.Label lblGameParameters;
|
||||
private System.Windows.Forms.TextBox edtGameParameters;
|
||||
private System.Windows.Forms.Button btnGameBrowse;
|
||||
private System.Windows.Forms.Label lblGameFilePath;
|
||||
private System.Windows.Forms.TextBox edtGamePath;
|
||||
private System.Windows.Forms.TextBox edtGamePrelaunchSteps;
|
||||
private System.Windows.Forms.Button btnGameAddStep;
|
||||
private System.Windows.Forms.Label lblGamePreLaunch;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox edtGameName;
|
||||
private System.Windows.Forms.Button btnGameDelete;
|
||||
private System.Windows.Forms.Button btnGameClone;
|
||||
private System.Windows.Forms.Button btnGameSave;
|
||||
private System.Windows.Forms.Button btnGameAdd;
|
||||
private System.Windows.Forms.Button btnGameLaunch;
|
||||
private System.Windows.Forms.ListView lvGamePresets;
|
||||
private System.Windows.Forms.ContextMenuStrip mnuGameAddStep;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuGameNvidiaPresets;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuGameAmdPresets;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuGameLgPresets;
|
||||
private System.Windows.Forms.CheckBox chkGameRunAsAdmin;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuGameStartProgram;
|
||||
private System.Windows.Forms.Button btnGameSettings;
|
||||
private System.Windows.Forms.ContextMenuStrip mnuGameActions;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuGameNvInspector;
|
||||
private System.Windows.Forms.CheckBox chkGameQuickAccess;
|
||||
private System.Windows.Forms.ToolStripMenuItem miGameSetQuickAccessShortcut;
|
||||
private System.Windows.Forms.CheckBox chkNvShowInQuickAccess;
|
||||
private System.Windows.Forms.Button btnNvSettings;
|
||||
private System.Windows.Forms.CheckBox chkLgQuickAccess;
|
||||
private System.Windows.Forms.Button btnLgSettings;
|
||||
private System.Windows.Forms.ContextMenuStrip mnuNvSettings;
|
||||
private System.Windows.Forms.ToolStripMenuItem miNvProfileInspector;
|
||||
private System.Windows.Forms.ToolStripMenuItem miNvSettings;
|
||||
private System.Windows.Forms.CheckBox chkAmdQuickAccess;
|
||||
private System.Windows.Forms.Button btnAmdSettings;
|
||||
}
|
||||
}
|
||||
|
||||
+662
-180
File diff suppressed because it is too large.
Load diff
@@ -69,6 +69,15 @@
|
||||
<metadata name="mnuLgButtons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>147, 17</value>
|
||||
</metadata>
|
||||
<metadata name="mnuGameActions.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>418, 15</value>
|
||||
</metadata>
|
||||
<metadata name="mnuGameAddStep.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>416, 50</value>
|
||||
</metadata>
|
||||
<metadata name="mnuNvSettings.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>15, 47</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Services.AMD;
|
||||
using ColorControl.Services.LG;
|
||||
using ColorControl.Services.NVIDIA;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using NWin32;
|
||||
using System;
|
||||
|
||||
File renamed without changes.
@@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using ADL_CONTEXT_HANDLE = System.IntPtr;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.AMD
|
||||
{
|
||||
enum ADLPixelFormat
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using ATI.ADL;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.AMD
|
||||
{
|
||||
class AmdDisplayInfo
|
||||
{
|
||||
@@ -1,8 +1,9 @@
|
||||
using System;
|
||||
using ColorControl.Services.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.AMD
|
||||
{
|
||||
class AmdPreset : PresetBase
|
||||
{
|
||||
@@ -32,7 +33,7 @@ namespace ColorControl
|
||||
primaryDisplay = true;
|
||||
}
|
||||
|
||||
public AmdPreset(AmdPreset preset): this()
|
||||
public AmdPreset(AmdPreset preset) : this()
|
||||
{
|
||||
id = GetNewId();
|
||||
|
||||
@@ -99,7 +100,7 @@ namespace ColorControl
|
||||
return presets;
|
||||
}
|
||||
|
||||
public string GetTextForMenuItem()
|
||||
public override string GetTextForMenuItem()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
@@ -1,4 +1,6 @@
|
||||
using ATI.ADL;
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Services.Common;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -6,12 +8,14 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.AMD
|
||||
{
|
||||
class AmdService : GraphicsService<AmdPreset>
|
||||
{
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
public override string ServiceName => "AMD";
|
||||
|
||||
private ADLDisplayInfo _currentDisplay;
|
||||
|
||||
public AmdService(string dataPath) : base(dataPath, "AmdPresets.json")
|
||||
@@ -104,7 +108,7 @@ namespace ColorControl
|
||||
var preset = GetPresetByIdOrName(idOrName);
|
||||
if (preset != null)
|
||||
{
|
||||
return ApplyPreset(preset, Program.AppContext);
|
||||
return ApplyPreset(preset);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,7 +116,7 @@ namespace ColorControl
|
||||
}
|
||||
}
|
||||
|
||||
public bool ApplyPreset(AmdPreset preset, AppContext appContext)
|
||||
public override bool ApplyPreset(AmdPreset preset)
|
||||
{
|
||||
SetCurrentDisplay(preset);
|
||||
|
||||
@@ -145,8 +149,8 @@ namespace ColorControl
|
||||
if (preset.applyRefreshRate)
|
||||
{
|
||||
{
|
||||
if (!SetRefreshRate(preset.refreshRate))
|
||||
result = false;
|
||||
if (!SetRefreshRate(preset.refreshRate))
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using NWin32;
|
||||
using ColorControl.Common;
|
||||
using NWin32;
|
||||
using NWin32.NativeTypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -7,9 +8,9 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.Common
|
||||
{
|
||||
abstract class GraphicsService<T> : ServiceBase<T> where T : PresetBase
|
||||
abstract class GraphicsService<T> : ServiceBase<T> where T : PresetBase, new()
|
||||
{
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
@@ -115,8 +116,8 @@ namespace ColorControl
|
||||
DEVMODEA devMode;
|
||||
while (NativeMethods.EnumDisplaySettingsA(displayName, i, out devMode))
|
||||
{
|
||||
if ((portrait ? devMode.dmPelsWidth < devMode.dmPelsHeight : devMode.dmPelsWidth > devMode.dmPelsHeight) &&
|
||||
(refreshRate == 0 || devMode.dmDisplayFrequency == refreshRate) &&
|
||||
if ((portrait ? devMode.dmPelsWidth < devMode.dmPelsHeight : devMode.dmPelsWidth > devMode.dmPelsHeight) &&
|
||||
(refreshRate == 0 || devMode.dmDisplayFrequency == refreshRate) &&
|
||||
!list.Any(m => m.dmPelsWidth == devMode.dmPelsWidth && m.dmPelsHeight == devMode.dmPelsHeight))
|
||||
{
|
||||
list.Add(devMode);
|
||||
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using ColorControl.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.Common
|
||||
{
|
||||
enum PresetTriggerType
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace ColorControl
|
||||
var excluded = context.ChangedProcesses.Any(cp => ExcludedProcesses.Any(ep => cp.ProcessName.Equals(ep, StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
var screenSizeCheck = (!Conditions.HasFlag(PresetConditionType.FullScreen) && !context.ForegroundProcessIsFullScreen) ||
|
||||
(context.ForegroundProcess != null && context.ForegroundProcessIsFullScreen &&
|
||||
(context.ForegroundProcess != null && context.ForegroundProcessIsFullScreen &&
|
||||
(allProcesses || IncludedProcesses.Any(ip => context.ForegroundProcess.ProcessName.Equals(ip, StringComparison.OrdinalIgnoreCase))));
|
||||
|
||||
var notificationsDisabledCheck = !Conditions.HasFlag(PresetConditionType.NotificationsDisabled) || context.IsNotificationDisabled;
|
||||
@@ -115,6 +115,7 @@ namespace ColorControl
|
||||
public string shortcut { get; set; }
|
||||
public List<PresetTrigger> Triggers { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool ShowInQuickAccess { get; set; }
|
||||
|
||||
private int _id;
|
||||
|
||||
@@ -161,6 +162,11 @@ namespace ColorControl
|
||||
|
||||
public abstract List<string> GetDisplayValues(Config config = null);
|
||||
|
||||
public virtual string GetTextForMenuItem()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void UpdateTrigger(PresetTriggerType triggerType, PresetConditionType conditions, string includedProcesses, string excludedProcesses)
|
||||
{
|
||||
if (!Triggers.Any())
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl.Services.Common
|
||||
{
|
||||
partial class QuickAccessForm<T> : Form where T : PresetBase, new()
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.flowPanel = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.lblTitle = new System.Windows.Forms.Label();
|
||||
this.tmrHide = new System.Windows.Forms.Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// flowPanel
|
||||
//
|
||||
this.flowPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.flowPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowPanel.Location = new System.Drawing.Point(14, 33);
|
||||
this.flowPanel.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.flowPanel.Name = "flowPanel";
|
||||
this.flowPanel.Size = new System.Drawing.Size(270, 339);
|
||||
this.flowPanel.TabIndex = 0;
|
||||
this.flowPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.flowPanel_MouseMove);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.FlatAppearance.BorderColor = System.Drawing.Color.DarkGray;
|
||||
this.btnClose.FlatAppearance.BorderSize = 0;
|
||||
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnClose.ForeColor = System.Drawing.Color.White;
|
||||
this.btnClose.Location = new System.Drawing.Point(280, 0);
|
||||
this.btnClose.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(16, 27);
|
||||
this.btnClose.TabIndex = 1;
|
||||
this.btnClose.TabStop = false;
|
||||
this.btnClose.Text = "x";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// lblTitle
|
||||
//
|
||||
this.lblTitle.AutoSize = true;
|
||||
this.lblTitle.ForeColor = System.Drawing.Color.White;
|
||||
this.lblTitle.Location = new System.Drawing.Point(13, 6);
|
||||
this.lblTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.lblTitle.Name = "lblTitle";
|
||||
this.lblTitle.Size = new System.Drawing.Size(77, 15);
|
||||
this.lblTitle.TabIndex = 0;
|
||||
this.lblTitle.Text = "Quick Access";
|
||||
//
|
||||
// tmrHide
|
||||
//
|
||||
this.tmrHide.Interval = 5000;
|
||||
this.tmrHide.Tick += new System.EventHandler(this.tmrHide_Tick);
|
||||
//
|
||||
// QuickAccessForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Black;
|
||||
this.ClientSize = new System.Drawing.Size(298, 387);
|
||||
this.Controls.Add(this.lblTitle);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.flowPanel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.KeyPreview = true;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "QuickAccessForm";
|
||||
this.Opacity = 0.8D;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "RemoteControlForm";
|
||||
this.TopMost = true;
|
||||
this.Activated += new System.EventHandler(this.LgGameBar_Activated);
|
||||
this.Deactivate += new System.EventHandler(this.LgGameBar_Deactivate);
|
||||
this.Shown += new System.EventHandler(this.RemoteControlForm_Shown);
|
||||
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.RemoteControlForm_KeyUp);
|
||||
this.Move += new System.EventHandler(this.LgGameBar_Move);
|
||||
this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.QuickAccessForm_PreviewKeyDown);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowPanel;
|
||||
private System.Windows.Forms.Button btnClose;
|
||||
private System.Windows.Forms.Label lblTitle;
|
||||
private System.Windows.Forms.Timer tmrHide;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl.Services.Common
|
||||
{
|
||||
partial class QuickAccessForm<T> : Form where T : PresetBase, new()
|
||||
{
|
||||
private ServiceBase<T> _service;
|
||||
private List<Button> _buttons = new List<Button>();
|
||||
private bool _shown = false;
|
||||
|
||||
private static Dictionary<ServiceBase<T>, QuickAccessForm<T>> QuickAccessForms = new();
|
||||
|
||||
public static void ToggleQuickAccessForm(ServiceBase<T> service)
|
||||
{
|
||||
if (!QuickAccessForms.TryGetValue(service, out var form) || form.IsDisposed)
|
||||
{
|
||||
form = new QuickAccessForm<T>(service);
|
||||
QuickAccessForms.Add(service, form);
|
||||
}
|
||||
|
||||
|
||||
if (!form.Visible)
|
||||
{
|
||||
form.Show();
|
||||
form.Activate();
|
||||
}
|
||||
else
|
||||
{
|
||||
form.Hide();
|
||||
}
|
||||
}
|
||||
|
||||
public QuickAccessForm(ServiceBase<T> service)
|
||||
{
|
||||
_service = service;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
lblTitle.Text = $"Quick Access - {service.ServiceName}";
|
||||
}
|
||||
|
||||
private void GenerateComponents()
|
||||
{
|
||||
var presets = _service.GetPresets().Where(p => p.ShowInQuickAccess);
|
||||
|
||||
flowPanel.Controls.Clear();
|
||||
_buttons.Clear();
|
||||
|
||||
if (presets.Any())
|
||||
{
|
||||
foreach (var preset in presets)
|
||||
{
|
||||
CreateGroup(preset);
|
||||
}
|
||||
Height = Height - flowPanel.Height + (_buttons.Count() * 46) + 8;
|
||||
|
||||
return;
|
||||
}
|
||||
var panel = new Panel();
|
||||
panel.Width = flowPanel.Width - 4;
|
||||
panel.Height = 40;
|
||||
|
||||
var label = new Label();
|
||||
label.Text = "No Quick Access presets configured";
|
||||
label.Parent = panel;
|
||||
label.AutoSize = true;
|
||||
label.ForeColor = Color.White;
|
||||
|
||||
panel.Parent = flowPanel;
|
||||
|
||||
Height = Height - flowPanel.Height + 36;
|
||||
}
|
||||
|
||||
private Button CreateGroup(PresetBase preset)
|
||||
{
|
||||
var panel = new Panel();
|
||||
panel.Width = flowPanel.Width - 4;
|
||||
panel.Height = 40;
|
||||
|
||||
var button = new Button();
|
||||
button.Text = preset.name;
|
||||
button.Tag = preset;
|
||||
button.Font = new Font(button.Font, FontStyle.Bold);
|
||||
button.Parent = panel;
|
||||
button.Width = panel.Width - 4;
|
||||
button.Height = panel.Height - 4;
|
||||
var margin = button.Margin;
|
||||
margin.Top = 0;
|
||||
margin.Bottom = 0;
|
||||
button.Margin = margin;
|
||||
button.ForeColor = Color.White;
|
||||
button.FlatStyle = FlatStyle.Flat;
|
||||
button.FlatAppearance.BorderColor = Color.DarkGray;
|
||||
button.FlatAppearance.MouseOverBackColor = Color.DimGray;
|
||||
button.Click += Button_Click;
|
||||
|
||||
panel.Parent = flowPanel;
|
||||
|
||||
_buttons.Add(button);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, EventArgs e)
|
||||
{
|
||||
var preset = (T)(sender as Button).Tag;
|
||||
|
||||
if (NWin32.NativeMethods.GetAsyncKeyState(NWin32.NativeConstants.VK_SHIFT) < 0)
|
||||
{
|
||||
preset.ShowInQuickAccess = false;
|
||||
|
||||
GenerateComponents();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Hide();
|
||||
|
||||
var _ = _service.ApplyPreset(preset);
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void HandleKey(Keys key)
|
||||
{
|
||||
if (key == Keys.Escape)
|
||||
{
|
||||
Hide();
|
||||
return;
|
||||
}
|
||||
|
||||
ResetAutoHide();
|
||||
|
||||
if (!_buttons.Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(ActiveControl is Button button))
|
||||
{
|
||||
_buttons.First().Focus();
|
||||
return;
|
||||
}
|
||||
var diff = 0;
|
||||
|
||||
if (key == Keys.Up)
|
||||
{
|
||||
diff = -1;
|
||||
}
|
||||
else if (key == Keys.Down)
|
||||
{
|
||||
diff = 1;
|
||||
}
|
||||
|
||||
if (diff == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var index = _buttons.IndexOf(button);
|
||||
index += diff;
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
index = _buttons.Count - 1;
|
||||
}
|
||||
else if (index == _buttons.Count)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
|
||||
button = _buttons[index];
|
||||
|
||||
button.Focus();
|
||||
}
|
||||
|
||||
private void RemoteControlForm_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
HandleKey(e.KeyCode);
|
||||
}
|
||||
|
||||
private void flowPanel_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
ResetAutoHide();
|
||||
}
|
||||
|
||||
private void RemoteControlForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
GenerateComponents();
|
||||
ResetAutoHide();
|
||||
|
||||
_shown = true;
|
||||
}
|
||||
|
||||
private void LgGameBar_Deactivate(object sender, EventArgs e)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void tmrHide_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
|
||||
private void LgGameBar_Activated(object sender, EventArgs e)
|
||||
{
|
||||
if (_shown)
|
||||
{
|
||||
GenerateComponents();
|
||||
}
|
||||
ResetAutoHide();
|
||||
}
|
||||
|
||||
private void LgGameBar_Move(object sender, EventArgs e)
|
||||
{
|
||||
ResetAutoHide();
|
||||
}
|
||||
|
||||
private void ResetAutoHide()
|
||||
{
|
||||
tmrHide.Enabled = false;
|
||||
tmrHide.Enabled = true;
|
||||
}
|
||||
|
||||
private void QuickAccessForm_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
HandleKey(e.KeyCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -4,14 +4,19 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.Common
|
||||
{
|
||||
abstract class ServiceBase<T> where T : PresetBase
|
||||
abstract class ServiceBase<T> where T : PresetBase, new()
|
||||
{
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
public event EventHandler<T> AfterApplyPreset;
|
||||
|
||||
public abstract string ServiceName
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
protected string _dataPath;
|
||||
protected string _presetsBaseFilename;
|
||||
protected string _presetsFilename;
|
||||
@@ -20,6 +25,7 @@ namespace ColorControl
|
||||
protected List<T> _presets;
|
||||
protected T _lastAppliedPreset;
|
||||
protected string _loadPresetsError;
|
||||
|
||||
private List<JsonConverter> _jsonConverters;
|
||||
|
||||
public ServiceBase(string dataPath, string presetsBaseFilename)
|
||||
@@ -52,11 +58,30 @@ namespace ColorControl
|
||||
return preset;
|
||||
}
|
||||
|
||||
public abstract bool ApplyPreset(T preset);
|
||||
|
||||
public T GetLastAppliedPreset()
|
||||
{
|
||||
return _lastAppliedPreset;
|
||||
}
|
||||
|
||||
public virtual T CreateNewPreset()
|
||||
{
|
||||
var preset = new T();
|
||||
var name = "New preset";
|
||||
string fullname;
|
||||
var number = 1;
|
||||
do
|
||||
{
|
||||
fullname = $"{name} ({number})";
|
||||
number++;
|
||||
} while (_presets.Any(x => x.name.Equals(fullname)));
|
||||
|
||||
preset.name = fullname;
|
||||
|
||||
return preset;
|
||||
}
|
||||
|
||||
protected virtual void Initialize()
|
||||
{
|
||||
|
||||
@@ -136,5 +161,11 @@ namespace ColorControl
|
||||
{
|
||||
_jsonConverters.Add(jsonConverter);
|
||||
}
|
||||
|
||||
public void ToggleQuickAccessForm()
|
||||
{
|
||||
QuickAccessForm<T>.ToggleQuickAccessForm(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using ColorControl.Services.Common;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ColorControl.Services.GameLauncher
|
||||
{
|
||||
class GamePreset : PresetBase
|
||||
{
|
||||
public string Path { get; set; }
|
||||
public string Parameters { get; set; }
|
||||
public bool RunAsAdministrator { get; set; }
|
||||
public List<string> PreLaunchSteps { get; set; }
|
||||
public List<string> PostLaunchSteps { get; set; }
|
||||
|
||||
public GamePreset() : base()
|
||||
{
|
||||
PreLaunchSteps = new List<string>();
|
||||
PostLaunchSteps = new List<string>();
|
||||
}
|
||||
|
||||
public GamePreset(GamePreset preset) : this()
|
||||
{
|
||||
id = GetNewId();
|
||||
|
||||
name = preset.name;
|
||||
Path = preset.Path;
|
||||
Parameters = preset.Parameters;
|
||||
RunAsAdministrator = preset.RunAsAdministrator;
|
||||
PreLaunchSteps.AddRange(preset.PreLaunchSteps);
|
||||
PostLaunchSteps.AddRange(preset.PostLaunchSteps);
|
||||
}
|
||||
|
||||
public GamePreset Clone()
|
||||
{
|
||||
var preset = new GamePreset(this);
|
||||
|
||||
preset.name += " (copy)";
|
||||
|
||||
return preset;
|
||||
}
|
||||
|
||||
public static string[] GetColumnNames()
|
||||
{
|
||||
return new[] { "Name|160", "File/URI|400", "Parameters|200", "Pre-launch steps|300" };
|
||||
}
|
||||
|
||||
public override List<string> GetDisplayValues(Config config = null)
|
||||
{
|
||||
var values = new List<string>();
|
||||
|
||||
values.Add(name);
|
||||
values.Add(Path);
|
||||
values.Add(Parameters);
|
||||
|
||||
values.Add(string.Join(", ", PreLaunchSteps));
|
||||
values.Add(string.Join(", ", PostLaunchSteps));
|
||||
|
||||
return values;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Services.Common;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ColorControl.Services.GameLauncher
|
||||
{
|
||||
class GameService : ServiceBase<GamePreset>
|
||||
{
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
public override string ServiceName => "Game";
|
||||
|
||||
private Func<string, string[], bool> _externalServiceHandler;
|
||||
|
||||
public GameService(string dataPath, Func<string, string[], bool> externalServiceHandler = null) : base(dataPath, "GamePresets.json")
|
||||
{
|
||||
LoadPresets();
|
||||
_externalServiceHandler = externalServiceHandler;
|
||||
}
|
||||
|
||||
public static bool ExecutePresetAsync(string idOrName)
|
||||
{
|
||||
try
|
||||
{
|
||||
var service = new GameService(Program.DataDir);
|
||||
|
||||
var result = service.ApplyPreset(idOrName);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
Console.WriteLine("Preset not found or error while executing.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Error executing preset: " + ex.ToLogString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override List<GamePreset> GetDefaultPresets()
|
||||
{
|
||||
return new List<GamePreset>();
|
||||
}
|
||||
|
||||
private void SavePresets()
|
||||
{
|
||||
try
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(_presets);
|
||||
File.WriteAllText(_presetsFilename, json);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error(e.ToLogString());
|
||||
}
|
||||
}
|
||||
|
||||
public void GlobalSave()
|
||||
{
|
||||
SavePresets();
|
||||
}
|
||||
|
||||
public bool ApplyPreset(string idOrName)
|
||||
{
|
||||
var preset = GetPresetByIdOrName(idOrName);
|
||||
if (preset != null)
|
||||
{
|
||||
return ApplyPreset(preset, Program.AppContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ApplyPreset(GamePreset preset)
|
||||
{
|
||||
return ApplyPreset(preset, Program.AppContext);
|
||||
}
|
||||
|
||||
public bool ApplyPreset(GamePreset preset, AppContext appContext)
|
||||
{
|
||||
var result = true;
|
||||
|
||||
foreach (var step in preset.PreLaunchSteps)
|
||||
{
|
||||
var keySpec = step.Split(':');
|
||||
|
||||
var delay = 0;
|
||||
var key = step;
|
||||
if (keySpec.Length == 2)
|
||||
{
|
||||
delay = Utils.ParseInt(keySpec[1]);
|
||||
if (delay > 0)
|
||||
{
|
||||
key = keySpec[0];
|
||||
}
|
||||
}
|
||||
|
||||
var index = key.IndexOf("(");
|
||||
string[] parameters = null;
|
||||
if (index > -1)
|
||||
{
|
||||
var keyValue = key.Split('(');
|
||||
key = keyValue[0];
|
||||
parameters = keyValue[1].Substring(0, keyValue[1].Length - 1).Trim().Split(';');
|
||||
}
|
||||
|
||||
var handled = false;
|
||||
|
||||
if (_externalServiceHandler != null && parameters != null)
|
||||
{
|
||||
handled = _externalServiceHandler(key, parameters);
|
||||
}
|
||||
|
||||
if (!handled)
|
||||
{
|
||||
}
|
||||
|
||||
if (delay > 0)
|
||||
{
|
||||
Utils.WaitForTask(Task.Delay(delay));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(preset.Path))
|
||||
{
|
||||
Utils.StartProcess(preset.Path, preset.Parameters, setWorkingDir: true, elevate: preset.RunAsAdministrator);
|
||||
}
|
||||
|
||||
_lastAppliedPreset = preset;
|
||||
|
||||
PresetApplied();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
using LgTv;
|
||||
using ColorControl.Common;
|
||||
using LgTv;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
class LgDevice
|
||||
{
|
||||
@@ -73,7 +73,8 @@ namespace ColorControl
|
||||
|
||||
private List<string> _actionsForGameBar;
|
||||
|
||||
public List<string> ActionsOnGameBar {
|
||||
public List<string> ActionsOnGameBar
|
||||
{
|
||||
get
|
||||
{
|
||||
return _actionsForGameBar;
|
||||
@@ -88,7 +89,7 @@ namespace ColorControl
|
||||
{
|
||||
_actionsForGameBar = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
@@ -387,7 +388,8 @@ namespace ColorControl
|
||||
PoweredOffBy = PoweredOffViaApp ? PowerOffSource.App : PowerOffSource.Manually;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
PoweredOffBy = PoweredOffViaApp ? PowerOffSource.App : PowerOffSource.Manually;
|
||||
}
|
||||
}
|
||||
@@ -528,26 +530,32 @@ namespace ColorControl
|
||||
|
||||
private async Task ExecuteSteps(LgTvApi api, LgPreset preset)
|
||||
{
|
||||
var mouse = await api.GetMouse();
|
||||
LgWebOsMouseService mouse = null;
|
||||
|
||||
foreach (var step in preset.steps)
|
||||
{
|
||||
var keySpec = step.Split(':');
|
||||
var key = keySpec[0].ToUpper();
|
||||
|
||||
var delay = 0;
|
||||
var key = step;
|
||||
if (keySpec.Length == 2)
|
||||
{
|
||||
delay = Utils.ParseInt(keySpec[1]);
|
||||
if (delay > 0)
|
||||
{
|
||||
key = keySpec[0];
|
||||
}
|
||||
}
|
||||
|
||||
var index = key.IndexOf("(");
|
||||
string[] parameters = null;
|
||||
if (index > -1)
|
||||
{
|
||||
var keyValue = keySpec[0].Split('(');
|
||||
var keyValue = key.Split('(');
|
||||
key = keyValue[0];
|
||||
parameters = keyValue[1].Substring(0, keyValue[1].Length - 1).Split(';');
|
||||
}
|
||||
|
||||
var delay = 0;
|
||||
if (keySpec.Length == 2)
|
||||
{
|
||||
delay = Utils.ParseInt(keySpec[1]);
|
||||
}
|
||||
|
||||
var executeKey = true;
|
||||
var action = _invokableActions.FirstOrDefault(a => a.Name.Equals(key, StringComparison.OrdinalIgnoreCase));
|
||||
if (action != null)
|
||||
@@ -566,6 +574,7 @@ namespace ColorControl
|
||||
|
||||
if (executeKey)
|
||||
{
|
||||
mouse ??= await api.GetMouse();
|
||||
SendKey(mouse, key);
|
||||
delay = delay == 0 ? 180 : delay;
|
||||
}
|
||||
@@ -602,6 +611,7 @@ namespace ColorControl
|
||||
|
||||
private void SendKey(LgWebOsMouseService mouse, string key)
|
||||
{
|
||||
key = key.ToUpper();
|
||||
if (key.Length >= 1 && int.TryParse(key[0].ToString(), out _))
|
||||
{
|
||||
key = "_" + key;
|
||||
@@ -638,7 +648,7 @@ namespace ColorControl
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checkHdmi && CurrentAppId != null && HDMIPortNumber != 0 && !CurrentAppId.EndsWith($".hdmi{HDMIPortNumber}", StringComparison.InvariantCulture))
|
||||
if (checkHdmi && CurrentAppId != null && HDMIPortNumber != 0 && !CurrentAppId.EndsWith($".hdmi{HDMIPortNumber}", StringComparison.InvariantCulture))
|
||||
{
|
||||
Logger.Debug($"[{Name}] PowerOff is ignored because current app {CurrentAppId} does not match configured HDMI port {HDMIPortNumber}");
|
||||
return true;
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
partial class LgGameBar
|
||||
{
|
||||
@@ -1,11 +1,12 @@
|
||||
using NWin32;
|
||||
using ColorControl.Common;
|
||||
using NWin32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
partial class LgGameBar : Form
|
||||
{
|
||||
@@ -42,7 +43,8 @@ namespace ColorControl
|
||||
var actions = _lgDevice.GetActionsForGameBar();
|
||||
var actionNames = actions.Select(a => a.Name).ToList();
|
||||
|
||||
if (_lastActions.Count == actions.Count && _lastActions.All(a => actionNames.Contains(a))) {
|
||||
if (_lastActions.Count == actions.Count && _lastActions.All(a => actionNames.Contains(a)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -96,7 +98,7 @@ namespace ColorControl
|
||||
TrackBar = trackBar,
|
||||
Name = settingName,
|
||||
EnumType = enumType,
|
||||
PropertyName = title
|
||||
PropertyName = Utils.FirstCharUpperCase(settingName)
|
||||
};
|
||||
|
||||
trackBar.Tag = setting;
|
||||
@@ -287,7 +289,7 @@ namespace ColorControl
|
||||
{
|
||||
value = trackBar.Value.ToString();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
var enumValue = Enum.Parse(setting.EnumType, trackBar.Value.ToString());
|
||||
value = enumValue.ToString();
|
||||
@@ -0,0 +1,63 @@
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="tmrHide.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1,9 +1,10 @@
|
||||
using LgTv;
|
||||
using ColorControl.Services.Common;
|
||||
using LgTv;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
class LgPreset : PresetBase
|
||||
{
|
||||
@@ -1,4 +1,7 @@
|
||||
using LgTv;
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Forms;
|
||||
using ColorControl.Services.Common;
|
||||
using LgTv;
|
||||
using Microsoft.Win32;
|
||||
using Newtonsoft.Json;
|
||||
using NWin32;
|
||||
@@ -11,7 +14,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
class LgService : ServiceBase<LgPreset>
|
||||
{
|
||||
@@ -48,6 +51,8 @@ namespace ColorControl
|
||||
|
||||
public static string LgListAppsJson = "listApps.json";
|
||||
|
||||
public override string ServiceName => "LG";
|
||||
|
||||
public List<LgDevice> Devices { get; private set; }
|
||||
public LgDevice SelectedDevice
|
||||
{
|
||||
@@ -124,22 +129,6 @@ namespace ColorControl
|
||||
SaveRemoteControlButtons();
|
||||
}
|
||||
|
||||
public LgPreset CreateNewPreset()
|
||||
{
|
||||
var preset = new LgPreset();
|
||||
var name = "New preset";
|
||||
string fullname;
|
||||
var number = 1;
|
||||
do
|
||||
{
|
||||
fullname = $"{name} ({number})";
|
||||
number++;
|
||||
} while (_presets.Any(x => x.name.Equals(fullname)));
|
||||
|
||||
preset.name = fullname;
|
||||
|
||||
return preset;
|
||||
}
|
||||
protected override List<LgPreset> GetDefaultPresets()
|
||||
{
|
||||
List<LgPreset> presets = null;
|
||||
@@ -363,6 +352,15 @@ namespace ColorControl
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ApplyPreset(LgPreset preset)
|
||||
{
|
||||
var task = ApplyPreset(preset, false);
|
||||
|
||||
Utils.WaitForTask(task);
|
||||
|
||||
return task.Result;
|
||||
}
|
||||
|
||||
public async Task<bool> ApplyPreset(LgPreset preset, bool reconnect = false)
|
||||
{
|
||||
var device = GetPresetDevice(preset);
|
||||
@@ -702,9 +700,9 @@ namespace ColorControl
|
||||
return;
|
||||
}
|
||||
|
||||
context.IsNotificationDisabled = Utils.IsNotificationDisabled();
|
||||
context.IsNotificationDisabled = FormUtils.IsNotificationDisabled();
|
||||
|
||||
var (processId, isFullScreen) = Utils.GetForegroundProcessIdAndIfFullScreen();
|
||||
var (processId, isFullScreen) = FormUtils.GetForegroundProcessIdAndIfFullScreen();
|
||||
|
||||
if (processId == Environment.ProcessId)
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
class LgServiceConfig
|
||||
{
|
||||
Generated
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
partial class RemoteControlForm
|
||||
{
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
partial class RemoteControlForm : Form
|
||||
{
|
||||
File renamed without changes.
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
partial class RemoteControlPanel
|
||||
{
|
||||
@@ -1,11 +1,12 @@
|
||||
using NLog;
|
||||
using ColorControl.Common;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.LG
|
||||
{
|
||||
partial class RemoteControlPanel : UserControl
|
||||
{
|
||||
File renamed without changes.
+1
-1
@@ -3,7 +3,7 @@ using NvAPIWrapper.Display;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.NVIDIA
|
||||
{
|
||||
public class ColorDataConverter : JsonConverter<ColorData>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using NvAPIWrapper.Display;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.NVIDIA
|
||||
{
|
||||
class NvDisplayInfo
|
||||
{
|
||||
@@ -1,5 +1,6 @@
|
||||
using nspector.Common;
|
||||
using nspector.Common.Meta;
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Services.Common;
|
||||
using nspector.Common;
|
||||
using NvAPIWrapper.Display;
|
||||
using NvAPIWrapper.Native.Display;
|
||||
using System;
|
||||
@@ -7,7 +8,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.NVIDIA
|
||||
{
|
||||
class NvPreset : PresetBase
|
||||
{
|
||||
@@ -58,7 +59,7 @@ namespace ColorControl
|
||||
this.colorData = colorData;
|
||||
}
|
||||
|
||||
public NvPreset(NvPreset preset): this()
|
||||
public NvPreset(NvPreset preset) : this()
|
||||
{
|
||||
id = GetNewId();
|
||||
|
||||
@@ -93,7 +94,7 @@ namespace ColorControl
|
||||
public static string[] GetColumnNames()
|
||||
{
|
||||
//return new[] { "BPC", "Format", "Dynamic range", "Toggle HDR", "Shortcut" };
|
||||
return new[] { "Name", "Display|140", "Color settings (BPC, format, dyn. range, color space)|260", "Refresh rate|100", "Resolution|120", "Dithering", "HDR", "Driver settings|300", "Shortcut", "Apply on startup" };
|
||||
return new[] { "[Quick Access] Name", "Display|140", "Color settings (BPC, format, dyn. range, color space)|260", "Refresh rate|100", "Resolution|120", "Dithering", "HDR", "Driver settings|300", "Shortcut", "Apply on startup" };
|
||||
}
|
||||
|
||||
public override List<string> GetDisplayValues(Config config = null)
|
||||
@@ -189,7 +190,7 @@ namespace ColorControl
|
||||
return presets;
|
||||
}
|
||||
|
||||
public string GetTextForMenuItem()
|
||||
public override string GetTextForMenuItem()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
@@ -1,7 +1,8 @@
|
||||
using Newtonsoft.Json;
|
||||
using ColorControl.Common;
|
||||
using ColorControl.Services.Common;
|
||||
using Newtonsoft.Json;
|
||||
using nspector.Common;
|
||||
using nspector.Common.Meta;
|
||||
using NvAPIWrapper;
|
||||
using NvAPIWrapper.Display;
|
||||
using NvAPIWrapper.Native.Display;
|
||||
using NvAPIWrapper.Native.GPU.Structures;
|
||||
@@ -14,7 +15,7 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ColorControl
|
||||
namespace ColorControl.Services.NVIDIA
|
||||
{
|
||||
enum NvDitherState
|
||||
{
|
||||
@@ -81,6 +82,8 @@ namespace ColorControl
|
||||
public uint modeCaps;
|
||||
};
|
||||
|
||||
public override string ServiceName => "NVIDIA";
|
||||
|
||||
private Display _currentDisplay;
|
||||
private string _baseProfileName = "";
|
||||
|
||||
@@ -89,10 +92,10 @@ namespace ColorControl
|
||||
private List<SettingItem> _settings = new List<SettingItem>();
|
||||
|
||||
public const uint DRS_GSYNC_APPLICATION_MODE = 294973784;
|
||||
public const uint DRS_VSYNC_CONTROL = 11041231;
|
||||
public const uint DRS_VSYNC_CONTROL = 11041231;
|
||||
//public const uint DRS_ULTRA_LOW_LATENCY = 0x10835000;
|
||||
public const uint DRS_PRERENDERED_FRAMES = 8102046;
|
||||
public const uint DRS_FRAME_RATE_LIMITER_V3 = 277041154;
|
||||
public const uint DRS_PRERENDERED_FRAMES = 8102046;
|
||||
public const uint DRS_FRAME_RATE_LIMITER_V3 = 277041154;
|
||||
|
||||
private static readonly List<uint> _driverSettingIds = new() { DRS_GSYNC_APPLICATION_MODE, DRS_VSYNC_CONTROL, DRS_PRERENDERED_FRAMES, DRS_FRAME_RATE_LIMITER_V3 };
|
||||
|
||||
@@ -218,6 +221,11 @@ namespace ColorControl
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ApplyPreset(NvPreset preset)
|
||||
{
|
||||
return ApplyPreset(preset, Program.AppContext);
|
||||
}
|
||||
|
||||
public bool ApplyPreset(NvPreset preset, AppContext appContext)
|
||||
{
|
||||
var result = true;
|
||||
@@ -426,7 +434,7 @@ namespace ColorControl
|
||||
|
||||
var gpuHandle = displayDevice.PhysicalGPU.Handle;
|
||||
var displayId = displayDevice.DisplayId;
|
||||
|
||||
|
||||
if (state == NvDitherState.Auto)
|
||||
{
|
||||
// These seem to be ignored in Auto-state
|
||||
@@ -682,7 +690,7 @@ namespace ColorControl
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
NVIDIA.Initialize();
|
||||
NvAPIWrapper.NVIDIA.Initialize();
|
||||
_initialized = true;
|
||||
|
||||
_drs = DrsServiceLocator.SettingService;
|
||||
@@ -706,7 +714,7 @@ namespace ColorControl
|
||||
{
|
||||
if (_initialized)
|
||||
{
|
||||
NVIDIA.Unload();
|
||||
NvAPIWrapper.NVIDIA.Unload();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using ColorControl;
|
||||
using ColorControl.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace LgTv
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using ColorControl;
|
||||
using ColorControl.Common;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -8,6 +8,7 @@ using Windows.Storage.Streams;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ColorControl;
|
||||
using ColorControl.Common;
|
||||
|
||||
namespace LgTv
|
||||
{
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-4
@@ -1,14 +1,11 @@
|
||||
using nspector.Common.Helper;
|
||||
using nspector.Native.NVAPI2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
internal class DrsDecrypterService : DrsSettingsServiceBase
|
||||
public class DrsDecrypterService : DrsSettingsServiceBase
|
||||
{
|
||||
|
||||
private static readonly byte[] _InternalSettingsKey = new byte[] {
|
||||
+3
-6
@@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using nspector.Common.Helper;
|
||||
using nspector.Common.Import;
|
||||
using nspector.Native.NVAPI2;
|
||||
using System.Text;
|
||||
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
|
||||
using nspector.Common.Helper;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
internal class DrsImportService : DrsSettingsServiceBase
|
||||
public class DrsImportService : DrsSettingsServiceBase
|
||||
{
|
||||
|
||||
private readonly DrsSettingsService _SettingService;
|
||||
+1
-7
@@ -1,19 +1,13 @@
|
||||
using nspector.Common.Helper;
|
||||
using nspector.Native.NVAPI2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
|
||||
|
||||
internal class DrsScannerService : DrsSettingsServiceBase
|
||||
public class DrsScannerService : DrsSettingsServiceBase
|
||||
{
|
||||
|
||||
public DrsScannerService(DrsSettingsMetaService metaService, DrsDecrypterService decrpterService)
|
||||
+3
-4
@@ -1,16 +1,15 @@
|
||||
using System.IO;
|
||||
using nspector.Common.CustomSettings;
|
||||
using System.Reflection;
|
||||
using nspector.Common.CustomSettings;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
internal class DrsServiceLocator
|
||||
public class DrsServiceLocator
|
||||
{
|
||||
private static readonly CustomSettingNames CustomSettings;
|
||||
public static readonly CustomSettingNames ReferenceSettings;
|
||||
public static readonly DrsSettingsMetaService MetaService;
|
||||
public static readonly DrsSettingsService SettingService;
|
||||
public static readonly DrsImportService ImportService;
|
||||
public static readonly DrsSettingsService SettingService;
|
||||
public static readonly DrsScannerService ScannerService;
|
||||
public static readonly DrsDecrypterService DecrypterService;
|
||||
|
||||
File renamed without changes.
+2
-5
@@ -1,13 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using nspector.Common.CustomSettings;
|
||||
using nspector.Common.Meta;
|
||||
using nspector.Common.CustomSettings;
|
||||
using nspector.Native.NVAPI2;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
internal class DrsSettingsMetaService
|
||||
public class DrsSettingsMetaService
|
||||
{
|
||||
|
||||
private ISettingMetaService ConstantMeta;
|
||||
+4
-8
@@ -1,17 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using nspector.Common.Helper;
|
||||
using nspector.Common.Helper;
|
||||
using nspector.Common.Meta;
|
||||
using nspector.Native.NVAPI2;
|
||||
using System.Diagnostics;
|
||||
using System.Text.RegularExpressions;
|
||||
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
internal class DrsSettingsService : DrsSettingsServiceBase
|
||||
public class DrsSettingsService : DrsSettingsServiceBase
|
||||
{
|
||||
|
||||
public DrsSettingsService(DrsSettingsMetaService metaService, DrsDecrypterService decrpterService)
|
||||
+2
-10
@@ -1,18 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using nspector.Native.NVAPI2;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using nspector.Common.Helper;
|
||||
|
||||
using nspector.Native.NVAPI2;
|
||||
using nvw = nspector.Native.NVAPI2.NvapiDrsWrapper;
|
||||
|
||||
namespace nspector.Common
|
||||
{
|
||||
internal abstract class DrsSettingsServiceBase
|
||||
public abstract class DrsSettingsServiceBase
|
||||
{
|
||||
|
||||
protected DrsSettingsMetaService meta;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-5
@@ -1,12 +1,8 @@
|
||||
using nspector.Native.NVAPI2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace nspector.Common.Meta
|
||||
{
|
||||
internal interface ISettingMetaService
|
||||
public interface ISettingMetaService
|
||||
{
|
||||
SettingMetaSource Source { get; }
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+1
-2
@@ -1,9 +1,8 @@
|
||||
using nspector.Native.NVAPI2;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace nspector.Common.Meta
|
||||
{
|
||||
internal class SettingMeta
|
||||
public class SettingMeta
|
||||
{
|
||||
public NVDRS_SETTING_TYPE? SettingType { get; set; }
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -1,6 +1,6 @@
|
||||
namespace nspector.Common.Meta
|
||||
{
|
||||
internal class SettingValue<T>
|
||||
public class SettingValue<T>
|
||||
{
|
||||
|
||||
public SettingMetaSource ValueSource;
|
||||
File renamed without changes.
@@ -1,7 +1,7 @@
|
||||
namespace nspector.Common
|
||||
{
|
||||
|
||||
internal enum SettingState
|
||||
public enum SettingState
|
||||
{
|
||||
NotAssiged,
|
||||
GlobalSetting,
|
||||
@@ -9,7 +9,7 @@
|
||||
NvidiaSetting,
|
||||
}
|
||||
|
||||
internal class SettingItem
|
||||
public class SettingItem
|
||||
{
|
||||
public uint SettingId { get; set; }
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 144 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user