extend eligible models for motion pro, fix bug when adding WOL action

This commit is contained in:
Vincent Maas committed 2021-06-11 20:07:51 +02:00
1 parent 3abf106496
commit fc134b146a
4 files changed
+35 -29

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@
<ProductName>ColorControl</ProductName>
<PublisherName>Maassoft</PublisherName>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>3.2.0.0</ApplicationVersion>
<ApplicationVersion>3.2.1.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
+11 -11
View File
@@ -106,11 +106,11 @@
this.scLgController = new System.Windows.Forms.SplitContainer();
this.btnLgExpert = new System.Windows.Forms.Button();
this.mnuLgExpert = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnuLgExpertBacklight = new System.Windows.Forms.ToolStripMenuItem();
this.mnuLgOLEDMotionPro = new System.Windows.Forms.ToolStripMenuItem();
this.miLgEnableMotionPro = new System.Windows.Forms.ToolStripMenuItem();
this.miLgDisableMotionPro = new System.Windows.Forms.ToolStripMenuItem();
this.miLgExpertSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.mnuLgExpertBacklight = new System.Windows.Forms.ToolStripMenuItem();
this.chkLgRemoteControlShow = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.cbxLgDevices = new System.Windows.Forms.ComboBox();
@@ -994,23 +994,17 @@
this.miLgExpertSeparator1,
this.mnuLgExpertBacklight});
this.mnuLgExpert.Name = "mnuLgButtons";
this.mnuLgExpert.Size = new System.Drawing.Size(282, 76);
this.mnuLgExpert.Size = new System.Drawing.Size(321, 76);
this.mnuLgExpert.Opening += new System.ComponentModel.CancelEventHandler(this.mnuLgExpert_Opening);
//
// mnuLgExpertBacklight
//
this.mnuLgExpertBacklight.Name = "mnuLgExpertBacklight";
this.mnuLgExpertBacklight.Size = new System.Drawing.Size(281, 22);
this.mnuLgExpertBacklight.Text = "Backlight";
//
// mnuLgOLEDMotionPro
//
this.mnuLgOLEDMotionPro.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.miLgEnableMotionPro,
this.miLgDisableMotionPro});
this.mnuLgOLEDMotionPro.Name = "mnuLgOLEDMotionPro";
this.mnuLgOLEDMotionPro.Size = new System.Drawing.Size(281, 22);
this.mnuLgOLEDMotionPro.Text = "Activate OLED Motion Pro (B9/C9 only)";
this.mnuLgOLEDMotionPro.Size = new System.Drawing.Size(320, 22);
this.mnuLgOLEDMotionPro.Text = "Activate OLED Motion Pro (B9/C9/E9/W9 only)";
//
// miLgEnableMotionPro
//
@@ -1029,7 +1023,13 @@
// miLgExpertSeparator1
//
this.miLgExpertSeparator1.Name = "miLgExpertSeparator1";
this.miLgExpertSeparator1.Size = new System.Drawing.Size(278, 6);
this.miLgExpertSeparator1.Size = new System.Drawing.Size(317, 6);
//
// mnuLgExpertBacklight
//
this.mnuLgExpertBacklight.Name = "mnuLgExpertBacklight";
this.mnuLgExpertBacklight.Size = new System.Drawing.Size(320, 22);
this.mnuLgExpertBacklight.Text = "Backlight";
//
// chkLgRemoteControlShow
//
+21 -15
View File
@@ -1653,22 +1653,25 @@ namespace ColorControl
if (action.EnumType == null)
{
var values = MessageForms.ShowDialog("Enter value", new[] {
new MessageForms.FieldDefinition
{
Label = "Enter desired " + text,
FieldType = MessageForms.FieldType.Numeric,
MinValue = action.MinValue,
MaxValue = action.MaxValue
}
});
if (!values.Any())
if (action.MinValue != action.MaxValue)
{
return;
}
var values = MessageForms.ShowDialog("Enter value", new[] {
new MessageForms.FieldDefinition
{
Label = "Enter desired " + text,
FieldType = MessageForms.FieldType.Numeric,
MinValue = action.MinValue,
MaxValue = action.MaxValue
}
});
value = values.First();
if (!values.Any())
{
return;
}
value = values.First();
}
}
else
{
@@ -2496,7 +2499,10 @@ Do you want to continue?"
private void mnuLgExpert_Opening(object sender, CancelEventArgs e)
{
var device = _lgService.SelectedDevice;
var visible = device?.ModelName != null ? (device.ModelName.Contains("C9") || device.ModelName.Contains("B9")) : false;
var eligibleModels = new[] { "B9", "C9", "E9", "W9" };
var visible = device?.ModelName != null ? eligibleModels.Any(m => device.ModelName.Contains(m)) : false;
mnuLgOLEDMotionPro.Visible = visible;
miLgExpertSeparator1.Visible = visible;
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.2.0.0")]
[assembly: AssemblyFileVersion("3.2.0.0")]
[assembly: AssemblyVersion("3.2.1.0")]
[assembly: AssemblyFileVersion("3.2.1.0")]