From 557b5c76150b2f1fd8920e8528f113d79d51049d Mon Sep 17 00:00:00 2001 From: mandrolic Date: Tue, 25 Jan 2011 21:47:18 +0000 Subject: [PATCH] Configurator.Net: Added new indicator control that is purely drawn, rather than using a progress bar (Mono issues) Removed old controls based on the winforms progress bar Started adding some hacks to work around Mono binding bugs git-svn-id: https://arducopter.googlecode.com/svn/trunk@1558 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- .../ArducopterConfigurator.csproj | 17 +- .../PresentationModels/FlightDataMonitorVm.cs | 12 +- Configurator/Configurator.Net/Program.cs | 10 +- .../Configurator.Net/Test/MainVmTests.cs | 5 +- .../Views/FlightDataView.Designer.cs | 377 +++++++++++------- .../Configurator.Net/Views/FlightDataView.cs | 5 +- .../Views/TransmitterChannelsView.Designer.cs | 202 ++++++---- .../LinearIndicatorControl.Designer.cs | 44 ++ .../Views/controls/LinearIndicatorControl.cs | 345 ++++++++++++++++ .../controls/LinearSensorIndicatorControl.cs | 111 ------ .../LinearSensorIndicatorControl.resx | 126 ------ .../Views/controls/VerticalProgressBar.cs | 24 -- .../Configurator.Net/Views/mainForm.cs | 6 +- .../Configurator.Net/Views/mainForm.resx | 32 +- 14 files changed, 784 insertions(+), 532 deletions(-) create mode 100644 Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.cs delete mode 100644 Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.cs delete mode 100644 Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.resx delete mode 100644 Configurator/Configurator.Net/Views/controls/VerticalProgressBar.cs diff --git a/Configurator/Configurator.Net/ArducopterConfigurator.csproj b/Configurator/Configurator.Net/ArducopterConfigurator.csproj index 93d5e92769..c7814a3d1a 100644 --- a/Configurator/Configurator.Net/ArducopterConfigurator.csproj +++ b/Configurator/Configurator.Net/ArducopterConfigurator.csproj @@ -1,4 +1,4 @@ - + Debug @@ -49,6 +49,12 @@ + + UserControl + + + LinearIndicatorControl.cs + Form @@ -71,9 +77,6 @@ Resources.Designer.cs Designer - - LinearSensorIndicatorControl.cs - AcroConfigView.cs @@ -121,12 +124,6 @@ Settings.settings True - - Component - - - Component - UserControl diff --git a/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs b/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs index 53cea90686..38598dca48 100644 --- a/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs +++ b/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs @@ -48,16 +48,16 @@ namespace ArducopterConfigurator.PresentationModels } LoopTime = ints[0]; - GyroRoll = ints[1] + 500; - GyroPitch = ints[2] + 500; - GyroYaw = ints[3] + 500; + GyroRoll = ints[1]; + GyroPitch = ints[2]; + GyroYaw = ints[3]; MotorFront = ints[8]; MotorRear = ints[9]; MotorRight = ints[10]; MotorLeft = ints[11]; - AccelRoll = ints[12] + 500; - AccelPitch = ints[13] + 500; - AccelZ = ints[14] + 500; + AccelRoll = ints[12]; + AccelPitch = ints[13]; + AccelZ = ints[14]; } diff --git a/Configurator/Configurator.Net/Program.cs b/Configurator/Configurator.Net/Program.cs index f80f666f70..1e5fc8e2ae 100644 --- a/Configurator/Configurator.Net/Program.cs +++ b/Configurator/Configurator.Net/Program.cs @@ -7,6 +7,8 @@ namespace ArducopterConfigurator { static class Program { + public static bool IsMonoRuntime; + /// /// The main entry point for the application. /// @@ -16,12 +18,14 @@ namespace ArducopterConfigurator Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - //var session = new CommsSession(); - var session = new FakeCommsSession(); + var t = Type.GetType("Mono.Runtime"); + IsMonoRuntime = (t != null); + + var session = new CommsSession(); + //var session = new FakeCommsSession(); var mainVm = new MainVm(session); - Application.Run(new mainForm(mainVm)); } } diff --git a/Configurator/Configurator.Net/Test/MainVmTests.cs b/Configurator/Configurator.Net/Test/MainVmTests.cs index f8363889c3..52f22d7a5c 100644 --- a/Configurator/Configurator.Net/Test/MainVmTests.cs +++ b/Configurator/Configurator.Net/Test/MainVmTests.cs @@ -12,10 +12,11 @@ namespace ArducopterConfiguratorTest public event Action LineOfDataReceived; public string CommPort { get; set; } public List SentItems = new List(); + private bool _isConnected; public bool IsConnected { - get { throw new NotImplementedException(); } + get { return _isConnected; } } public IEnumerable ListCommPorts() @@ -30,11 +31,13 @@ namespace ArducopterConfiguratorTest public bool Connect() { + _isConnected = true; return true; } public bool DisConnect() { + _isConnected = false; return true; } diff --git a/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs b/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs index 5b1836fb2f..30df9a1b98 100644 --- a/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs +++ b/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs @@ -47,19 +47,19 @@ this.textBox6 = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); this.textBox7 = new System.Windows.Forms.TextBox(); - this.sensorRollGyro = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.sensorRollAcc = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.progressBar3 = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.verticalProgressBar8 = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.verticalProgressBar6 = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.sensorPitchGyro = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.verticalProgressBar4 = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.verticalProgressBar3 = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.verticalProgressBar2 = new ArducopterConfigurator.LinearSensorIndicatorControl(); - this.verticalProgressBar1 = new ArducopterConfigurator.LinearSensorIndicatorControl(); this.textBox8 = new System.Windows.Forms.TextBox(); this.textBox9 = new System.Windows.Forms.TextBox(); this.textBox10 = new System.Windows.Forms.TextBox(); + this.indicatorRollGyro = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.indicatorRollAccel = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl1 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl2 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl3 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl4 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl5 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl6 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl7 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl8 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); ((System.ComponentModel.ISupportInitialize)(this.FlightDataVmBindingSource)).BeginInit(); this.SuspendLayout(); // @@ -133,7 +133,7 @@ // textBox3 // this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "AccelRoll", true, System.Windows.Forms.DataSourceUpdateMode.Never, null, "N0")); - this.textBox3.Location = new System.Drawing.Point(124, 68); + this.textBox3.Location = new System.Drawing.Point(124, 78); this.textBox3.Name = "textBox3"; this.textBox3.ReadOnly = true; this.textBox3.Size = new System.Drawing.Size(47, 20); @@ -142,7 +142,7 @@ // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(9, 52); + this.label6.Location = new System.Drawing.Point(12, 62); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(57, 13); this.label6.TabIndex = 15; @@ -220,128 +220,6 @@ this.textBox7.Size = new System.Drawing.Size(47, 20); this.textBox7.TabIndex = 23; // - // sensorRollGyro - // - this.sensorRollGyro.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroRoll", true, System.Windows.Forms.DataSourceUpdateMode.Never)); - this.sensorRollGyro.Location = new System.Drawing.Point(12, 25); - this.sensorRollGyro.Maximum = 1000; - this.sensorRollGyro.Name = "sensorRollGyro"; - this.sensorRollGyro.Size = new System.Drawing.Size(100, 23); - this.sensorRollGyro.TabIndex = 9; - // - // sensorRollAcc - // - this.sensorRollAcc.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelRoll", true, System.Windows.Forms.DataSourceUpdateMode.Never)); - this.sensorRollAcc.Location = new System.Drawing.Point(12, 68); - this.sensorRollAcc.Maximum = 1000; - this.sensorRollAcc.Name = "sensorRollAcc"; - this.sensorRollAcc.Size = new System.Drawing.Size(100, 23); - this.sensorRollAcc.TabIndex = 14; - // - // progressBar3 - // - this.progressBar3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroYaw", true)); - this.progressBar3.Location = new System.Drawing.Point(234, 157); - this.progressBar3.Maximum = 1000; - this.progressBar3.Name = "progressBar3"; - this.progressBar3.Size = new System.Drawing.Size(100, 23); - this.progressBar3.TabIndex = 28; - // - // verticalProgressBar8 - // - this.verticalProgressBar8.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelZ", true, System.Windows.Forms.DataSourceUpdateMode.Never)); - this.verticalProgressBar8.IsVertical = true; - this.verticalProgressBar8.Location = new System.Drawing.Point(354, 21); - this.verticalProgressBar8.Maximum = 1000; - this.verticalProgressBar8.Name = "verticalProgressBar8"; - this.verticalProgressBar8.Size = new System.Drawing.Size(24, 82); - this.verticalProgressBar8.Step = 1; - this.verticalProgressBar8.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.verticalProgressBar8.TabIndex = 22; - this.verticalProgressBar8.Value = 500; - // - // verticalProgressBar6 - // - this.verticalProgressBar6.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelPitch", true, System.Windows.Forms.DataSourceUpdateMode.Never)); - this.verticalProgressBar6.IsVertical = true; - this.verticalProgressBar6.Location = new System.Drawing.Point(258, 21); - this.verticalProgressBar6.Maximum = 1000; - this.verticalProgressBar6.Name = "verticalProgressBar6"; - this.verticalProgressBar6.Size = new System.Drawing.Size(24, 82); - this.verticalProgressBar6.Step = 1; - this.verticalProgressBar6.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.verticalProgressBar6.TabIndex = 19; - this.verticalProgressBar6.Value = 500; - // - // sensorPitchGyro - // - this.sensorPitchGyro.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroPitch", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.sensorPitchGyro.IsVertical = true; - this.sensorPitchGyro.Location = new System.Drawing.Point(198, 21); - this.sensorPitchGyro.Maximum = 1000; - this.sensorPitchGyro.Name = "sensorPitchGyro"; - this.sensorPitchGyro.Size = new System.Drawing.Size(24, 82); - this.sensorPitchGyro.Step = 1; - this.sensorPitchGyro.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.sensorPitchGyro.TabIndex = 16; - this.sensorPitchGyro.Value = 500; - // - // verticalProgressBar4 - // - this.verticalProgressBar4.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorRight", true)); - this.verticalProgressBar4.IsVertical = true; - this.verticalProgressBar4.Location = new System.Drawing.Point(176, 157); - this.verticalProgressBar4.Maximum = 2000; - this.verticalProgressBar4.Minimum = 1000; - this.verticalProgressBar4.Name = "verticalProgressBar4"; - this.verticalProgressBar4.Size = new System.Drawing.Size(24, 84); - this.verticalProgressBar4.Step = 1; - this.verticalProgressBar4.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.verticalProgressBar4.TabIndex = 6; - this.verticalProgressBar4.Value = 1000; - // - // verticalProgressBar3 - // - this.verticalProgressBar3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorRear", true)); - this.verticalProgressBar3.IsVertical = true; - this.verticalProgressBar3.Location = new System.Drawing.Point(124, 157); - this.verticalProgressBar3.Maximum = 2000; - this.verticalProgressBar3.Minimum = 1000; - this.verticalProgressBar3.Name = "verticalProgressBar3"; - this.verticalProgressBar3.Size = new System.Drawing.Size(24, 84); - this.verticalProgressBar3.Step = 1; - this.verticalProgressBar3.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.verticalProgressBar3.TabIndex = 4; - this.verticalProgressBar3.Value = 1000; - // - // verticalProgressBar2 - // - this.verticalProgressBar2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorFront", true)); - this.verticalProgressBar2.IsVertical = true; - this.verticalProgressBar2.Location = new System.Drawing.Point(68, 157); - this.verticalProgressBar2.Maximum = 2000; - this.verticalProgressBar2.Minimum = 1000; - this.verticalProgressBar2.Name = "verticalProgressBar2"; - this.verticalProgressBar2.Size = new System.Drawing.Size(24, 84); - this.verticalProgressBar2.Step = 1; - this.verticalProgressBar2.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.verticalProgressBar2.TabIndex = 2; - this.verticalProgressBar2.Value = 1000; - // - // verticalProgressBar1 - // - this.verticalProgressBar1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorLeft", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.verticalProgressBar1.IsVertical = true; - this.verticalProgressBar1.Location = new System.Drawing.Point(12, 157); - this.verticalProgressBar1.Maximum = 2000; - this.verticalProgressBar1.Minimum = 1000; - this.verticalProgressBar1.Name = "verticalProgressBar1"; - this.verticalProgressBar1.Size = new System.Drawing.Size(24, 84); - this.verticalProgressBar1.Step = 1; - this.verticalProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.verticalProgressBar1.TabIndex = 0; - this.verticalProgressBar1.Value = 1000; - // // textBox8 // this.textBox8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "MotorFront", true)); @@ -369,40 +247,230 @@ this.textBox10.Size = new System.Drawing.Size(47, 20); this.textBox10.TabIndex = 31; // + // indicatorRollGyro + // + this.indicatorRollGyro.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.indicatorRollGyro.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.indicatorRollGyro.BarBorderColor = System.Drawing.Color.Maroon; + this.indicatorRollGyro.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.indicatorRollGyro.BarDividersCount = 20; + this.indicatorRollGyro.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.indicatorRollGyro.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroRoll", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + this.indicatorRollGyro.IsVertical = false; + this.indicatorRollGyro.Location = new System.Drawing.Point(12, 28); + this.indicatorRollGyro.Max = 500; + this.indicatorRollGyro.Min = -500; + this.indicatorRollGyro.Name = "indicatorRollGyro"; + this.indicatorRollGyro.Offset = 0; + this.indicatorRollGyro.Size = new System.Drawing.Size(109, 20); + this.indicatorRollGyro.TabIndex = 32; + this.indicatorRollGyro.Value = 100; + // + // indicatorRollAccel + // + this.indicatorRollAccel.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.indicatorRollAccel.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.indicatorRollAccel.BarBorderColor = System.Drawing.Color.Maroon; + this.indicatorRollAccel.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.indicatorRollAccel.BarDividersCount = 20; + this.indicatorRollAccel.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.indicatorRollAccel.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelRoll", true)); + this.indicatorRollAccel.IsVertical = false; + this.indicatorRollAccel.Location = new System.Drawing.Point(12, 78); + this.indicatorRollAccel.Max = 500; + this.indicatorRollAccel.Min = -500; + this.indicatorRollAccel.Name = "indicatorRollAccel"; + this.indicatorRollAccel.Offset = 0; + this.indicatorRollAccel.Size = new System.Drawing.Size(109, 20); + this.indicatorRollAccel.TabIndex = 33; + this.indicatorRollAccel.Value = 100; + // + // linearIndicatorControl1 + // + this.linearIndicatorControl1.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl1.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl1.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl1.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl1.BarDividersCount = 20; + this.linearIndicatorControl1.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroPitch", true)); + this.linearIndicatorControl1.IsVertical = true; + this.linearIndicatorControl1.Location = new System.Drawing.Point(199, 21); + this.linearIndicatorControl1.Max = 500; + this.linearIndicatorControl1.Min = -500; + this.linearIndicatorControl1.Name = "linearIndicatorControl1"; + this.linearIndicatorControl1.Offset = 0; + this.linearIndicatorControl1.Size = new System.Drawing.Size(20, 82); + this.linearIndicatorControl1.TabIndex = 34; + this.linearIndicatorControl1.Value = 100; + // + // linearIndicatorControl2 + // + this.linearIndicatorControl2.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl2.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl2.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl2.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl2.BarDividersCount = 20; + this.linearIndicatorControl2.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelPitch", true)); + this.linearIndicatorControl2.IsVertical = true; + this.linearIndicatorControl2.Location = new System.Drawing.Point(264, 21); + this.linearIndicatorControl2.Max = 500; + this.linearIndicatorControl2.Min = -500; + this.linearIndicatorControl2.Name = "linearIndicatorControl2"; + this.linearIndicatorControl2.Offset = 0; + this.linearIndicatorControl2.Size = new System.Drawing.Size(20, 82); + this.linearIndicatorControl2.TabIndex = 35; + this.linearIndicatorControl2.Value = 100; + // + // linearIndicatorControl3 + // + this.linearIndicatorControl3.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl3.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl3.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl3.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl3.BarDividersCount = 20; + this.linearIndicatorControl3.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorLeft", true)); + this.linearIndicatorControl3.IsVertical = true; + this.linearIndicatorControl3.Location = new System.Drawing.Point(15, 157); + this.linearIndicatorControl3.Max = 1000; + this.linearIndicatorControl3.Min = 0; + this.linearIndicatorControl3.Name = "linearIndicatorControl3"; + this.linearIndicatorControl3.Offset = 0; + this.linearIndicatorControl3.Size = new System.Drawing.Size(20, 84); + this.linearIndicatorControl3.TabIndex = 36; + this.linearIndicatorControl3.Value = 100; + // + // linearIndicatorControl4 + // + this.linearIndicatorControl4.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl4.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl4.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl4.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl4.BarDividersCount = 20; + this.linearIndicatorControl4.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl4.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorFront", true)); + this.linearIndicatorControl4.IsVertical = true; + this.linearIndicatorControl4.Location = new System.Drawing.Point(71, 157); + this.linearIndicatorControl4.Max = 1000; + this.linearIndicatorControl4.Min = 0; + this.linearIndicatorControl4.Name = "linearIndicatorControl4"; + this.linearIndicatorControl4.Offset = 0; + this.linearIndicatorControl4.Size = new System.Drawing.Size(20, 84); + this.linearIndicatorControl4.TabIndex = 37; + this.linearIndicatorControl4.Value = 100; + // + // linearIndicatorControl5 + // + this.linearIndicatorControl5.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl5.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl5.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl5.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl5.BarDividersCount = 20; + this.linearIndicatorControl5.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl5.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorRear", true)); + this.linearIndicatorControl5.IsVertical = true; + this.linearIndicatorControl5.Location = new System.Drawing.Point(124, 157); + this.linearIndicatorControl5.Max = 1000; + this.linearIndicatorControl5.Min = 0; + this.linearIndicatorControl5.Name = "linearIndicatorControl5"; + this.linearIndicatorControl5.Offset = 0; + this.linearIndicatorControl5.Size = new System.Drawing.Size(20, 84); + this.linearIndicatorControl5.TabIndex = 38; + this.linearIndicatorControl5.Value = 100; + // + // linearIndicatorControl6 + // + this.linearIndicatorControl6.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl6.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl6.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl6.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl6.BarDividersCount = 20; + this.linearIndicatorControl6.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl6.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorRear", true)); + this.linearIndicatorControl6.IsVertical = true; + this.linearIndicatorControl6.Location = new System.Drawing.Point(179, 157); + this.linearIndicatorControl6.Max = 1000; + this.linearIndicatorControl6.Min = 0; + this.linearIndicatorControl6.Name = "linearIndicatorControl6"; + this.linearIndicatorControl6.Offset = 0; + this.linearIndicatorControl6.Size = new System.Drawing.Size(20, 84); + this.linearIndicatorControl6.TabIndex = 39; + this.linearIndicatorControl6.Value = 100; + // + // linearIndicatorControl7 + // + this.linearIndicatorControl7.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl7.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl7.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl7.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl7.BarDividersCount = 20; + this.linearIndicatorControl7.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl7.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroYaw", true)); + this.linearIndicatorControl7.IsVertical = false; + this.linearIndicatorControl7.Location = new System.Drawing.Point(225, 157); + this.linearIndicatorControl7.Max = 500; + this.linearIndicatorControl7.Min = -500; + this.linearIndicatorControl7.Name = "linearIndicatorControl7"; + this.linearIndicatorControl7.Offset = 0; + this.linearIndicatorControl7.Size = new System.Drawing.Size(109, 20); + this.linearIndicatorControl7.TabIndex = 40; + this.linearIndicatorControl7.Value = 100; + // + // linearIndicatorControl8 + // + this.linearIndicatorControl8.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl8.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl8.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl8.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl8.BarDividersCount = 20; + this.linearIndicatorControl8.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl8.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelZ", true)); + this.linearIndicatorControl8.IsVertical = true; + this.linearIndicatorControl8.Location = new System.Drawing.Point(353, 21); + this.linearIndicatorControl8.Max = 500; + this.linearIndicatorControl8.Min = -500; + this.linearIndicatorControl8.Name = "linearIndicatorControl8"; + this.linearIndicatorControl8.Offset = 0; + this.linearIndicatorControl8.Size = new System.Drawing.Size(20, 82); + this.linearIndicatorControl8.TabIndex = 41; + this.linearIndicatorControl8.Value = 100; + // // FlightDataView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.linearIndicatorControl8); + this.Controls.Add(this.linearIndicatorControl7); + this.Controls.Add(this.linearIndicatorControl6); + this.Controls.Add(this.linearIndicatorControl5); + this.Controls.Add(this.linearIndicatorControl4); + this.Controls.Add(this.linearIndicatorControl3); + this.Controls.Add(this.linearIndicatorControl2); + this.Controls.Add(this.linearIndicatorControl1); + this.Controls.Add(this.indicatorRollAccel); + this.Controls.Add(this.indicatorRollGyro); this.Controls.Add(this.textBox10); this.Controls.Add(this.textBox9); this.Controls.Add(this.textBox8); - this.Controls.Add(this.progressBar3); this.Controls.Add(this.label9); this.Controls.Add(this.textBox6); this.Controls.Add(this.label10); this.Controls.Add(this.textBox7); - this.Controls.Add(this.verticalProgressBar8); this.Controls.Add(this.label8); this.Controls.Add(this.textBox5); - this.Controls.Add(this.verticalProgressBar6); this.Controls.Add(this.label7); this.Controls.Add(this.textBox4); - this.Controls.Add(this.sensorPitchGyro); this.Controls.Add(this.label6); - this.Controls.Add(this.sensorRollAcc); this.Controls.Add(this.textBox3); this.Controls.Add(this.textBox2); this.Controls.Add(this.label5); - this.Controls.Add(this.sensorRollGyro); this.Controls.Add(this.textBox1); this.Controls.Add(this.label4); - this.Controls.Add(this.verticalProgressBar4); this.Controls.Add(this.label3); - this.Controls.Add(this.verticalProgressBar3); this.Controls.Add(this.label2); - this.Controls.Add(this.verticalProgressBar2); this.Controls.Add(this.label1); - this.Controls.Add(this.verticalProgressBar1); this.DoubleBuffered = true; this.Name = "FlightDataView"; this.Size = new System.Drawing.Size(402, 275); @@ -416,17 +484,6 @@ private System.Windows.Forms.BindingSource FlightDataVmBindingSource; - private LinearSensorIndicatorControl sensorRollGyro; - private LinearSensorIndicatorControl verticalProgressBar1; - private LinearSensorIndicatorControl verticalProgressBar2; - private LinearSensorIndicatorControl verticalProgressBar3; - private LinearSensorIndicatorControl verticalProgressBar4; - private LinearSensorIndicatorControl sensorPitchGyro; - private LinearSensorIndicatorControl verticalProgressBar6; - private LinearSensorIndicatorControl verticalProgressBar8; - private LinearSensorIndicatorControl sensorRollAcc; - private LinearSensorIndicatorControl progressBar3; - private System.Windows.Forms.Label label1; @@ -449,5 +506,15 @@ private System.Windows.Forms.TextBox textBox8; private System.Windows.Forms.TextBox textBox9; private System.Windows.Forms.TextBox textBox10; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl indicatorRollGyro; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl indicatorRollAccel; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl1; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl2; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl3; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl4; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl5; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl6; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl7; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl8; } } diff --git a/Configurator/Configurator.Net/Views/FlightDataView.cs b/Configurator/Configurator.Net/Views/FlightDataView.cs index 17a9830df6..54fba3c94e 100644 --- a/Configurator/Configurator.Net/Views/FlightDataView.cs +++ b/Configurator/Configurator.Net/Views/FlightDataView.cs @@ -20,9 +20,10 @@ namespace ArducopterConfigurator.views public override void SetDataContext(FlightDataVm model) { FlightDataVmBindingSource.DataSource = model; - } - + if (Program.IsMonoRuntime) + model.PropertyChanged += ((sender, e) => FlightDataVmBindingSource.ResetBindings(false)); + } } // Required for VS2008 designer. No functional value public class FlightDataViewDesignable : ViewCommon { } diff --git a/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs b/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs index 8e1534892f..0b0c9499cd 100644 --- a/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs +++ b/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs @@ -31,10 +31,9 @@ this.components = new System.ComponentModel.Container(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); - this.progressBar3 = new System.Windows.Forms.ProgressBar(); + this.TransmitterChannelsBindingSource = new System.Windows.Forms.BindingSource(this.components); this.label9 = new System.Windows.Forms.Label(); this.textBox6 = new System.Windows.Forms.TextBox(); - this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.label3 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); @@ -43,11 +42,12 @@ this.label4 = new System.Windows.Forms.Label(); this.textBox5 = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); - this.TransmitterChannelsBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.verticalProgressBar4 = new ArducopterConfigurator.VerticalProgressBar(); - this.verticalProgressBar3 = new ArducopterConfigurator.VerticalProgressBar(); - this.verticalProgressBar2 = new ArducopterConfigurator.VerticalProgressBar(); - this.verticalProgressBar1 = new ArducopterConfigurator.VerticalProgressBar(); + this.linearIndicatorControl3 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl1 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl2 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl4 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl5 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); + this.linearIndicatorControl6 = new ArducopterConfigurator.Views.controls.LinearIndicatorControl(); ((System.ComponentModel.ISupportInitialize)(this.TransmitterChannelsBindingSource)).BeginInit(); this.SuspendLayout(); // @@ -69,16 +69,9 @@ this.label2.TabIndex = 3; this.label2.Text = "Pitch"; // - // progressBar3 + // TransmitterChannelsBindingSource // - this.progressBar3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Yaw", true)); - this.progressBar3.Location = new System.Drawing.Point(174, 30); - this.progressBar3.Maximum = 2000; - this.progressBar3.Minimum = 1000; - this.progressBar3.Name = "progressBar3"; - this.progressBar3.Size = new System.Drawing.Size(100, 23); - this.progressBar3.TabIndex = 31; - this.progressBar3.Value = 1000; + this.TransmitterChannelsBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.TransmitterChannelsVm); // // label9 // @@ -98,17 +91,6 @@ this.textBox6.Size = new System.Drawing.Size(47, 20); this.textBox6.TabIndex = 29; // - // progressBar1 - // - this.progressBar1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Roll", true)); - this.progressBar1.Location = new System.Drawing.Point(174, 80); - this.progressBar1.Maximum = 2000; - this.progressBar1.Minimum = 1000; - this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(100, 23); - this.progressBar1.TabIndex = 34; - this.progressBar1.Value = 1000; - // // label3 // this.label3.AutoSize = true; @@ -181,76 +163,142 @@ this.label5.TabIndex = 41; this.label5.Text = "Aux"; // - // TransmitterChannelsBindingSource + // linearIndicatorControl3 // - this.TransmitterChannelsBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.TransmitterChannelsVm); + this.linearIndicatorControl3.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl3.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl3.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl3.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl3.BarDividersCount = 20; + this.linearIndicatorControl3.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Throttle", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + this.linearIndicatorControl3.IsVertical = true; + this.linearIndicatorControl3.Location = new System.Drawing.Point(16, 30); + this.linearIndicatorControl3.Max = 2000; + this.linearIndicatorControl3.Min = 1000; + this.linearIndicatorControl3.Name = "linearIndicatorControl3"; + this.linearIndicatorControl3.Offset = 0; + this.linearIndicatorControl3.Size = new System.Drawing.Size(20, 111); + this.linearIndicatorControl3.TabIndex = 43; + this.linearIndicatorControl3.Value = 1000; // - // verticalProgressBar4 + // linearIndicatorControl1 // - this.verticalProgressBar4.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Aux", true)); - this.verticalProgressBar4.Location = new System.Drawing.Point(205, 131); - this.verticalProgressBar4.Maximum = 2000; - this.verticalProgressBar4.Minimum = 1000; - this.verticalProgressBar4.Name = "verticalProgressBar4"; - this.verticalProgressBar4.Size = new System.Drawing.Size(27, 73); - this.verticalProgressBar4.TabIndex = 40; - this.verticalProgressBar4.Value = 1000; + this.linearIndicatorControl1.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl1.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl1.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl1.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl1.BarDividersCount = 20; + this.linearIndicatorControl1.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Pitch", true)); + this.linearIndicatorControl1.IsVertical = true; + this.linearIndicatorControl1.Location = new System.Drawing.Point(67, 30); + this.linearIndicatorControl1.Max = 2000; + this.linearIndicatorControl1.Min = 1000; + this.linearIndicatorControl1.Name = "linearIndicatorControl1"; + this.linearIndicatorControl1.Offset = 0; + this.linearIndicatorControl1.Size = new System.Drawing.Size(20, 111); + this.linearIndicatorControl1.TabIndex = 44; + this.linearIndicatorControl1.Value = 1000; // - // verticalProgressBar3 + // linearIndicatorControl2 // - this.verticalProgressBar3.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Mode", true)); - this.verticalProgressBar3.Location = new System.Drawing.Point(145, 131); - this.verticalProgressBar3.Maximum = 2000; - this.verticalProgressBar3.Minimum = 1000; - this.verticalProgressBar3.Name = "verticalProgressBar3"; - this.verticalProgressBar3.Size = new System.Drawing.Size(27, 73); - this.verticalProgressBar3.TabIndex = 37; - this.verticalProgressBar3.Value = 1000; + this.linearIndicatorControl2.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl2.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl2.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl2.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl2.BarDividersCount = 20; + this.linearIndicatorControl2.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Mode", true)); + this.linearIndicatorControl2.IsVertical = true; + this.linearIndicatorControl2.Location = new System.Drawing.Point(155, 131); + this.linearIndicatorControl2.Max = 2000; + this.linearIndicatorControl2.Min = 1000; + this.linearIndicatorControl2.Name = "linearIndicatorControl2"; + this.linearIndicatorControl2.Offset = 0; + this.linearIndicatorControl2.Size = new System.Drawing.Size(20, 73); + this.linearIndicatorControl2.TabIndex = 45; + this.linearIndicatorControl2.Value = 1000; // - // verticalProgressBar2 + // linearIndicatorControl4 // - this.verticalProgressBar2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Pitch", true)); - this.verticalProgressBar2.Location = new System.Drawing.Point(67, 30); - this.verticalProgressBar2.Maximum = 2000; - this.verticalProgressBar2.Minimum = 1000; - this.verticalProgressBar2.Name = "verticalProgressBar2"; - this.verticalProgressBar2.Size = new System.Drawing.Size(27, 111); - this.verticalProgressBar2.TabIndex = 2; - this.verticalProgressBar2.Value = 1000; + this.linearIndicatorControl4.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl4.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl4.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl4.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl4.BarDividersCount = 20; + this.linearIndicatorControl4.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl4.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Aux", true)); + this.linearIndicatorControl4.IsVertical = true; + this.linearIndicatorControl4.Location = new System.Drawing.Point(206, 131); + this.linearIndicatorControl4.Max = 2000; + this.linearIndicatorControl4.Min = 1000; + this.linearIndicatorControl4.Name = "linearIndicatorControl4"; + this.linearIndicatorControl4.Offset = 0; + this.linearIndicatorControl4.Size = new System.Drawing.Size(20, 73); + this.linearIndicatorControl4.TabIndex = 46; + this.linearIndicatorControl4.Value = 1000; // - // verticalProgressBar1 + // linearIndicatorControl5 // - this.verticalProgressBar1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Throttle", true)); - this.verticalProgressBar1.Location = new System.Drawing.Point(15, 30); - this.verticalProgressBar1.Maximum = 2000; - this.verticalProgressBar1.Minimum = 1000; - this.verticalProgressBar1.Name = "verticalProgressBar1"; - this.verticalProgressBar1.Size = new System.Drawing.Size(27, 111); - this.verticalProgressBar1.TabIndex = 0; - this.verticalProgressBar1.Value = 1000; + this.linearIndicatorControl5.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl5.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl5.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl5.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl5.BarDividersCount = 20; + this.linearIndicatorControl5.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl5.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Roll", true)); + this.linearIndicatorControl5.IsVertical = false; + this.linearIndicatorControl5.Location = new System.Drawing.Point(174, 80); + this.linearIndicatorControl5.Max = 2000; + this.linearIndicatorControl5.Min = 1000; + this.linearIndicatorControl5.Name = "linearIndicatorControl5"; + this.linearIndicatorControl5.Offset = 0; + this.linearIndicatorControl5.Size = new System.Drawing.Size(100, 20); + this.linearIndicatorControl5.TabIndex = 47; + this.linearIndicatorControl5.Value = 1000; + // + // linearIndicatorControl6 + // + this.linearIndicatorControl6.BarBackgroundDark = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(200)))), ((int)(((byte)(201))))); + this.linearIndicatorControl6.BarBackgroundLight = System.Drawing.Color.WhiteSmoke; + this.linearIndicatorControl6.BarBorderColor = System.Drawing.Color.Maroon; + this.linearIndicatorControl6.BarDark = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(68)))), ((int)(((byte)(202))))); + this.linearIndicatorControl6.BarDividersCount = 20; + this.linearIndicatorControl6.BarLight = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(144)))), ((int)(((byte)(252))))); + this.linearIndicatorControl6.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.TransmitterChannelsBindingSource, "Yaw", true)); + this.linearIndicatorControl6.IsVertical = false; + this.linearIndicatorControl6.Location = new System.Drawing.Point(174, 30); + this.linearIndicatorControl6.Max = 2000; + this.linearIndicatorControl6.Min = 1000; + this.linearIndicatorControl6.Name = "linearIndicatorControl6"; + this.linearIndicatorControl6.Offset = 0; + this.linearIndicatorControl6.Size = new System.Drawing.Size(100, 20); + this.linearIndicatorControl6.TabIndex = 48; + this.linearIndicatorControl6.Value = 1000; // // TransmitterChannelsView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.linearIndicatorControl6); + this.Controls.Add(this.linearIndicatorControl5); + this.Controls.Add(this.linearIndicatorControl4); + this.Controls.Add(this.linearIndicatorControl2); + this.Controls.Add(this.linearIndicatorControl1); + this.Controls.Add(this.linearIndicatorControl3); this.Controls.Add(this.textBox5); this.Controls.Add(this.label5); - this.Controls.Add(this.verticalProgressBar4); this.Controls.Add(this.textBox4); this.Controls.Add(this.label4); - this.Controls.Add(this.verticalProgressBar3); this.Controls.Add(this.textBox3); this.Controls.Add(this.textBox2); - this.Controls.Add(this.progressBar1); this.Controls.Add(this.label3); this.Controls.Add(this.textBox1); - this.Controls.Add(this.progressBar3); this.Controls.Add(this.label9); this.Controls.Add(this.textBox6); this.Controls.Add(this.label2); - this.Controls.Add(this.verticalProgressBar2); this.Controls.Add(this.label1); - this.Controls.Add(this.verticalProgressBar1); this.Name = "TransmitterChannelsView"; this.Size = new System.Drawing.Size(369, 244); ((System.ComponentModel.ISupportInitialize)(this.TransmitterChannelsBindingSource)).EndInit(); @@ -261,24 +309,24 @@ #endregion - private VerticalProgressBar verticalProgressBar1; private System.Windows.Forms.BindingSource TransmitterChannelsBindingSource; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; - private VerticalProgressBar verticalProgressBar2; - private System.Windows.Forms.ProgressBar progressBar3; private System.Windows.Forms.Label label9; private System.Windows.Forms.TextBox textBox6; - private System.Windows.Forms.ProgressBar progressBar1; private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.Label label4; - private VerticalProgressBar verticalProgressBar3; private System.Windows.Forms.TextBox textBox5; private System.Windows.Forms.Label label5; - private VerticalProgressBar verticalProgressBar4; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl3; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl1; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl2; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl4; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl5; + private ArducopterConfigurator.Views.controls.LinearIndicatorControl linearIndicatorControl6; } } diff --git a/Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.Designer.cs b/Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.Designer.cs new file mode 100644 index 0000000000..7c8d626810 --- /dev/null +++ b/Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.Designer.cs @@ -0,0 +1,44 @@ +namespace ArducopterConfigurator.Views.controls +{ + partial class LinearIndicatorControl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // UserControl1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Name = "UserControl1"; + this.Size = new System.Drawing.Size(422, 50); + this.ResumeLayout(false); + } + + #endregion + } +} diff --git a/Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.cs b/Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.cs new file mode 100644 index 0000000000..39674a6f3c --- /dev/null +++ b/Configurator/Configurator.Net/Views/controls/LinearIndicatorControl.cs @@ -0,0 +1,345 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Text; +using System.Windows.Forms; + +/* + * Starting point for this control: + * http://www.codeproject.com/KB/progress/iTunes_Bar.aspx + * + */ +namespace ArducopterConfigurator.Views.controls +{ + /// + /// + [ToolboxBitmap(typeof(System.Windows.Forms.ProgressBar))] + public partial class LinearIndicatorControl : UserControl + { + /// + /// This enum represents the diffrent states the control can take. + /// Animation for ex. makes the procent bar "Rubber band" to the new procent value + /// + public enum BarType + { + Static, // Plain and simple bar with procent display + Progressbar, // This makes the control act as a progressbar + Animated // This makes the control "Rubber band" to new procent values (Animated). + }; + + + #region Static Members + public static readonly Color PreBarBaseDark = Color.FromArgb(199, 200, 201); + public static readonly Color PreBarBaseLight = Color.WhiteSmoke; + public static readonly Color PreBarLight = Color.FromArgb(102, 144, 252); + public static readonly Color PreBarDark = Color.FromArgb(40, 68, 202); + public static readonly Color PreBorderColor = Color.DarkGray; + #endregion + + #region Private Members + /// + /// The Light background color + /// + private Color _barBgLightColour = PreBarBaseLight; + + /// + /// The Dark background color + /// + private Color _barBgDarkColor = PreBarBaseDark; + + /// + /// The Light bar color + /// + private Color _barLightColour = PreBarLight; + + /// + /// The Dark bar color + /// + private Color _barDarkColour = PreBarDark; + + /// + /// The Border color for the control + /// + private Color _borderColor = PreBorderColor; + + /// + /// The border width + /// + private float _borderWidth = 1.0F; + + private int _min = 0; + private int _max = 100; + private int _val = 50; + private int _offset = 0; + + /// + /// The number of dividers to draw in the bar + /// + private int iNumDividers = 10; + + private bool _isVertical = false; + + #endregion + + + public LinearIndicatorControl() + { + SetStyle(ControlStyles.OptimizedDoubleBuffer | + ControlStyles.AllPaintingInWmPaint | + ControlStyles.UserPaint | + ControlStyles.ResizeRedraw, true); + + InitializeComponent(); + this.Width = 300; + this.Height = 50; + } + + + /// + /// Raises the event. + /// + /// A that contains the event data. + protected override void OnPaint(PaintEventArgs e) + { + var g = e.Graphics; + g.SmoothingMode = SmoothingMode.AntiAlias; + g.Clear(BackColor); + + var bmp = GenerateProcentBarBitmap(Width, Height, BackColor); + g.DrawImage(bmp, 0, 0); + } + + + // Generate the bar image on graphics g + // g is the graphics of the whole control + private void GenerateBar(Graphics g, float x, float y, float width, float height, bool isVertical) + { + float totalWidth = width; + + var rect = new RectangleF(x, y, width, height); + + // Fill the background + using (var white = new LinearGradientBrush(rect, _barBgLightColour, _barBgDarkColor, isVertical ? 0 : 90.0F, false)) + g.FillRectangle(white, rect); + + // Border around the whole thing + using (Pen p = new Pen(_borderColor, _borderWidth * 2)) + { + p.Alignment = PenAlignment.Outset; + p.LineJoin = LineJoin.Round; + g.DrawRectangle(p, x, y, width, height); + } + + // Now do the progress bar that represents the value + var barSize = (float)Math.Abs(_val - _offset) / (_max - _min) * (isVertical ? height : width); + var barStart = (float)(Math.Min(_offset, _val) - _min) / (_max - _min) * (isVertical ? height : width); + + + if (barSize > 0.10F) + { + rect = isVertical + ? new RectangleF(x, y + height - ( barStart + barSize), width, barSize) + : new RectangleF(x + barStart, y, barSize, height); + + using (var bg = new LinearGradientBrush(rect, _barLightColour, _barDarkColour, isVertical ? 0 : 90.0F, false)) + g.FillRectangle(bg, rect); + + using (Pen p = new Pen(_borderColor, _borderWidth)) + { + p.Alignment = PenAlignment.Inset; + p.LineJoin = LineJoin.Round; + g.DrawLine(p, width, y, width, height); + } + } + +// using (Pen p = new Pen(_barDarkColour, _borderWidth)) +// { +// p.Alignment = PenAlignment.Inset; +// p.LineJoin = LineJoin.Round; +// using (Pen p2 = new Pen(_barLightColour, _borderWidth)) +// { +// p2.Alignment = PenAlignment.Inset; +// p2.LineJoin = LineJoin.Round; +// +// float procentMarkerWidth = (width / iNumDividers); +// +// for (float i = procentMarkerWidth; i < totalWidth; i += procentMarkerWidth) +// { +// if (i >= width) +// { +// p.Color = _barBgLightColour; +// p2.Color = _barBgDarkColor; +// } +// +// g.DrawLine(p, i, 0, i, height); +// g.DrawLine(p2, i + _borderWidth, 0, i + _borderWidth, height); +// +// } +// } +// } + } + + + private Bitmap GenerateProcentBarBitmap(int width, int height,Color bgColor) + { + var theImage = new Bitmap(width, height); + + using (var g = Graphics.FromImage(theImage)) + { + g.SmoothingMode = SmoothingMode.AntiAlias; + g.Clear(bgColor); + + //int height1 = height - (height / 3); + int height1 = height; + var bmp1 = new Bitmap(width, height1); + var g1 = Graphics.FromImage(bmp1); + + GenerateBar(g1, 0.0F, 0.0F, width, height1, _isVertical); + g1.Dispose(); + + var bmp = bmp1; + + g.DrawImage(bmp, 0, 0); + g.Dispose(); + + bmp.Dispose(); + } + return theImage; + } + + /// + /// Gets or sets the number of bar dividers to display. + /// + /// The num bar dividers. + [System.ComponentModel.Description("Gets or sets how many dividers to display on the bar")] + [System.ComponentModel.DefaultValue(10)] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public int BarDividersCount + { + get { return iNumDividers; } + set { iNumDividers = value; Refresh(); } + } + + + + /// + /// Gets or sets the width of the border. + /// + /// The width of the border. + [System.ComponentModel.Description("Gets or sets the with of the borders")] + [System.ComponentModel.DefaultValue(1.0f)] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public float BarBorderWidth + { + get { return _borderWidth; } + set { _borderWidth = value; Refresh(); } + } + + /// + /// Gets or sets the bar background light. + /// + /// The bar background light. + [System.ComponentModel.Description("Gets or sets the lighter background color")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public Color BarBackgroundLight + { + get { return _barBgLightColour; } + set { _barBgLightColour = value; Refresh(); } + } + + /// + /// Gets or sets the bar background dark. + /// + /// The bar background dark. + [System.ComponentModel.Description("Gets or sets the darker background color")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public Color BarBackgroundDark + { + get { return _barBgDarkColor; } + set { _barBgDarkColor = value; Refresh(); } + } + + /// + /// Gets or sets the bar light. + /// + /// The bar light. + [System.ComponentModel.Description("Gets or sets the light bar color")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public Color BarLight + { + get { return _barLightColour; } + set { _barLightColour = value; Refresh(); } + } + + /// + /// Gets or sets the bar dark. + /// + /// The bar dark. + [System.ComponentModel.Description("Gets or sets the dark bar color")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public Color BarDark + { + get { return _barDarkColour; } + set { _barDarkColour = value; Refresh(); } + } + + /// + /// Gets or sets the color of the border. + /// + /// The color of the border. + [System.ComponentModel.Description("Gets or sets the border color")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public Color BarBorderColor + { + get { return _borderColor; } + set { _borderColor = value; Refresh(); } + } + + + [System.ComponentModel.Description("Gets or sets the Minimum Value")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public int Min + { + get { return _min; } + set { _min = value; Refresh(); } + } + + [System.ComponentModel.Description("Gets or sets the Minimum Value")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public int Max + { + get { return _max; } + set { _max = value; Refresh(); } + } + + [System.ComponentModel.Description("Gets or sets the Offset Value")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public int Offset + { + get { return _offset; } + set { _offset = value; Refresh(); } + } + + + [System.ComponentModel.Description("Gets or sets the Value")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public int Value + { + get { return _val; } + set { _val = value; Refresh(); } + } + + [System.ComponentModel.Description("Gets or sets whether the indicator is vertical")] + [System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)] + public bool IsVertical + { + get { return _isVertical; } + set { _isVertical = value; Refresh(); } + } + + } +} diff --git a/Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.cs b/Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.cs deleted file mode 100644 index a21b0d52dd..0000000000 --- a/Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; - -namespace ArducopterConfigurator -{ - /// - /// This is a custom tweaking of the standard Progress bar - /// - [ToolboxBitmap(typeof(ProgressBar))] - public class LinearSensorIndicatorControl : ProgressBar - { - private bool m_IsVertical; - - protected override CreateParams CreateParams - { - get - { - CreateParams cp = base.CreateParams; - if (m_IsVertical) - cp.Style |= 0x04; - return cp; - } - } - - public new int Value { - get - { - return base.Value; - } - set - { - if (value Maximum) - { - // don't do it - value = Maximum; - } - base.Value = value; - } - } - - public new int Maximum - { - get - { - return base.Maximum; - } - set - { - base.Maximum = value; - } - } - - - public new int Minimum - { - get - { - return base.Minimum ; - } - set - { - base.Minimum = value; - } - } - - - [Description("Whether the display grows vertically")] - [Category("LinearSensorIndicatorControl")] - [DefaultValue(false)] - [RefreshProperties(RefreshProperties.All)] - public bool IsVertical - { - get - { - return m_IsVertical; - } - set - { - m_IsVertical = value; - Invalidate(); - } - } - - -// [Description("An offset that will be added to every value applied")] -// [Category("LinearSensorIndicatorControl")] -// [DefaultValue(0)] -// [RefreshProperties(RefreshProperties.All)] -// public int Offset -// { -// get -// { -// return m_Offset; -// } -// set -// { -// m_Offset = value; -// Invalidate(); -// } -// } - - - - } -} \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.resx b/Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.resx deleted file mode 100644 index 3db1fb2c17..0000000000 --- a/Configurator/Configurator.Net/Views/controls/LinearSensorIndicatorControl.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - False - - \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/controls/VerticalProgressBar.cs b/Configurator/Configurator.Net/Views/controls/VerticalProgressBar.cs deleted file mode 100644 index cf1549a3c3..0000000000 --- a/Configurator/Configurator.Net/Views/controls/VerticalProgressBar.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; - -namespace ArducopterConfigurator -{ - [Description("Vertical Progress Bar")] - [ToolboxBitmap(typeof(ProgressBar))] - public class VerticalProgressBar : ProgressBar - { - protected override CreateParams CreateParams - { - get - { - CreateParams cp = base.CreateParams; - cp.Style |= 0x04; - return cp; - } - } - - - - } -} \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/mainForm.cs b/Configurator/Configurator.Net/Views/mainForm.cs index 7e33681334..99d2474a22 100644 --- a/Configurator/Configurator.Net/Views/mainForm.cs +++ b/Configurator/Configurator.Net/Views/mainForm.cs @@ -95,7 +95,6 @@ namespace ArducopterConfigurator mainVmBindingSource.DataSource = model; availablePortsBindingSource.DataSource = model.AvailablePorts; - foreach (var monitorVm in _vm.MonitorVms) { var tp = new TabPage(monitorVm.Name) {Tag = monitorVm}; @@ -114,6 +113,10 @@ namespace ArducopterConfigurator UpdateConnectionStatusLabel(); _vm.PropertyChanged += ((sender, e) => UpdateConnectionStatusLabel()); + // hack for INPC subscribe bug in Mono + if (Program.IsMonoRuntime) + model.PropertyChanged += ((sender, e) => mainVmBindingSource.ResetBindings(false)); + } public Control Control @@ -125,6 +128,7 @@ namespace ArducopterConfigurator private void tabCtrlConfigs_Selected(object sender, TabControlEventArgs e) { + Console.WriteLine("Tab click"); var control = e.TabPage.Controls[0]; control.Size = e.TabPage.ClientRectangle.Size; var tabVm = e.TabPage.Tag as MonitorVm; diff --git a/Configurator/Configurator.Net/Views/mainForm.resx b/Configurator/Configurator.Net/Views/mainForm.resx index 51511c0e03..a1dbb499ef 100644 --- a/Configurator/Configurator.Net/Views/mainForm.resx +++ b/Configurator/Configurator.Net/Views/mainForm.resx @@ -127,18 +127,18 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOwAAA - DsABataJCQAAAl5JREFUOE+Vk91PkmEYxnFtbWxmbdGsbG3O3Go2a2vDLyRNQpSGmJCAKaJimRCigoAF - goRuhVnqCyTx4jA0P1plZWQurWgeuJV9HXTWQf9F2xUvB+/G4CCe7bfdB8993dd97XkyGGkeW1giABhd - GRmMkF2xtJRWuykoEllDEnz4Po+HETPMQXFXSgGjh8/u89aQ/b4aUMRqotdXLTL5RdjYmcX7bw+w+TWI - gekLSCmgHa8kn0Un8OtPNI7/lQX6ST7WtgN4vX0XM2s96CcE0N6rTHRgW5Du1k3ygpPLeqxs3UEgoomz - /mUamztzePLRiannHdC4z0I9UqJLmE6FY59rRGh9CK32M7AHxbj/VEnjX70O92ITOpxFaLGeTmyWLkh3 - WUhxbLcwfvxehf+FGTJTAYweHlxz9TTupSa4SBUuGU5MJO3eS1THAvLGrA/j088Qppb7UK/Lg2asGJYA - j2b2rQ0ibe7fJIFrbi7C7ww065+9GAt3o/ZKDtpchdARxXF6PKUQqA8lp9/mZBNmby18LztpVrbcGCXV - qFKyoBjKR+d4IWQ3j6GyZT+Z5EBuKRhUO0swOi/B7cVGmscbDjh8zeDKsyDUHgRHlkmWy7PYCQIXe/MG - VVY2VqJTGH5UB4OnAtYZAQ0ZGYBxvA4Vzft8SZNrrx42KIyFWNx0wxzgo33kFIRdR6C4cRx6b2kcpeMk - lQWR8tXx27Mx++ZWLJwyKGz54KkOUHDOKVlEVSsLFFR9/nJ2bkqBcvkeg7A7Bw2mo+Aq9qJMnslJ64dR - l4skTFFJA5MsljATw/kPpX+3FV/8pJwsRgAAAABJRU5ErkJggg== + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOvAAA + DrwBlbxySQAAAllJREFUOE+Vk91PkmEYxtna2tzM2qJZ2dqcudVs1NaGX0iShKgNMV8TMEVULBNCVBCw + QJDUrTBKfAElXpyIptkyKzNjSWXzwK3s66CzDvov2q6Ag3djcBDP9ttzn9zXfd3XnofBSPNYQoTQPEes + RG8izVYGwxAQicyzBD58X8CjdSOMAXFXShG9W8Du81RR/d4qxIjWZK+3UmTwibC5G8T7b1OIfA1gYPoS + UgqonTxqZWsCv/5sxfG9MkHrEmBjx4/XO/cxs9GDflII9QNeogPLYsNejYsfcC1rsbp9D/51VZzwl2lE + dufx9KMdk887oHKch3K0WJMwPRaOdb4Rs+EhtFrPwRoQ4+EzOY1v7SYcS03osBeixXw2sblhsWGPiRJH + dwvhx+81+F4YITEUQO/mY2S+jsbxpAkjlAJXdKcmknbvJSujAXmi1ofx6ecsJpf7UKfJg2q8CCY/nyb4 + 1gKROvdvksANBxehdzqa8GcPxkPdqL6Wg7YRFjRkUZwedwmEyiPJ6bfZ2aTRUw3vy06a1W0HxiglKuRM + yIby0elkQXL7BHgtB6kkB1JTwaDSXoyxBQJ3lxppHm/aYPM2gyvNQo36MDiSTKpMmsVOELjcmzeoMLOx + ujWJ4bla6NzlMM8Iaaj1AeidtShvPuBNmlx9/ahOpmdhKeKA0S9A++gZ1HQdg+zWSWg9JXHkttOxLMiU + r07Qno3gmzvRcEohs+SDrzgUg3NBziQrWpmIEasvXs3OTSlQJt2nq+nOQb3hOLiy/SiVZnLS/mWFRIao + uD6DKiIyEsP5D6V/yZResf187DwAAAAASUVORK5CYII= @@ -147,8 +147,8 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOwAAA - DsABataJCQAAAmhJREFUOE+Vk21IU1EYxwdBYG479567uzvdSzMTIbEUwpAWmAoVNjHMDKoPYVSKlBbL + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOvAAA + DrwBlbxySQAAAmhJREFUOE+Vk21IU1EYxwdBYG479567uzvdSzMTIbEUwpAWmAoVNjHMDKoPYVSKlBbL SsgKsQ81NV1LGjLaqJmgNm/zhd6gCDOyPqS1jDLJXuxT0Nfg37nTLr0sqQs/zoFznx/P+T8cjeY/vxvi ko0RKTE8YNJuXbBUlvQ5slHrl406KPQbdV62FkcsFNNnajG62QFZ1Fb+VdLLil8e24uvEV+MsR1FCLPi qaYafD5VhneN+xBO5hBXcE3UV46UbcCHhnK83Z0VY7a5CjOeE5ipcyJaloE+qwDlv7iCbo1mcUjiMJqX @@ -164,8 +164,8 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOvwAA - Dr8BOAVTJAAAAtVJREFUOE9jYKAaiN/PweB3RIohcL8MGIPYIDFigVbd+cTIeXfuxS+5+yQWiCPn3X4o + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAOvAAA + DrwBlbxySQAAAtVJREFUOE9jYKAaiN/PweB3RIohcL8MGIPYIDFigVbd+cTIeXfuxS+5+yQWiCPn3X4o X3Y2EaRfMOOojkbN2XKprCMGOM2TyDoakrfm3tcZ59/+nw7EnQef/dGqPJnKELhTLHzGtcNzT77+X7Hh wQXdsuOeDAz1TKgGWazktG87M6dx95P/vcde/u8/8ep/4Zo772Sz9tsw+K8X8Oo9N7Nr18PP666+/1+z 8d5VsDgykEvZ4ZO/6taHroPP/sfOvHSvZM3tL7EzLt5hcFsuC1ZnPJNLJWtvYenqGx/mnnr1P3jCme0M