mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 00:22:18 -05:00
fix bugs, add screenshots
This commit is contained in:
1 parent
3fa2c3dec4
commit
840e8a1a71
6 files changed
+26
-22
No files matched your search
@@ -19,7 +19,7 @@ namespace ColorControl
|
||||
public static string LgControllerExe = "LgController.exe";
|
||||
public static string LgListAppsJson = "listApps.json";
|
||||
|
||||
public static string LgDeviceSearchKey = "OLED55C9PLA";
|
||||
public static string LgDeviceSearchKey = "[LG]";
|
||||
|
||||
private static readonly NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger();
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace ColorControl
|
||||
private string _dataDir;
|
||||
private string _configFilename;
|
||||
private bool _allowPowerOn;
|
||||
private bool _justWokeUp;
|
||||
|
||||
public LgService(string dataDir, bool allowPowerOn)
|
||||
{
|
||||
@@ -155,6 +156,12 @@ namespace ColorControl
|
||||
if (hasApp)
|
||||
{
|
||||
await _lgTvApi.LaunchApp(preset.appId);
|
||||
|
||||
if (_justWokeUp)
|
||||
{
|
||||
_justWokeUp = false;
|
||||
await Task.Delay(500);
|
||||
}
|
||||
}
|
||||
|
||||
if (preset.steps.Any())
|
||||
@@ -251,6 +258,7 @@ namespace ColorControl
|
||||
if (SelectedDevice != null)
|
||||
{
|
||||
WOL.WakeFunction(SelectedDevice.MacAddress);
|
||||
_justWokeUp = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -314,7 +314,7 @@ namespace ColorControl
|
||||
}
|
||||
|
||||
var header = lvNvPresets.Columns.Add(columnName);
|
||||
header.Width = width;
|
||||
header.Width = width == 120 ? -2 : width;
|
||||
}
|
||||
|
||||
if (File.Exists(_nvPresetsFilename))
|
||||
@@ -1058,7 +1058,7 @@ namespace ColorControl
|
||||
}
|
||||
|
||||
var header = lvLgPresets.Columns.Add(columnName);
|
||||
header.Width = width;
|
||||
header.Width = width == 120 ? -2 : width;
|
||||
}
|
||||
|
||||
if (File.Exists(_lgPresetsFilename))
|
||||
|
||||
+15
-19
@@ -157,23 +157,23 @@ namespace ColorControl
|
||||
|
||||
internal static bool InstallChromeFix(bool install)
|
||||
{
|
||||
//var key = Registry.ClassesRoot.OpenSubKey(@"ChromeHTML\shell\open\command", true);
|
||||
//if (key != null)
|
||||
//{
|
||||
// var value = key.GetValue(null).ToString();
|
||||
// if (install)
|
||||
// {
|
||||
// value = value.Replace("chrome.exe\" -- \"", "chrome.exe\" --disable-lcd-text -- \"");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// value = value.Replace("chrome.exe\" --disable-lcd-text -- \"", "chrome.exe\" -- \"");
|
||||
// }
|
||||
// key.SetValue(null, value);
|
||||
//}
|
||||
|
||||
var argument = "--disable-lcd-text";
|
||||
|
||||
var key = Registry.ClassesRoot.OpenSubKey(@"ChromeHTML\shell\open\command", true);
|
||||
if (key != null)
|
||||
{
|
||||
var value = key.GetValue(null).ToString();
|
||||
if (install)
|
||||
{
|
||||
value = value.Replace("chrome.exe\" -- \"", "chrome.exe\" " + argument + " -- \"");
|
||||
}
|
||||
else
|
||||
{
|
||||
value = value.Replace("chrome.exe\" " + argument + " -- \"", "chrome.exe\" -- \"");
|
||||
}
|
||||
key.SetValue(null, value);
|
||||
}
|
||||
|
||||
var roamingFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
|
||||
UpdateShortcut(Path.Combine(roamingFolder, @"Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Google Chrome.lnk"), argument, !install);
|
||||
@@ -197,10 +197,6 @@ namespace ColorControl
|
||||
{
|
||||
IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShell();
|
||||
|
||||
// C:\Users\All Users\Microsoft\Windows\Start Menu\Programs
|
||||
// C:\Users\vinni\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
|
||||
// C:\Users\vinni\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Google Chrome.lnk
|
||||
|
||||
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(path);
|
||||
|
||||
shortcut.Arguments = shortcut.Arguments.Replace(arguments, "");
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Reference in new issue
Block a user