From 3f9a077dbd4e953b9033508a9b78b3bd9486431e Mon Sep 17 00:00:00 2001 From: mandrolic Date: Sat, 18 Dec 2010 22:23:09 +0000 Subject: [PATCH] Configurator.Net: Initial import git-svn-id: https://arducopter.googlecode.com/svn/trunk@1153 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- .../ArducopterConfigurator.csproj | 198 ++++++++ .../ArducopterConfigurator.sln | 20 + Configurator/Configurator.Net/CommsSession.cs | 106 +++++ .../Core/IPresentationModel.cs | 7 + Configurator/Configurator.Net/Core/IView.cs | 10 + .../NotifyProperyChangedBase.cs | 31 ++ .../PresentationModels/AcroModeConfigVm.cs | 53 +++ .../AltitudeHoldConfigVm.cs | 47 ++ .../CalibrationOffsetsDataVm.cs | 65 +++ .../PresentationModels/ConfigWithPidsBase.cs | 31 ++ .../PresentationModels/DelegateCommand.cs | 41 ++ .../PresentationModels/FlightDataMonitorVm.cs | 212 +++++++++ .../PresentationModels/MainVm.cs | 200 ++++++++ .../PresentationModels/MonitorVm.cs | 160 +++++++ .../PresentationModels/MotorCommandsVm.cs | 44 ++ .../PositionHoldConfigVm.cs | 54 +++ .../PresentationModels/SerialMonitorVm.cs | 54 +++ .../PresentationModels/StableModeConfigVm.cs | 55 +++ .../TransmitterChannelsVm.cs | 198 ++++++++ Configurator/Configurator.Net/Program.cs | 26 ++ .../Properties/AssemblyInfo.cs | 36 ++ ...entationModels.AcroModeConfigVm.datasource | 10 + ...PresentationModels.FlightDataVm.datasource | 10 + ...rator.PresentationModels.MainVm.datasource | 10 + ...tationModels.StableModeConfigVm.datasource | 10 + .../DataSources/SerialMonitorVm.datasource | 10 + .../Properties/Resources.Designer.cs | 71 +++ .../Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../Configurator.Net/SensorDisplay.cs | 105 +++++ .../Configurator.Net/SensorDisplay.resx | 126 +++++ .../Configurator.Net/VerticalProgressBar.cs | 24 + .../Views/AcroConfigView.Designer.cs | 359 ++++++++++++++ .../Configurator.Net/Views/AcroConfigView.cs | 29 ++ .../Views/AcroConfigView.resx | 123 +++++ .../Views/AltitudeHoldConfigView.Designer.cs | 154 ++++++ .../Views/AltitudeHoldConfigView.cs | 28 ++ .../Views/AltitudeHoldConfigView.resx | 123 +++++ .../Views/CalibrationView.Designer.cs | 251 ++++++++++ .../Configurator.Net/Views/CalibrationView.cs | 28 ++ .../Views/CalibrationView.resx | 123 +++++ .../Views/FlightDataView.Designer.cs | 442 ++++++++++++++++++ .../Configurator.Net/Views/FlightDataView.cs | 29 ++ .../Views/FlightDataView.resx | 123 +++++ .../Views/MotorCommandsView.Designer.cs | 147 ++++++ .../Views/MotorCommandsView.cs | 28 ++ .../Views/MotorCommandsView.resx | 120 +++++ .../Views/PositionHoldConfigView.Designer.cs | 299 ++++++++++++ .../Views/PositionHoldConfigView.cs | 26 ++ .../Views/PositionHoldConfigView.resx | 123 +++++ .../Views/SerialMonitorView.Designer.cs | 115 +++++ .../Views/SerialMonitorView.cs | 38 ++ .../Views/SerialMonitorView.resx | 123 +++++ .../Views/StableConfigView.Designer.cs | 350 ++++++++++++++ .../Views/StableConfigView.cs | 29 ++ .../Views/StableConfigView.resx | 123 +++++ .../Views/TransmitterChannelsView.Designer.cs | 284 +++++++++++ .../Views/TransmitterChannelsView.cs | 28 ++ .../Views/TransmitterChannelsView.resx | 123 +++++ .../Configurator.Net/Views/ViewCommon.cs | 37 ++ .../Configurator.Net/mainForm.Designer.cs | 157 +++++++ Configurator/Configurator.Net/mainForm.cs | 171 +++++++ Configurator/Configurator.Net/mainForm.resx | 126 +++++ 64 files changed, 6437 insertions(+) create mode 100644 Configurator/Configurator.Net/ArducopterConfigurator.csproj create mode 100644 Configurator/Configurator.Net/ArducopterConfigurator.sln create mode 100644 Configurator/Configurator.Net/CommsSession.cs create mode 100644 Configurator/Configurator.Net/Core/IPresentationModel.cs create mode 100644 Configurator/Configurator.Net/Core/IView.cs create mode 100644 Configurator/Configurator.Net/NotifyProperyChangedBase.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/AcroModeConfigVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/AltitudeHoldConfigVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/CalibrationOffsetsDataVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/ConfigWithPidsBase.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/DelegateCommand.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/MainVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/MonitorVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/MotorCommandsVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/PositionHoldConfigVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/SerialMonitorVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/StableModeConfigVm.cs create mode 100644 Configurator/Configurator.Net/PresentationModels/TransmitterChannelsVm.cs create mode 100644 Configurator/Configurator.Net/Program.cs create mode 100644 Configurator/Configurator.Net/Properties/AssemblyInfo.cs create mode 100644 Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.AcroModeConfigVm.datasource create mode 100644 Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.FlightDataVm.datasource create mode 100644 Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.MainVm.datasource create mode 100644 Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.StableModeConfigVm.datasource create mode 100644 Configurator/Configurator.Net/Properties/DataSources/SerialMonitorVm.datasource create mode 100644 Configurator/Configurator.Net/Properties/Resources.Designer.cs create mode 100644 Configurator/Configurator.Net/Properties/Resources.resx create mode 100644 Configurator/Configurator.Net/Properties/Settings.Designer.cs create mode 100644 Configurator/Configurator.Net/Properties/Settings.settings create mode 100644 Configurator/Configurator.Net/SensorDisplay.cs create mode 100644 Configurator/Configurator.Net/SensorDisplay.resx create mode 100644 Configurator/Configurator.Net/VerticalProgressBar.cs create mode 100644 Configurator/Configurator.Net/Views/AcroConfigView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/AcroConfigView.cs create mode 100644 Configurator/Configurator.Net/Views/AcroConfigView.resx create mode 100644 Configurator/Configurator.Net/Views/AltitudeHoldConfigView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/AltitudeHoldConfigView.cs create mode 100644 Configurator/Configurator.Net/Views/AltitudeHoldConfigView.resx create mode 100644 Configurator/Configurator.Net/Views/CalibrationView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/CalibrationView.cs create mode 100644 Configurator/Configurator.Net/Views/CalibrationView.resx create mode 100644 Configurator/Configurator.Net/Views/FlightDataView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/FlightDataView.cs create mode 100644 Configurator/Configurator.Net/Views/FlightDataView.resx create mode 100644 Configurator/Configurator.Net/Views/MotorCommandsView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/MotorCommandsView.cs create mode 100644 Configurator/Configurator.Net/Views/MotorCommandsView.resx create mode 100644 Configurator/Configurator.Net/Views/PositionHoldConfigView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/PositionHoldConfigView.cs create mode 100644 Configurator/Configurator.Net/Views/PositionHoldConfigView.resx create mode 100644 Configurator/Configurator.Net/Views/SerialMonitorView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/SerialMonitorView.cs create mode 100644 Configurator/Configurator.Net/Views/SerialMonitorView.resx create mode 100644 Configurator/Configurator.Net/Views/StableConfigView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/StableConfigView.cs create mode 100644 Configurator/Configurator.Net/Views/StableConfigView.resx create mode 100644 Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs create mode 100644 Configurator/Configurator.Net/Views/TransmitterChannelsView.cs create mode 100644 Configurator/Configurator.Net/Views/TransmitterChannelsView.resx create mode 100644 Configurator/Configurator.Net/Views/ViewCommon.cs create mode 100644 Configurator/Configurator.Net/mainForm.Designer.cs create mode 100644 Configurator/Configurator.Net/mainForm.cs create mode 100644 Configurator/Configurator.Net/mainForm.resx diff --git a/Configurator/Configurator.Net/ArducopterConfigurator.csproj b/Configurator/Configurator.Net/ArducopterConfigurator.csproj new file mode 100644 index 0000000000..2b23942d39 --- /dev/null +++ b/Configurator/Configurator.Net/ArducopterConfigurator.csproj @@ -0,0 +1,198 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {AF26391C-7E45-4401-8984-96139A67FF31} + WinExe + Properties + ArducopterConfigurator + ArducopterConfigurator + v2.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + Form + + + mainForm.cs + + + + + + + + + + + mainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + SensorDisplay.cs + + + AcroConfigView.cs + + + AltitudeHoldConfigView.cs + + + CalibrationView.cs + Designer + + + PositionHoldConfigView.cs + + + StableConfigView.cs + + + FlightDataView.cs + + + MotorCommandsView.cs + Designer + + + SerialMonitorView.cs + + + TransmitterChannelsView.cs + + + True + Resources.resx + + + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + Component + + + Component + + + UserControl + + + AcroConfigView.cs + + + UserControl + + + AltitudeHoldConfigView.cs + + + UserControl + + + CalibrationView.cs + + + + + UserControl + + + PositionHoldConfigView.cs + + + UserControl + + + StableConfigView.cs + + + UserControl + + + FlightDataView.cs + + + UserControl + + + MotorCommandsView.cs + + + UserControl + + + SerialMonitorView.cs + + + + UserControl + + + TransmitterChannelsView.cs + + + UserControl + + + + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/ArducopterConfigurator.sln b/Configurator/Configurator.Net/ArducopterConfigurator.sln new file mode 100644 index 0000000000..61b4efd6d9 --- /dev/null +++ b/Configurator/Configurator.Net/ArducopterConfigurator.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArducopterConfigurator", "ArducopterConfigurator.csproj", "{AF26391C-7E45-4401-8984-96139A67FF31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AF26391C-7E45-4401-8984-96139A67FF31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF26391C-7E45-4401-8984-96139A67FF31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF26391C-7E45-4401-8984-96139A67FF31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF26391C-7E45-4401-8984-96139A67FF31}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Configurator/Configurator.Net/CommsSession.cs b/Configurator/Configurator.Net/CommsSession.cs new file mode 100644 index 0000000000..8ed2429928 --- /dev/null +++ b/Configurator/Configurator.Net/CommsSession.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO.Ports; +using System.Text; +using System.Threading; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator +{ + /// + /// Represents a session of communication with the Arducopter + /// + /// + /// Looks after connection state etc + /// + public class CommsSession + { + private readonly SerialPort _sp; + private BackgroundWorker _bgWorker; + + public event Action LineOfDataReceived; + + public CommsSession() + { + _sp = new SerialPort(); + } + + public string CommPort { get; set; } + + public bool Connect() + { + _sp.BaudRate = 115200; + _sp.PortName = CommPort; + + try + { + _sp.Open(); + _sp.ReadTimeout = 50000; + + // start the reading BG thread + _bgWorker = new BackgroundWorker(); + _bgWorker.DoWork += bgWorker_DoWork; + _bgWorker.WorkerReportsProgress = true; + _bgWorker.WorkerSupportsCancellation = true; + _bgWorker.ProgressChanged += bgWorker_ProgressChanged; + _bgWorker.RunWorkerAsync(); + } + catch (Exception ex) + { + Error = ex.Message; + } + return true; + } + + + public bool DisConnect() + { + _bgWorker.CancelAsync(); + + _sp.Close(); + return true; + } + + void bgWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) + { + // Thanks to BG worker, this should be raised on the UI thread + var lineReceived = e.UserState as string; + if (LineOfDataReceived != null) + LineOfDataReceived(lineReceived); + } + + void bgWorker_DoWork(object sender, DoWorkEventArgs e) + { + while (!_bgWorker.CancellationPending) + { + try + { + var line = _sp.ReadLine(); + _bgWorker.ReportProgress(0, line); + } + catch(TimeoutException) + { + // continue + } + catch(System.IO.IOException) // when the port gets killed + {} + catch(ObjectDisposedException) + {} + } + } + + private string Error { get; set;} + + public SerialPort SerialPort + { + get { return _sp; } + } + + public void Send(string send) + { + if (_sp.IsOpen) + _sp.Write(send); + } + } +} diff --git a/Configurator/Configurator.Net/Core/IPresentationModel.cs b/Configurator/Configurator.Net/Core/IPresentationModel.cs new file mode 100644 index 0000000000..b21613e027 --- /dev/null +++ b/Configurator/Configurator.Net/Core/IPresentationModel.cs @@ -0,0 +1,7 @@ +namespace ArducopterConfigurator +{ + public interface IPresentationModel + { + string Name { get; } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/Core/IView.cs b/Configurator/Configurator.Net/Core/IView.cs new file mode 100644 index 0000000000..6a260e9f33 --- /dev/null +++ b/Configurator/Configurator.Net/Core/IView.cs @@ -0,0 +1,10 @@ +using System.Windows.Forms; + +namespace ArducopterConfigurator +{ + public interface IView where Tmodel : IPresentationModel + { + void SetDataContext(Tmodel model); + Control Control { get; } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/NotifyProperyChangedBase.cs b/Configurator/Configurator.Net/NotifyProperyChangedBase.cs new file mode 100644 index 0000000000..fa566f7f9a --- /dev/null +++ b/Configurator/Configurator.Net/NotifyProperyChangedBase.cs @@ -0,0 +1,31 @@ +using System.ComponentModel; + +namespace ArducopterConfigurator +{ + public abstract class NotifyProperyChangedBase : INotifyPropertyChanged + { + public event PropertyChangedEventHandler PropertyChanged; + + protected bool CheckPropertyChanged(string propertyName, ref T oldValue, ref T newValue) + { + if (oldValue == null && newValue == null) + return false; + + if ((oldValue == null && newValue != null) || !oldValue.Equals((T)newValue)) + { + oldValue = newValue; + FirePropertyChanged(propertyName); + return true; + } + + return false; + } + + protected void FirePropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/AcroModeConfigVm.cs b/Configurator/Configurator.Net/PresentationModels/AcroModeConfigVm.cs new file mode 100644 index 0000000000..5645bba451 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/AcroModeConfigVm.cs @@ -0,0 +1,53 @@ +using System; + +namespace ArducopterConfigurator.PresentationModels +{ + public class AcroModeConfigVm : ConfigWithPidsBase + { + public AcroModeConfigVm(CommsSession sp) : base(sp) + { + PropsInUpdateOrder = new[] + { + "RollP", + "RollI", + "RollD", + "PitchP", + "PitchI", + "PitchD", + "YawP", + "YawI", + "YawD", + "TransmitterFactor", + }; + + RefreshCommand = new DelegateCommand(_ => RefreshValues()); + UpdateCommand = new DelegateCommand(_ => UpdateValues()); + } + + public float TransmitterFactor { get; private set; } + + public ICommand RefreshCommand { get; private set; } + + public ICommand UpdateCommand { get; private set; } + + protected override void OnActivated() + { + RefreshValues(); + } + + private void RefreshValues() + { + SendString("P"); + } + + public void UpdateValues() + { + SendPropsWithCommand("O"); + } + + public override string Name + { + get { return "Acro Mode"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/AltitudeHoldConfigVm.cs b/Configurator/Configurator.Net/PresentationModels/AltitudeHoldConfigVm.cs new file mode 100644 index 0000000000..346a2974fc --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/AltitudeHoldConfigVm.cs @@ -0,0 +1,47 @@ +namespace ArducopterConfigurator.PresentationModels +{ + public class AltitudeHoldConfigVm : MonitorVm + { + public AltitudeHoldConfigVm(CommsSession sp) + : base(sp) + { + PropsInUpdateOrder = new[] { "P", "I", "D", }; + + RefreshCommand = new DelegateCommand(_ => RefreshValues()); + UpdateCommand = new DelegateCommand(_ => UpdateValues()); + } + + public ICommand RefreshCommand { get; private set; } + public ICommand UpdateCommand { get; private set; } + + public float P { get; protected set; } + public float I { get; protected set; } + public float D { get; protected set; } + + + private void RefreshValues() + { + SendString("F"); + } + + public void UpdateValues() + { + SendPropsWithCommand("E"); + } + + protected override void OnActivated() + { + RefreshValues(); + } + + protected override void OnStringReceived(string strReceived) + { + PopulatePropsFromUpdate(strReceived,true); + } + + public override string Name + { + get { return "Altitude Hold"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/CalibrationOffsetsDataVm.cs b/Configurator/Configurator.Net/PresentationModels/CalibrationOffsetsDataVm.cs new file mode 100644 index 0000000000..ee99bdef05 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/CalibrationOffsetsDataVm.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; + +namespace ArducopterConfigurator.PresentationModels +{ + public class CalibrationOffsetsDataVm : MonitorVm + { + public CalibrationOffsetsDataVm(CommsSession sp) : base(sp) + { + PropsInUpdateOrder = new[] + { + "GyroRollOffset", + "GyroPitchOffset", + "GyroYawOffset", + "AccelRollOffset", + "AccelPitchOffset", + "AccelZOffset" + }; + + RefreshCommand = new DelegateCommand(_ => RefreshValues()); + UpdateCommand = new DelegateCommand(_ => UpdateValues()); + } + + public ICommand RefreshCommand { get; private set; } + + public ICommand UpdateCommand { get; private set; } + + + + public int GyroRollOffset { get; set; } + public int GyroPitchOffset { get; set; } + public int GyroYawOffset { get; set; } + + public int AccelRollOffset { get; set; } + public int AccelPitchOffset { get; set; } + public int AccelZOffset { get; set; } + + protected override void OnActivated() + { + RefreshValues(); + } + + private void RefreshValues() + { + SendString("J"); + } + + public void UpdateValues() + { + SendPropsWithCommand("I"); + } + + + protected override void OnStringReceived(string strReceived) + { + PopulatePropsFromUpdate(strReceived,true); + } + + public override string Name + { + get { return "Calibration"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/ConfigWithPidsBase.cs b/Configurator/Configurator.Net/PresentationModels/ConfigWithPidsBase.cs new file mode 100644 index 0000000000..bd2279e334 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/ConfigWithPidsBase.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Diagnostics; + +namespace ArducopterConfigurator.PresentationModels +{ + public abstract class ConfigWithPidsBase : MonitorVm + { + + public float RollP { get; set; } + public float RollI { get; set; } + public float RollD { get; set; } + + public float PitchP { get; set; } + public float PitchI { get; set; } + public float PitchD { get; set; } + + public float YawP { get; set; } + public float YawI { get; set; } + public float YawD { get; set; } + + + public ConfigWithPidsBase(CommsSession sp) : base(sp) + { + } + + protected override void OnStringReceived(string strRx) + { + PopulatePropsFromUpdate(strRx,true); + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/DelegateCommand.cs b/Configurator/Configurator.Net/PresentationModels/DelegateCommand.cs new file mode 100644 index 0000000000..0b51396d81 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/DelegateCommand.cs @@ -0,0 +1,41 @@ +using System; + +namespace ArducopterConfigurator.PresentationModels +{ + public interface ICommand + { + void Execute(object parameter); + bool CanExecute(object parameter); + } + + public class DelegateCommand : ICommand + { + private readonly Predicate _canExecute; + private readonly Action _execute; + + public DelegateCommand(Action execute) + : this(execute, null) + { + } + + public DelegateCommand(Action execute, Predicate canExecute) + { + _execute = execute; + _canExecute = canExecute; + } + + public bool CanExecute(object parameter) + { + if (_canExecute == null) + return true; + + return _canExecute(parameter); + } + + public void Execute(object parameter) + { + _execute(parameter); + } + + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs b/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs new file mode 100644 index 0000000000..e11cf73350 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/FlightDataMonitorVm.cs @@ -0,0 +1,212 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO.Ports; + +namespace ArducopterConfigurator.PresentationModels +{ + public class FlightDataVm : MonitorVm + { + public FlightDataVm(CommsSession _sp) : base(_sp) + { + + } + + // 2,-10,3,-2,1011,1012,1002,1000,1001,1003,1002,1004 + // Loop Time = 2 + // Roll Gyro Rate = -10 + // Pitch Gyro Rate = 3 + // Yaw Gyro Rate = -2 + // Throttle Output = 1011 + // Roll PID Output = 1012 + // Pitch PID Output = 1002 + // Yaw PID Output 1000 + // Front Motor Command = 1001 PWM output sent to right motor (ranges from 1000-2000) + // Rear Motor Command 1003 + // Right Motor Command = 1002 + // Left Motor Command = 1004 + // then adc 4,3, and 5 + protected override void OnStringReceived(string data) + { + var strs = data.Split(','); + var ints = new List(); + foreach (var s in strs) + { + int val; + if (!int.TryParse(s, out val)) + { + Debug.WriteLine("Could not parse expected integer: " + s); + return; + } + ints.Add(val); + } + + if (ints.Count!=15) + { + Debug.WriteLine("Flight Data seentence expected, but only got one of size: " + ints.Count); + return; + } + + LoopTime = ints[0]; + GyroRoll = ints[1] + 500; + GyroPitch = ints[2] + 500; + GyroYaw = ints[3] + 500; + MotorFront = ints[8]; + MotorRear = ints[9]; + MotorRight = ints[10]; + MotorLeft = ints[11]; + AccelRoll = ints[12] + 500; + AccelPitch = ints[13] + 500; + AccelZ = ints[14] + 500; + } + + + private int _loopTime; + public int LoopTime + { + get { return _loopTime; } + set + { + if (_loopTime == value) return; + _loopTime = value; + FirePropertyChanged("LoopTime"); + } + } + + + private int motorFront; + public int MotorFront + { + get { return motorFront; } + set { + if (motorFront == value) return; + motorFront = value; + FirePropertyChanged("MotorFront"); + } + } + + private int motorRear; + public int MotorRear + { + get { return motorRear; } + set + { + if (motorRear == value) return; + motorRear = value; + FirePropertyChanged("MotorRear"); + } + } + + private int motorLeft; + public int MotorLeft + { + get { return motorLeft; } + set + { + if (motorLeft == value) return; + motorLeft = value; + FirePropertyChanged("MotorLeft"); + } + } + + private int motorRight; + public int MotorRight + { + get { return motorRight; } + set + { + if (motorRight == value) return; + motorRight = value; + FirePropertyChanged("MotorRight"); + } + } + + private int gyroPitch; + public int GyroPitch + { + get { return gyroPitch; } + set + { + if (gyroPitch == value) return; + gyroPitch = value; + FirePropertyChanged("GyroPitch"); + } + } + + private int gyroRoll; + public int GyroRoll + { + get { return gyroRoll; } + set + { + if (gyroRoll == value) return; + gyroRoll = value; + FirePropertyChanged("GyroRoll"); + } + } + + private int gyroYaw; + public int GyroYaw + { + get { return gyroYaw; } + set + { + if (gyroYaw == value) return; + gyroYaw = value; + FirePropertyChanged("GyroYaw"); + } + } + + private int accelPitch; + public int AccelPitch + { + get { return accelPitch; } + set + { + if (accelPitch == value) return; + accelPitch = value; + FirePropertyChanged("AccelPitch"); + } + } + + private int accelRoll; + public int AccelRoll + { + get { return accelRoll; } + set + { + if (accelRoll == value) return; + accelRoll = value; + FirePropertyChanged("AccelRoll"); + } + } + + private int accelZ; + public int AccelZ + { + get { return accelZ; } + set + { + if (accelZ == value) return; + accelZ = value; + FirePropertyChanged("AccelZ"); + } + } + + protected override void OnDeactivated() + { + SendString("X"); + } + + + protected override void OnActivated() + { + SendString("S"); + } + + public override string Name + { + get { return "Flight Data"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/MainVm.cs b/Configurator/Configurator.Net/PresentationModels/MainVm.cs new file mode 100644 index 0000000000..8ccb46bbe0 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/MainVm.cs @@ -0,0 +1,200 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO.Ports; +using System.Threading; +using Timer=System.Windows.Forms.Timer; + +namespace ArducopterConfigurator.PresentationModels +{ + public class MainVm : NotifyProperyChangedBase, IPresentationModel + { + private readonly CommsSession _session; + private bool _isConnected; + private MonitorVm _selectedVm; + private string _selectedPort; + private string _apmVersion; + private System.Windows.Forms.Timer _connectionAttemptsTimer; + + private SessionStates _connectionState; + + + public MainVm(CommsSession session) + { + _session = session; + _session.LineOfDataReceived += _session_LineOfDataReceived; + + MonitorVms = new BindingList + { + new FlightDataVm(session), + new TransmitterChannelsVm(session), + new MotorCommandsVm(session), + new CalibrationOffsetsDataVm(session), + new AcroModeConfigVm(session), + new StableModeConfigVm(session), + new PositionHoldConfigVm(session), + new AltitudeHoldConfigVm(session), + new SerialMonitorVm(session) + }; + + ConnectCommand = new DelegateCommand( + _ => Connect(), + _ => _connectionState==SessionStates.Disconnected && AvailablePorts.Contains(SelectedPort)); + + DisconnectCommand = new DelegateCommand(_ => Disconnect(), _ => IsConnected); + + RefreshPortListCommand = new DelegateCommand(_ => RefreshPorts()); + + ConnectionState = SessionStates.Disconnected; + + AvailablePorts = new BindingList(); + } + + private void RefreshPorts() + { + AvailablePorts.Clear(); + foreach (var c in SerialPort.GetPortNames()) + AvailablePorts.Add(c); + + } + + void _session_LineOfDataReceived(string strRx) + { + // If we are waiting for the version string + if (ConnectionState==SessionStates.Connecting) + { + // then assume that this is the version string received + ApmVersion = strRx; + ConnectionState = SessionStates.Connected; + _selectedVm.Activate(); + } + } + + public ICommand ConnectCommand { get; private set; } + + public ICommand DisconnectCommand { get; private set; } + + public ICommand RefreshPortListCommand { get; private set; } + + public BindingList AvailablePorts { get; private set; } + + public enum SessionStates + { + Disconnected, + Connecting, + Connected, + } + + public SessionStates ConnectionState + { + get { return _connectionState; } + set + { + if (_connectionState != value) + { + _connectionState = value; + IsConnected = _connectionState == SessionStates.Connected; + FirePropertyChanged("ConnectionState"); + } + } + } + + // provided for convenience for binding set from the session state prop + public bool IsConnected + { + get { return _isConnected; } + private set + { + if (_isConnected != value) + { + _isConnected = value; + FirePropertyChanged("IsConnected"); + } + } + } + + public string SelectedPort + { + get { return _selectedPort; } + set + { + if (_selectedPort != value) + { + _selectedPort = value; + FirePropertyChanged("SelectedPort"); + } + } + } + + public void Connect() + { + _session.CommPort = SelectedPort; + + // Todo: check the status of this call success/failure + _session.Connect(); + + ConnectionState = SessionStates.Connecting; + + _connectionAttemptsTimer = new Timer(); + _connectionAttemptsTimer.Tick += _connectionAttemptsTimer_Tick; + _connectionAttemptsTimer.Interval = 1000; //milliseconds + _connectionAttemptsTimer.Start(); + } + + void _connectionAttemptsTimer_Tick(object sender, EventArgs e) + { + if (_connectionState != SessionStates.Connecting) + { + _connectionAttemptsTimer.Stop(); + return; + } + + // once we connected, then get the version string + _session.Send("!"); + } + + + public void Disconnect() + { + _session.Send("X"); + _session.DisConnect(); + ConnectionState = SessionStates.Disconnected; + } + + + + + public string ApmVersion + { + get { return _apmVersion; } + private set + { + if (_apmVersion != value) + { + _apmVersion = value; + FirePropertyChanged("ApmVersion"); + } + } + } + + public BindingList MonitorVms { get; private set; } + + public string Name + { + get { return "Arducopter Config"; } + } + + public void Select(MonitorVm vm) + { + if (_selectedVm==vm) + return; + + if (_selectedVm!=null) + _selectedVm.DeActivate(); + + _selectedVm = vm; + + _selectedVm.Activate(); + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/MonitorVm.cs b/Configurator/Configurator.Net/PresentationModels/MonitorVm.cs new file mode 100644 index 0000000000..ba2b7fabcb --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/MonitorVm.cs @@ -0,0 +1,160 @@ +using System.Diagnostics; +using System.Text; + +namespace ArducopterConfigurator +{ + /// + /// Monitor VM base class + /// + /// + /// Common base for some factored out things like only passing data to an active + /// Monitor, etc + /// + public abstract class MonitorVm : NotifyProperyChangedBase, IPresentationModel + { + private CommsSession _sp; + protected bool isActive; + protected string[] PropsInUpdateOrder; + + protected MonitorVm(CommsSession sp) + { + _sp = sp; + _sp.LineOfDataReceived += sp_LineOfDataReceived; + } + + void sp_LineOfDataReceived(string obj) + { + if (isActive) + OnStringReceived(obj); + } + + /// + /// Called when the mode is selected + /// + /// + /// Any initialising commands should be sent to the serial port + /// when this method is called. + /// + public void Activate() + { + isActive = true; + OnActivated(); + } + + public void DeActivate() + { + isActive = false; + OnDeactivated(); + } + + protected virtual void OnDeactivated() + { + + } + + protected virtual void OnActivated() + { + + } + + /// + /// Send raw text to the Arducopter + /// + protected void SendString(string strToSend) + { + _sp.Send(strToSend); + } + + /// + /// Call-back for text sent back from the Arducopter + /// + /// + /// This is called when a full line of text is received from the APM + /// This will not be called when the mode is not selected + /// + protected abstract void OnStringReceived(string strReceived); + + #region Implementation of IPresentationModel + + public abstract string Name { get; } + + #endregion + + + // Common method for populating properties, using a hardcoded + // property update order, and reflection to get the property type + protected void PopulatePropsFromUpdate(string strRx, bool fireInpc) + { + var strs = strRx.Split(','); + + if (PropsInUpdateOrder.Length!=strs.Length) + { + Debug.WriteLine("Processing update with only " + strs.Length + + " values, but have " + PropsInUpdateOrder.Length + + " properties to populate. Ignoring this update"); + return; + } + + for (int i = 0; i < PropsInUpdateOrder.Length; i++) + { + var prop = this.GetType().GetProperty(PropsInUpdateOrder[i]); + var s = strs[i]; + object value = null; + + if (prop.PropertyType == typeof(float)) + { + float val; + if (!float.TryParse(s, out val)) + { + Debug.WriteLine("Error parsing float: " + s); + break; + } + value = val; + } + if (prop.PropertyType == typeof(bool)) + { + float val; + if (!float.TryParse(s, out val)) + { + Debug.WriteLine("Error parsing float (bool): " + s); + break; + } + value = val != 0.0; + } + + if (prop.PropertyType == typeof(int)) + { + int val; + if (!int.TryParse(s, out val)) + { + Debug.WriteLine("Error parsing float: " + s); + break; + } + value = val; + } + + prop.SetValue(this, value, null); + + if (fireInpc) + FirePropertyChanged(PropsInUpdateOrder[i]); + } + } + + // Common method for sending/updating data + // sentence sent to APM is the commandChar followed by the property + // vals in the correct order, seperated by semicolons + protected void SendPropsWithCommand(string commandChar) + { + var strings = new string[PropsInUpdateOrder.Length]; + for (int i = 0; i < PropsInUpdateOrder.Length; i++) + { + var prop = this.GetType().GetProperty(PropsInUpdateOrder[i]); + strings[i] = prop.GetValue(this, null).ToString(); + + } + + var sentence = commandChar + string.Join(";", strings); + SendString(sentence); + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/MotorCommandsVm.cs b/Configurator/Configurator.Net/PresentationModels/MotorCommandsVm.cs new file mode 100644 index 0000000000..3495e1c765 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/MotorCommandsVm.cs @@ -0,0 +1,44 @@ +namespace ArducopterConfigurator.PresentationModels +{ + public class MotorCommandsVm : MonitorVm + { + public MotorCommandsVm(CommsSession _sp) + : base(_sp) + { + } + + public override string Name + { + get { return "Motor Commands"; } + } + + public int MotorFront { get; set; } + public int MotorRear { get; set; } + public int MotorLeft { get; set; } + public int MotorRight { get; set; } + + public void SendCommand() + { + } + + public void StopCommand() + { + } + + + protected override void OnDeactivated() + { + + } + + protected override void OnActivated() + { + + } + + protected override void OnStringReceived(string strReceived) + { + + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/PositionHoldConfigVm.cs b/Configurator/Configurator.Net/PresentationModels/PositionHoldConfigVm.cs new file mode 100644 index 0000000000..f0bd99c532 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/PositionHoldConfigVm.cs @@ -0,0 +1,54 @@ +namespace ArducopterConfigurator.PresentationModels +{ + public class PositionHoldConfigVm : ConfigWithPidsBase + { + public PositionHoldConfigVm(CommsSession sp) + : base(sp) + { + PropsInUpdateOrder = new[] + { + "RollP", + "RollI", + "RollD", + "PitchP", + "PitchI", + "PitchD", + "MaximumAngle", + "GeoCorrectionFactor", + }; + + RefreshCommand = new DelegateCommand(_ => RefreshValues()); + UpdateCommand = new DelegateCommand(_ => UpdateValues()); + } + + public float MaximumAngle { get; set; } + + public float GeoCorrectionFactor { get; set; } + + public ICommand RefreshCommand { get; private set; } + + public ICommand UpdateCommand { get; private set; } + + //Send an 'C' followed by numeric values to transmit user defined roll and pitch PID values for gyro stabilized flight control. Each value is separated by a semi-colon in the form: + //C[P GPS ROLL];[I GPS ROLL];[D GPS ROLL];[P GPS PITCH];[I GPS PITCH];[D GPS PITCH];[GPS MAX ANGLE];[GEOG Correction factor] + public void UpdateValues() + { + SendPropsWithCommand("C"); + } + + public void RefreshValues() + { + SendString("D"); + } + + protected override void OnActivated() + { + RefreshValues(); + } + + public override string Name + { + get { return "Position Hold"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/SerialMonitorVm.cs b/Configurator/Configurator.Net/PresentationModels/SerialMonitorVm.cs new file mode 100644 index 0000000000..c6f304b8d7 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/SerialMonitorVm.cs @@ -0,0 +1,54 @@ +using System; +using System.IO.Ports; + +namespace ArducopterConfigurator.PresentationModels +{ + public class SerialMonitorVm : MonitorVm + { + private string _text; + + public SerialMonitorVm(CommsSession _sp) : base(_sp) + { + _sp.LineOfDataReceived += new Action(_sp_DataReceived); + + } + + void _sp_DataReceived(string obj) + { + _text += obj; + FirePropertyChanged("ReceviedText"); + } + + public string ReceviedText { get { return _text; } } + + public string SendText { get; set; } + + + protected override void OnActivated() + { + + SendString("X"); + _text = string.Empty; + FirePropertyChanged("ReceviedText"); + } + + + protected override void OnStringReceived(string strReceived) + { + _text += strReceived; + FirePropertyChanged("ReceviedText"); + } + + public override string Name + { + get { return "Serial Monitor"; } + } + + public void SendTextCommand() + { + SendString(SendText); + SendText = ""; + FirePropertyChanged("SendText"); + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/StableModeConfigVm.cs b/Configurator/Configurator.Net/PresentationModels/StableModeConfigVm.cs new file mode 100644 index 0000000000..6e8d54a0b7 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/StableModeConfigVm.cs @@ -0,0 +1,55 @@ +namespace ArducopterConfigurator.PresentationModels +{ + public class StableModeConfigVm : ConfigWithPidsBase + { + public StableModeConfigVm(CommsSession sp) + : base(sp) + { + PropsInUpdateOrder = new[] + { + "RollP", + "RollI", + "RollD", + "PitchP", + "PitchI", + "PitchD", + "YawP", + "YawI", + "YawD", + "KPrate", + "MagnetometerEnable", + }; + + RefreshCommand = new DelegateCommand(_ => RefreshValues()); + UpdateCommand = new DelegateCommand(_ => UpdateValues()); + } + + public ICommand RefreshCommand { get; private set; } + + public ICommand UpdateCommand { get; private set; } + + public float KPrate { get; private set; } + + public bool MagnetometerEnable { get; private set; } + + private void RefreshValues() + { + SendString("B"); + } + + public void UpdateValues() + { + SendPropsWithCommand("A"); + } + + protected override void OnActivated() + { + RefreshValues(); + } + + public override string Name + { + get { return "Stable Mode"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/PresentationModels/TransmitterChannelsVm.cs b/Configurator/Configurator.Net/PresentationModels/TransmitterChannelsVm.cs new file mode 100644 index 0000000000..c6f602ff01 --- /dev/null +++ b/Configurator/Configurator.Net/PresentationModels/TransmitterChannelsVm.cs @@ -0,0 +1,198 @@ +using System.Collections.Generic; +using System.Diagnostics; + +namespace ArducopterConfigurator.PresentationModels +{ + public class TransmitterChannelsVm : MonitorVm + { + public TransmitterChannelsVm(CommsSession sp) : base(sp) + { + PropsInUpdateOrder = new[] + { + "Roll", // Aileron + "Pitch", // Elevator + "Yaw", + "Throttle", + "Mode", // AUX1 (Mode) + "Aux", // AUX2 + "RollMidValue", + "PitchMidValue", + "YawMidValue", + }; + } + + + private int _roll; + public int Roll + { + get { return _roll; } + set + { + if (_roll == value) return; + _roll = value; + FirePropertyChanged("Roll"); + } + } + + private int _pitch; + public int Pitch + { + get { return _pitch; } + set + { + if (_pitch == value) return; + _pitch = value; + FirePropertyChanged("Pitch"); + } + } + + private int _yaw; + public int Yaw + { + get { return _yaw; } + set + { + if (_yaw == value) return; + _yaw = value; + FirePropertyChanged("Yaw"); + } + } + + private int _throttle; + public int Throttle + { + get { return _throttle; } + set + { + if (_throttle == value) return; + _throttle = value; + FirePropertyChanged("Throttle"); + } + } + + + + + + + private int _mode; + public int Mode + { + get { return _mode; } + set + { + if (_mode == value) return; + _mode = value; + FirePropertyChanged("Mode"); + } + } + + private int _aux; + public int Aux + { + get { return _aux; } + set + { + if (_aux == value) return; + _aux = value; + FirePropertyChanged("Aux"); + } + } + + + + + + private int _rollmid; + public int RollMidValue + { + get { return _rollmid; } + set + { + if (_rollmid == value) return; + _rollmid = value; + FirePropertyChanged("RollMidValue"); + } + } + + private int _pitchMid; + public int PitchMidValue + { + get { return _pitchMid; } + set + { + if (_pitchMid == value) return; + _pitchMid = value; + FirePropertyChanged("PitchMidValue"); + } + } + + private int _yawMid; + public int YawMidValue + { + get { return _yawMid; } + set + { + if (_yawMid == value) return; + _yawMid = value; + FirePropertyChanged("YawMidValue"); + } + } + + protected override void OnActivated() + { + SendString("U"); + } + + protected override void OnDeactivated() + { + SendString("X"); + } + + protected override void OnStringReceived(string strReceived) + { + PopulatePropsFromUpdate(strReceived,false); + } + + + private void manualPropset(string strReceived) + { + // PopulatePropsFromUpdate(strReceived,false); + var strs = strReceived.Split(','); + var ints = new List(); + foreach (var s in strs) + { + int val; + if (!int.TryParse(s, out val)) + { + Debug.WriteLine("Could not parse expected integer: " + s); + return; + } + ints.Add(val); + } + + if (ints.Count != 9) + { + Debug.WriteLine("Tx Data sentence expected, but only got one of size: " + ints.Count); + return; + } + + Roll = ints[0]; + // Pitch = ints[1]; + // Yaw = ints[2]; + Throttle = ints[3]; + // Mode = ints[4]; + // Aux = ints[5]; + // RollMidValue = ints[6]; + // PitchMidValue = ints[7]; + // YawMidValue = ints[8]; + + + } + + public override string Name + { + get { return "Transmitter Channels"; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/Program.cs b/Configurator/Configurator.Net/Program.cs new file mode 100644 index 0000000000..5a3537c1e4 --- /dev/null +++ b/Configurator/Configurator.Net/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + var session = new CommsSession(); + var mainVm = new MainVm(session); + + + Application.Run(new mainForm(mainVm)); + } + } +} diff --git a/Configurator/Configurator.Net/Properties/AssemblyInfo.cs b/Configurator/Configurator.Net/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..9a09686084 --- /dev/null +++ b/Configurator/Configurator.Net/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ArducopterConfigurator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ArducopterConfigurator")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4bba5a30-abac-4fe7-8e48-84c668f09753")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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("0.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.AcroModeConfigVm.datasource b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.AcroModeConfigVm.datasource new file mode 100644 index 0000000000..f7ae16ba8d --- /dev/null +++ b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.AcroModeConfigVm.datasource @@ -0,0 +1,10 @@ + + + + ArducopterConfigurator.PresentationModels.AcroModeConfigVm, ArducopterConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.FlightDataVm.datasource b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.FlightDataVm.datasource new file mode 100644 index 0000000000..0b0c7eb4d3 --- /dev/null +++ b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.FlightDataVm.datasource @@ -0,0 +1,10 @@ + + + + ArducopterConfigurator.PresentationModels.FlightDataVm, ArducopterConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.MainVm.datasource b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.MainVm.datasource new file mode 100644 index 0000000000..d6a4e49f7e --- /dev/null +++ b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.MainVm.datasource @@ -0,0 +1,10 @@ + + + + ArducopterConfigurator.PresentationModels.MainVm, ArducopterConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.StableModeConfigVm.datasource b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.StableModeConfigVm.datasource new file mode 100644 index 0000000000..fec9c09ef4 --- /dev/null +++ b/Configurator/Configurator.Net/Properties/DataSources/ArducopterConfigurator.PresentationModels.StableModeConfigVm.datasource @@ -0,0 +1,10 @@ + + + + ArducopterConfigurator.PresentationModels.StableModeConfigVm, ArducopterConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Properties/DataSources/SerialMonitorVm.datasource b/Configurator/Configurator.Net/Properties/DataSources/SerialMonitorVm.datasource new file mode 100644 index 0000000000..397bc216d7 --- /dev/null +++ b/Configurator/Configurator.Net/Properties/DataSources/SerialMonitorVm.datasource @@ -0,0 +1,10 @@ + + + + ArducopterConfigurator.PresentationModels.SerialMonitorVm, ArducopterConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Properties/Resources.Designer.cs b/Configurator/Configurator.Net/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..fb9127f47e --- /dev/null +++ b/Configurator/Configurator.Net/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4952 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ArducopterConfigurator.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ArducopterConfigurator.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Configurator/Configurator.Net/Properties/Resources.resx b/Configurator/Configurator.Net/Properties/Resources.resx new file mode 100644 index 0000000000..ffecec851a --- /dev/null +++ b/Configurator/Configurator.Net/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Properties/Settings.Designer.cs b/Configurator/Configurator.Net/Properties/Settings.Designer.cs new file mode 100644 index 0000000000..a920b268ac --- /dev/null +++ b/Configurator/Configurator.Net/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4952 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ArducopterConfigurator.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Configurator/Configurator.Net/Properties/Settings.settings b/Configurator/Configurator.Net/Properties/Settings.settings new file mode 100644 index 0000000000..abf36c5d3d --- /dev/null +++ b/Configurator/Configurator.Net/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Configurator/Configurator.Net/SensorDisplay.cs b/Configurator/Configurator.Net/SensorDisplay.cs new file mode 100644 index 0000000000..a2be60f952 --- /dev/null +++ b/Configurator/Configurator.Net/SensorDisplay.cs @@ -0,0 +1,105 @@ +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 SensorDisplay : ProgressBar + { + private bool m_IsVertical; + private int m_Offset; + + 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 - m_Offset; + } + set + { + base.Value = value + m_Offset; + } + } + + public new int Maximum + { + get + { + return base.Maximum - m_Offset; + } + set + { + base.Maximum = value + m_Offset; + } + } + + + public new int Minimum + { + get + { + return base.Minimum - m_Offset; + } + set + { + base.Minimum = value + m_Offset; + } + } + + + [Description("Whether the display grows vertically")] + [Category("SensorDisplay")] + [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("SensorDisplay")] + [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/SensorDisplay.resx b/Configurator/Configurator.Net/SensorDisplay.resx new file mode 100644 index 0000000000..3db1fb2c17 --- /dev/null +++ b/Configurator/Configurator.Net/SensorDisplay.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/VerticalProgressBar.cs b/Configurator/Configurator.Net/VerticalProgressBar.cs new file mode 100644 index 0000000000..cf1549a3c3 --- /dev/null +++ b/Configurator/Configurator.Net/VerticalProgressBar.cs @@ -0,0 +1,24 @@ +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/AcroConfigView.Designer.cs b/Configurator/Configurator.Net/Views/AcroConfigView.Designer.cs new file mode 100644 index 0000000000..5c967a7975 --- /dev/null +++ b/Configurator/Configurator.Net/Views/AcroConfigView.Designer.cs @@ -0,0 +1,359 @@ +namespace ArducopterConfigurator.Views +{ + partial class AcroConfigView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.button2 = new System.Windows.Forms.Button(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.textBox7 = new System.Windows.Forms.TextBox(); + this.AcroModeConfigVmBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.textBox8 = new System.Windows.Forms.TextBox(); + this.textBox9 = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.textBox10 = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.AcroModeConfigVmBindingSource)).BeginInit(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.AcroModeConfigVmBindingSource, "RefreshCommand", true)); + this.button2.Location = new System.Drawing.Point(198, 135); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(74, 23); + this.button2.TabIndex = 12; + this.button2.Text = "Refresh"; + this.button2.UseVisualStyleBackColor = true; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label7); + this.groupBox4.Controls.Add(this.label8); + this.groupBox4.Controls.Add(this.label9); + this.groupBox4.Controls.Add(this.textBox7); + this.groupBox4.Controls.Add(this.textBox8); + this.groupBox4.Controls.Add(this.textBox9); + this.groupBox4.Location = new System.Drawing.Point(234, 6); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(108, 101); + this.groupBox4.TabIndex = 11; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Yaw"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(7, 74); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(15, 13); + this.label7.TabIndex = 5; + this.label7.Text = "D"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(7, 48); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(10, 13); + this.label8.TabIndex = 4; + this.label8.Text = "I"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(7, 22); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(14, 13); + this.label9.TabIndex = 3; + this.label9.Text = "P"; + // + // textBox7 + // + this.textBox7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "YawD", true)); + this.textBox7.Location = new System.Drawing.Point(23, 71); + this.textBox7.Name = "textBox7"; + this.textBox7.Size = new System.Drawing.Size(78, 20); + this.textBox7.TabIndex = 2; + // + // AcroModeConfigVmBindingSource + // + this.AcroModeConfigVmBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.AcroModeConfigVm); + // + // textBox8 + // + this.textBox8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "YawI", true)); + this.textBox8.Location = new System.Drawing.Point(23, 45); + this.textBox8.Name = "textBox8"; + this.textBox8.Size = new System.Drawing.Size(78, 20); + this.textBox8.TabIndex = 1; + // + // textBox9 + // + this.textBox9.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "YawP", true)); + this.textBox9.Location = new System.Drawing.Point(23, 19); + this.textBox9.Name = "textBox9"; + this.textBox9.Size = new System.Drawing.Size(78, 20); + this.textBox9.TabIndex = 0; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Controls.Add(this.textBox4); + this.groupBox2.Controls.Add(this.textBox5); + this.groupBox2.Controls.Add(this.textBox6); + this.groupBox2.Location = new System.Drawing.Point(120, 6); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(108, 101); + this.groupBox2.TabIndex = 10; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Pitch"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 74); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(15, 13); + this.label4.TabIndex = 5; + this.label4.Text = "D"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 48); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(10, 13); + this.label5.TabIndex = 4; + this.label5.Text = "I"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 22); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(14, 13); + this.label6.TabIndex = 3; + this.label6.Text = "P"; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "PitchD", true)); + this.textBox4.Location = new System.Drawing.Point(23, 71); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(78, 20); + this.textBox4.TabIndex = 2; + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "PitchI", true)); + this.textBox5.Location = new System.Drawing.Point(23, 45); + this.textBox5.Name = "textBox5"; + this.textBox5.Size = new System.Drawing.Size(78, 20); + this.textBox5.TabIndex = 1; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "PitchP", true)); + this.textBox6.Location = new System.Drawing.Point(23, 19); + this.textBox6.Name = "textBox6"; + this.textBox6.Size = new System.Drawing.Size(78, 20); + this.textBox6.TabIndex = 0; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.label2); + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Controls.Add(this.textBox3); + this.groupBox3.Controls.Add(this.textBox2); + this.groupBox3.Controls.Add(this.textBox1); + this.groupBox3.Location = new System.Drawing.Point(6, 5); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(108, 101); + this.groupBox3.TabIndex = 9; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Roll"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 74); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(15, 13); + this.label3.TabIndex = 5; + this.label3.Text = "D"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 48); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(10, 13); + this.label2.TabIndex = 4; + this.label2.Text = "I"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 22); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(14, 13); + this.label1.TabIndex = 3; + this.label1.Text = "P"; + // + // textBox3 + // + this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "RollD", true)); + this.textBox3.Location = new System.Drawing.Point(23, 71); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(78, 20); + this.textBox3.TabIndex = 2; + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "RollI", true)); + this.textBox2.Location = new System.Drawing.Point(23, 45); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(78, 20); + this.textBox2.TabIndex = 1; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "RollP", true)); + this.textBox1.Location = new System.Drawing.Point(23, 19); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(78, 20); + this.textBox1.TabIndex = 0; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.AcroModeConfigVmBindingSource, "UpdateCommand", true)); + this.button1.Location = new System.Drawing.Point(278, 135); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(74, 23); + this.button1.TabIndex = 8; + this.button1.Text = "Update"; + this.button1.UseVisualStyleBackColor = true; + // + // textBox10 + // + this.textBox10.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AcroModeConfigVmBindingSource, "TransmitterFactor", true)); + this.textBox10.Location = new System.Drawing.Point(70, 128); + this.textBox10.Name = "textBox10"; + this.textBox10.Size = new System.Drawing.Size(78, 20); + this.textBox10.TabIndex = 6; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(13, 130); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(55, 13); + this.label10.TabIndex = 6; + this.label10.Text = "Tx Factor:"; + // + // AcroConfigView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label10); + this.Controls.Add(this.textBox10); + this.Controls.Add(this.button2); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.button1); + this.Name = "AcroConfigView"; + this.Size = new System.Drawing.Size(355, 161); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.AcroModeConfigVmBindingSource)).EndInit(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button2; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox textBox7; + private System.Windows.Forms.TextBox textBox8; + private System.Windows.Forms.TextBox textBox9; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.TextBox textBox6; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox textBox10; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.BindingSource AcroModeConfigVmBindingSource; + } +} diff --git a/Configurator/Configurator.Net/Views/AcroConfigView.cs b/Configurator/Configurator.Net/Views/AcroConfigView.cs new file mode 100644 index 0000000000..72b309142f --- /dev/null +++ b/Configurator/Configurator.Net/Views/AcroConfigView.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class AcroConfigView : AcroControlDesignable + { + public AcroConfigView() + { + InitializeComponent(); + BindButtons(); + } + + public override void SetDataContext(AcroModeConfigVm model) + { + AcroModeConfigVmBindingSource.DataSource = model; + } + + } + + // Required for VS2008 designer. No functional value + public class AcroControlDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/AcroConfigView.resx b/Configurator/Configurator.Net/Views/AcroConfigView.resx new file mode 100644 index 0000000000..d2abff4270 --- /dev/null +++ b/Configurator/Configurator.Net/Views/AcroConfigView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.Designer.cs b/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.Designer.cs new file mode 100644 index 0000000000..485a19182a --- /dev/null +++ b/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.Designer.cs @@ -0,0 +1,154 @@ +namespace ArducopterConfigurator.Views +{ + partial class AltitudeHoldConfigView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.AltitudeHoldConfigBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.AltitudeHoldConfigBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(11, 67); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(15, 13); + this.label4.TabIndex = 16; + this.label4.Text = "D"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(11, 41); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(10, 13); + this.label5.TabIndex = 15; + this.label5.Text = "I"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(11, 15); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(14, 13); + this.label6.TabIndex = 14; + this.label6.Text = "P"; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AltitudeHoldConfigBindingSource, "D", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.textBox4.Location = new System.Drawing.Point(27, 64); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(78, 20); + this.textBox4.TabIndex = 13; + // + // AltitudeHoldConfigBindingSource + // + this.AltitudeHoldConfigBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.AltitudeHoldConfigVm); + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AltitudeHoldConfigBindingSource, "I", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.textBox5.Location = new System.Drawing.Point(27, 38); + this.textBox5.Name = "textBox5"; + this.textBox5.Size = new System.Drawing.Size(78, 20); + this.textBox5.TabIndex = 12; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.AltitudeHoldConfigBindingSource, "P", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.textBox6.Location = new System.Drawing.Point(27, 12); + this.textBox6.Name = "textBox6"; + this.textBox6.Size = new System.Drawing.Size(78, 20); + this.textBox6.TabIndex = 11; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.AltitudeHoldConfigBindingSource, "RefreshCommand", true)); + this.button2.Location = new System.Drawing.Point(119, 96); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(74, 23); + this.button2.TabIndex = 18; + this.button2.Text = "Refresh"; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.AltitudeHoldConfigBindingSource, "UpdateCommand", true)); + this.button1.Location = new System.Drawing.Point(199, 96); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(74, 23); + this.button1.TabIndex = 17; + this.button1.Text = "Update"; + this.button1.UseVisualStyleBackColor = true; + // + // AltitudeHoldConfigView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.label4); + this.Controls.Add(this.label5); + this.Controls.Add(this.label6); + this.Controls.Add(this.textBox4); + this.Controls.Add(this.textBox5); + this.Controls.Add(this.textBox6); + this.Name = "AltitudeHoldConfigView"; + this.Size = new System.Drawing.Size(276, 122); + ((System.ComponentModel.ISupportInitialize)(this.AltitudeHoldConfigBindingSource)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.TextBox textBox6; + private System.Windows.Forms.BindingSource AltitudeHoldConfigBindingSource; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + + } +} diff --git a/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.cs b/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.cs new file mode 100644 index 0000000000..afcfd7ae81 --- /dev/null +++ b/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class AltitudeHoldConfigView : AltitudeControlDesignable + { + public AltitudeHoldConfigView() + { + InitializeComponent(); + BindButtons(); + } + + public override void SetDataContext(AltitudeHoldConfigVm model) + { + AltitudeHoldConfigBindingSource.DataSource = model; + } + } + + // Required for VS2008 designer. No functional value + public class AltitudeControlDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.resx b/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.resx new file mode 100644 index 0000000000..c879c719ff --- /dev/null +++ b/Configurator/Configurator.Net/Views/AltitudeHoldConfigView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/CalibrationView.Designer.cs b/Configurator/Configurator.Net/Views/CalibrationView.Designer.cs new file mode 100644 index 0000000000..cbba61eabd --- /dev/null +++ b/Configurator/Configurator.Net/Views/CalibrationView.Designer.cs @@ -0,0 +1,251 @@ +namespace ArducopterConfigurator.Views +{ + partial class CalibrationView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.calibrationOffsetsDataVmBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.label2 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.calibrationOffsetsDataVmBindingSource)).BeginInit(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.textBox3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.textBox2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.textBox1); + this.groupBox1.Location = new System.Drawing.Point(3, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(141, 107); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Gyro Offset"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(6, 84); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(28, 13); + this.label3.TabIndex = 5; + this.label3.Text = "Yaw"; + // + // textBox3 + // + this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.calibrationOffsetsDataVmBindingSource, "GyroYawOffset", true)); + this.textBox3.Location = new System.Drawing.Point(59, 77); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(71, 20); + this.textBox3.TabIndex = 4; + // + // calibrationOffsetsDataVmBindingSource + // + this.calibrationOffsetsDataVmBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.CalibrationOffsetsDataVm); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 58); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(31, 13); + this.label2.TabIndex = 3; + this.label2.Text = "Pitch"; + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.calibrationOffsetsDataVmBindingSource, "GyroPitchOffset", true)); + this.textBox2.Location = new System.Drawing.Point(59, 51); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(71, 20); + this.textBox2.TabIndex = 2; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 32); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(25, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Roll"; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.calibrationOffsetsDataVmBindingSource, "GyroRollOffset", true)); + this.textBox1.Location = new System.Drawing.Point(59, 25); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(71, 20); + this.textBox1.TabIndex = 0; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 84); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(14, 13); + this.label4.TabIndex = 5; + this.label4.Text = "Z"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.textBox4); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.textBox5); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Controls.Add(this.textBox6); + this.groupBox2.Location = new System.Drawing.Point(150, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(141, 107); + this.groupBox2.TabIndex = 6; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Accel Offset"; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.calibrationOffsetsDataVmBindingSource, "AccelZOffset", true)); + this.textBox4.Location = new System.Drawing.Point(59, 77); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(71, 20); + this.textBox4.TabIndex = 4; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(6, 58); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(31, 13); + this.label5.TabIndex = 3; + this.label5.Text = "Pitch"; + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.calibrationOffsetsDataVmBindingSource, "AccelPitchOffset", true)); + this.textBox5.Location = new System.Drawing.Point(59, 51); + this.textBox5.Name = "textBox5"; + this.textBox5.Size = new System.Drawing.Size(71, 20); + this.textBox5.TabIndex = 2; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 32); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(25, 13); + this.label6.TabIndex = 1; + this.label6.Text = "Roll"; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.calibrationOffsetsDataVmBindingSource, "AccelRollOffset", true)); + this.textBox6.Location = new System.Drawing.Point(59, 25); + this.textBox6.Name = "textBox6"; + this.textBox6.Size = new System.Drawing.Size(71, 20); + this.textBox6.TabIndex = 0; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.calibrationOffsetsDataVmBindingSource, "RefreshCommand", true)); + this.button2.Location = new System.Drawing.Point(143, 117); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(74, 23); + this.button2.TabIndex = 14; + this.button2.Text = "Refresh"; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.calibrationOffsetsDataVmBindingSource, "UpdateCommand", true)); + this.button1.Location = new System.Drawing.Point(223, 117); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(74, 23); + this.button1.TabIndex = 13; + this.button1.Text = "Update"; + this.button1.UseVisualStyleBackColor = true; + // + // CalibrationView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Name = "CalibrationView"; + this.Size = new System.Drawing.Size(300, 143); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.calibrationOffsetsDataVmBindingSource)).EndInit(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBox6; + private System.Windows.Forms.BindingSource calibrationOffsetsDataVmBindingSource; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + } +} diff --git a/Configurator/Configurator.Net/Views/CalibrationView.cs b/Configurator/Configurator.Net/Views/CalibrationView.cs new file mode 100644 index 0000000000..bba8c674b4 --- /dev/null +++ b/Configurator/Configurator.Net/Views/CalibrationView.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class CalibrationView : CalibrationViewDesignable + { + public CalibrationView() + { + InitializeComponent(); + BindButtons(); + } + + public override void SetDataContext(CalibrationOffsetsDataVm model) + { + calibrationOffsetsDataVmBindingSource.DataSource = model; + } + } + + // Required for VS2008 designer. No functional value + public class CalibrationViewDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/CalibrationView.resx b/Configurator/Configurator.Net/Views/CalibrationView.resx new file mode 100644 index 0000000000..29d67c743d --- /dev/null +++ b/Configurator/Configurator.Net/Views/CalibrationView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs b/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs new file mode 100644 index 0000000000..2a72e3d57d --- /dev/null +++ b/Configurator/Configurator.Net/Views/FlightDataView.Designer.cs @@ -0,0 +1,442 @@ +namespace ArducopterConfigurator.views +{ + partial class FlightDataView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.label5 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.progressBar2 = new System.Windows.Forms.ProgressBar(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.textBox7 = new System.Windows.Forms.TextBox(); + this.progressBar3 = new System.Windows.Forms.ProgressBar(); + this.FlightDataVmBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.verticalProgressBar8 = new ArducopterConfigurator.VerticalProgressBar(); + this.verticalProgressBar6 = new ArducopterConfigurator.VerticalProgressBar(); + this.verticalProgressBar5 = new ArducopterConfigurator.VerticalProgressBar(); + this.verticalProgressBar4 = new ArducopterConfigurator.VerticalProgressBar(); + this.verticalProgressBar3 = new ArducopterConfigurator.VerticalProgressBar(); + this.verticalProgressBar2 = new ArducopterConfigurator.VerticalProgressBar(); + this.verticalProgressBar1 = new ArducopterConfigurator.VerticalProgressBar(); + this.textBox8 = new System.Windows.Forms.TextBox(); + this.textBox9 = new System.Windows.Forms.TextBox(); + this.textBox10 = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.FlightDataVmBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 138); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(25, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Left"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(68, 138); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(31, 13); + this.label2.TabIndex = 3; + this.label2.Text = "Front"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(124, 138); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(30, 13); + this.label3.TabIndex = 5; + this.label3.Text = "Rear"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(176, 138); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(32, 13); + this.label4.TabIndex = 7; + this.label4.Text = "Right"; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "MotorLeft", true, System.Windows.Forms.DataSourceUpdateMode.OnValidation, null, "N0")); + this.textBox1.Location = new System.Drawing.Point(2, 247); + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(47, 20); + this.textBox1.TabIndex = 8; + // + // progressBar1 + // + this.progressBar1.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroRoll", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + this.progressBar1.Location = new System.Drawing.Point(12, 25); + this.progressBar1.Maximum = 1000; + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(100, 23); + this.progressBar1.TabIndex = 9; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(9, 9); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(50, 13); + this.label5.TabIndex = 10; + this.label5.Text = "Roll Gyro"; + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "GyroRoll", true)); + this.textBox2.Location = new System.Drawing.Point(124, 28); + this.textBox2.Name = "textBox2"; + this.textBox2.ReadOnly = true; + this.textBox2.Size = new System.Drawing.Size(47, 20); + this.textBox2.TabIndex = 12; + // + // 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.Name = "textBox3"; + this.textBox3.ReadOnly = true; + this.textBox3.Size = new System.Drawing.Size(47, 20); + this.textBox3.TabIndex = 13; + // + // progressBar2 + // + this.progressBar2.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelRoll", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + this.progressBar2.Location = new System.Drawing.Point(12, 68); + this.progressBar2.Maximum = 1000; + this.progressBar2.Name = "progressBar2"; + this.progressBar2.Size = new System.Drawing.Size(100, 23); + this.progressBar2.TabIndex = 14; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(9, 52); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(57, 13); + this.label6.TabIndex = 15; + this.label6.Text = "Roll Accell"; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "GyroPitch", true, System.Windows.Forms.DataSourceUpdateMode.Never, null, "N0")); + this.textBox4.Location = new System.Drawing.Point(187, 109); + this.textBox4.Name = "textBox4"; + this.textBox4.ReadOnly = true; + this.textBox4.Size = new System.Drawing.Size(47, 20); + this.textBox4.TabIndex = 17; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(184, 5); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(56, 13); + this.label7.TabIndex = 18; + this.label7.Text = "Pitch Gyro"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(244, 5); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(61, 13); + this.label8.TabIndex = 21; + this.label8.Text = "Pitch Accel"; + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "AccelPitch", true, System.Windows.Forms.DataSourceUpdateMode.Never, null, "N0")); + this.textBox5.Location = new System.Drawing.Point(247, 109); + this.textBox5.Name = "textBox5"; + this.textBox5.ReadOnly = true; + this.textBox5.Size = new System.Drawing.Size(47, 20); + this.textBox5.TabIndex = 20; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(231, 141); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(53, 13); + this.label9.TabIndex = 27; + this.label9.Text = "Yaw Gyro"; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "GyroYaw", true, System.Windows.Forms.DataSourceUpdateMode.Never, null, "N0")); + this.textBox6.Location = new System.Drawing.Point(340, 157); + this.textBox6.Name = "textBox6"; + this.textBox6.ReadOnly = true; + this.textBox6.Size = new System.Drawing.Size(47, 20); + this.textBox6.TabIndex = 26; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(340, 5); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(44, 13); + this.label10.TabIndex = 24; + this.label10.Text = "Accel Z"; + // + // textBox7 + // + this.textBox7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "AccelZ", true, System.Windows.Forms.DataSourceUpdateMode.Never, null, "N0")); + this.textBox7.Location = new System.Drawing.Point(343, 109); + this.textBox7.Name = "textBox7"; + this.textBox7.ReadOnly = true; + this.textBox7.Size = new System.Drawing.Size(47, 20); + this.textBox7.TabIndex = 23; + // + // 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; + // + // FlightDataVmBindingSource + // + this.FlightDataVmBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.FlightDataVm); + // + // verticalProgressBar8 + // + this.verticalProgressBar8.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "AccelZ", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + 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.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; + // + // verticalProgressBar5 + // + this.verticalProgressBar5.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "GyroPitch", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.verticalProgressBar5.Location = new System.Drawing.Point(198, 21); + this.verticalProgressBar5.Maximum = 1000; + this.verticalProgressBar5.Name = "verticalProgressBar5"; + this.verticalProgressBar5.Size = new System.Drawing.Size(24, 82); + this.verticalProgressBar5.Step = 1; + this.verticalProgressBar5.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.verticalProgressBar5.TabIndex = 16; + this.verticalProgressBar5.Value = 500; + // + // verticalProgressBar4 + // + this.verticalProgressBar4.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.FlightDataVmBindingSource, "MotorRight", 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.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.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.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)); + this.textBox8.Location = new System.Drawing.Point(55, 247); + this.textBox8.Name = "textBox8"; + this.textBox8.ReadOnly = true; + this.textBox8.Size = new System.Drawing.Size(47, 20); + this.textBox8.TabIndex = 29; + // + // textBox9 + // + this.textBox9.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "MotorRear", true)); + this.textBox9.Location = new System.Drawing.Point(108, 247); + this.textBox9.Name = "textBox9"; + this.textBox9.ReadOnly = true; + this.textBox9.Size = new System.Drawing.Size(47, 20); + this.textBox9.TabIndex = 30; + // + // textBox10 + // + this.textBox10.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.FlightDataVmBindingSource, "MotorRight", true)); + this.textBox10.Location = new System.Drawing.Point(161, 247); + this.textBox10.Name = "textBox10"; + this.textBox10.ReadOnly = true; + this.textBox10.Size = new System.Drawing.Size(47, 20); + this.textBox10.TabIndex = 31; + // + // FlightDataView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + 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.verticalProgressBar5); + this.Controls.Add(this.label6); + this.Controls.Add(this.progressBar2); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.label5); + this.Controls.Add(this.progressBar1); + 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); + ((System.ComponentModel.ISupportInitialize)(this.FlightDataVmBindingSource)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.BindingSource FlightDataVmBindingSource; + private VerticalProgressBar verticalProgressBar1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private VerticalProgressBar verticalProgressBar2; + private System.Windows.Forms.Label label3; + private VerticalProgressBar verticalProgressBar3; + private System.Windows.Forms.Label label4; + private VerticalProgressBar verticalProgressBar4; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.ProgressBar progressBar2; + private System.Windows.Forms.Label label6; + private VerticalProgressBar verticalProgressBar5; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox textBox5; + private VerticalProgressBar verticalProgressBar6; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox textBox6; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox textBox7; + private VerticalProgressBar verticalProgressBar8; + private System.Windows.Forms.ProgressBar progressBar3; + private System.Windows.Forms.TextBox textBox8; + private System.Windows.Forms.TextBox textBox9; + private System.Windows.Forms.TextBox textBox10; + } +} diff --git a/Configurator/Configurator.Net/Views/FlightDataView.cs b/Configurator/Configurator.Net/Views/FlightDataView.cs new file mode 100644 index 0000000000..17a9830df6 --- /dev/null +++ b/Configurator/Configurator.Net/Views/FlightDataView.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; +using ArducopterConfigurator.Views; + +namespace ArducopterConfigurator.views +{ + public partial class FlightDataView : FlightDataViewDesignable + { + public FlightDataView() + { + InitializeComponent(); + } + + public override void SetDataContext(FlightDataVm model) + { + FlightDataVmBindingSource.DataSource = model; + } + + + } + // Required for VS2008 designer. No functional value + public class FlightDataViewDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/FlightDataView.resx b/Configurator/Configurator.Net/Views/FlightDataView.resx new file mode 100644 index 0000000000..451adcab1f --- /dev/null +++ b/Configurator/Configurator.Net/Views/FlightDataView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 20, 28 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/MotorCommandsView.Designer.cs b/Configurator/Configurator.Net/Views/MotorCommandsView.Designer.cs new file mode 100644 index 0000000000..2818225715 --- /dev/null +++ b/Configurator/Configurator.Net/Views/MotorCommandsView.Designer.cs @@ -0,0 +1,147 @@ +namespace ArducopterConfigurator.Views +{ + partial class MotorCommandsView + { + /// + /// 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.trckBarLeft = new System.Windows.Forms.TrackBar(); + this.btnStop = new System.Windows.Forms.Button(); + this.btnSend = new System.Windows.Forms.Button(); + this.trackBar1 = new System.Windows.Forms.TrackBar(); + this.trackBar2 = new System.Windows.Forms.TrackBar(); + this.trackBar3 = new System.Windows.Forms.TrackBar(); + ((System.ComponentModel.ISupportInitialize)(this.trckBarLeft)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit(); + this.SuspendLayout(); + // + // trckBarLeft + // + this.trckBarLeft.LargeChange = 50; + this.trckBarLeft.Location = new System.Drawing.Point(3, 52); + this.trckBarLeft.Maximum = 1500; + this.trckBarLeft.Minimum = 1000; + this.trckBarLeft.Name = "trckBarLeft"; + this.trckBarLeft.Orientation = System.Windows.Forms.Orientation.Vertical; + this.trckBarLeft.Size = new System.Drawing.Size(45, 104); + this.trckBarLeft.SmallChange = 10; + this.trckBarLeft.TabIndex = 0; + this.trckBarLeft.TickFrequency = 50; + this.trckBarLeft.Value = 1000; + // + // btnStop + // + this.btnStop.Location = new System.Drawing.Point(54, 52); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(107, 92); + this.btnStop.TabIndex = 4; + this.btnStop.Text = "Stop"; + this.btnStop.UseVisualStyleBackColor = true; + // + // btnSend + // + this.btnSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnSend.Enabled = false; + this.btnSend.Location = new System.Drawing.Point(202, 203); + this.btnSend.Name = "btnSend"; + this.btnSend.Size = new System.Drawing.Size(57, 27); + this.btnSend.TabIndex = 5; + this.btnSend.Text = "Send"; + this.btnSend.UseVisualStyleBackColor = true; + // + // trackBar1 + // + this.trackBar1.LargeChange = 50; + this.trackBar1.Location = new System.Drawing.Point(180, 52); + this.trackBar1.Maximum = 1500; + this.trackBar1.Minimum = 1000; + this.trackBar1.Name = "trackBar1"; + this.trackBar1.Orientation = System.Windows.Forms.Orientation.Vertical; + this.trackBar1.Size = new System.Drawing.Size(45, 104); + this.trackBar1.SmallChange = 10; + this.trackBar1.TabIndex = 6; + this.trackBar1.TickFrequency = 50; + this.trackBar1.Value = 1000; + // + // trackBar2 + // + this.trackBar2.LargeChange = 50; + this.trackBar2.Location = new System.Drawing.Point(57, 150); + this.trackBar2.Maximum = 1500; + this.trackBar2.Minimum = 1000; + this.trackBar2.Name = "trackBar2"; + this.trackBar2.Size = new System.Drawing.Size(104, 45); + this.trackBar2.SmallChange = 10; + this.trackBar2.TabIndex = 7; + this.trackBar2.TickFrequency = 50; + this.trackBar2.Value = 1000; + // + // trackBar3 + // + this.trackBar3.LargeChange = 50; + this.trackBar3.Location = new System.Drawing.Point(54, 3); + this.trackBar3.Maximum = 1500; + this.trackBar3.Minimum = 1000; + this.trackBar3.Name = "trackBar3"; + this.trackBar3.Size = new System.Drawing.Size(104, 45); + this.trackBar3.SmallChange = 10; + this.trackBar3.TabIndex = 8; + this.trackBar3.TickFrequency = 50; + this.trackBar3.Value = 1000; + // + // MotorCommandsView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.trackBar3); + this.Controls.Add(this.trackBar2); + this.Controls.Add(this.trackBar1); + this.Controls.Add(this.btnSend); + this.Controls.Add(this.btnStop); + this.Controls.Add(this.trckBarLeft); + this.Name = "MotorCommandsView"; + this.Size = new System.Drawing.Size(262, 233); + ((System.ComponentModel.ISupportInitialize)(this.trckBarLeft)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TrackBar trckBarLeft; + private System.Windows.Forms.Button btnStop; + private System.Windows.Forms.Button btnSend; + private System.Windows.Forms.TrackBar trackBar1; + private System.Windows.Forms.TrackBar trackBar2; + private System.Windows.Forms.TrackBar trackBar3; + } +} diff --git a/Configurator/Configurator.Net/Views/MotorCommandsView.cs b/Configurator/Configurator.Net/Views/MotorCommandsView.cs new file mode 100644 index 0000000000..168e06ab4f --- /dev/null +++ b/Configurator/Configurator.Net/Views/MotorCommandsView.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class MotorCommandsView : MotorCommandsViewDesignable + { + public MotorCommandsView() + { + InitializeComponent(); + } + + public override void SetDataContext(MotorCommandsVm model) + { + + } + + + } + // Required for VS2008 designer. No functional value + public class MotorCommandsViewDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/MotorCommandsView.resx b/Configurator/Configurator.Net/Views/MotorCommandsView.resx new file mode 100644 index 0000000000..ff31a6db56 --- /dev/null +++ b/Configurator/Configurator.Net/Views/MotorCommandsView.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/PositionHoldConfigView.Designer.cs b/Configurator/Configurator.Net/Views/PositionHoldConfigView.Designer.cs new file mode 100644 index 0000000000..5ac3bb7135 --- /dev/null +++ b/Configurator/Configurator.Net/Views/PositionHoldConfigView.Designer.cs @@ -0,0 +1,299 @@ +namespace ArducopterConfigurator.Views +{ + partial class PositionHoldConfigView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.PositionHoldConfigBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox7 = new System.Windows.Forms.TextBox(); + this.textBox8 = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.btnRefresh = new System.Windows.Forms.Button(); + this.btnUpdate = new System.Windows.Forms.Button(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PositionHoldConfigBindingSource)).BeginInit(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Controls.Add(this.textBox4); + this.groupBox2.Controls.Add(this.textBox5); + this.groupBox2.Controls.Add(this.textBox6); + this.groupBox2.Location = new System.Drawing.Point(117, 4); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(108, 101); + this.groupBox2.TabIndex = 12; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Pitch"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 74); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(15, 13); + this.label4.TabIndex = 5; + this.label4.Text = "D"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 48); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(10, 13); + this.label5.TabIndex = 4; + this.label5.Text = "I"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 22); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(14, 13); + this.label6.TabIndex = 3; + this.label6.Text = "P"; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "PitchD", true)); + this.textBox4.Location = new System.Drawing.Point(23, 71); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(78, 20); + this.textBox4.TabIndex = 2; + // + // PositionHoldConfigBindingSource + // + this.PositionHoldConfigBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.PositionHoldConfigVm); + this.PositionHoldConfigBindingSource.Sort = ""; + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "PitchI", true)); + this.textBox5.Location = new System.Drawing.Point(23, 45); + this.textBox5.Name = "textBox5"; + this.textBox5.Size = new System.Drawing.Size(78, 20); + this.textBox5.TabIndex = 1; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "PitchP", true)); + this.textBox6.Location = new System.Drawing.Point(23, 19); + this.textBox6.Name = "textBox6"; + this.textBox6.Size = new System.Drawing.Size(78, 20); + this.textBox6.TabIndex = 0; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.label2); + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Controls.Add(this.textBox3); + this.groupBox3.Controls.Add(this.textBox2); + this.groupBox3.Controls.Add(this.textBox1); + this.groupBox3.Location = new System.Drawing.Point(3, 3); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(108, 101); + this.groupBox3.TabIndex = 11; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Roll"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 74); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(15, 13); + this.label3.TabIndex = 5; + this.label3.Text = "D"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 48); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(10, 13); + this.label2.TabIndex = 4; + this.label2.Text = "I"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 22); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(14, 13); + this.label1.TabIndex = 3; + this.label1.Text = "P"; + // + // textBox3 + // + this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "RollD", true)); + this.textBox3.Location = new System.Drawing.Point(23, 71); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(78, 20); + this.textBox3.TabIndex = 2; + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "RollI", true)); + this.textBox2.Location = new System.Drawing.Point(23, 45); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(78, 20); + this.textBox2.TabIndex = 1; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "RollP", true)); + this.textBox1.Location = new System.Drawing.Point(23, 19); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(78, 20); + this.textBox1.TabIndex = 0; + // + // textBox7 + // + this.textBox7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "MaximumAngle", true)); + this.textBox7.Location = new System.Drawing.Point(238, 22); + this.textBox7.Name = "textBox7"; + this.textBox7.Size = new System.Drawing.Size(100, 20); + this.textBox7.TabIndex = 13; + // + // textBox8 + // + this.textBox8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.PositionHoldConfigBindingSource, "GeoCorrectionFactor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.textBox8.Location = new System.Drawing.Point(238, 78); + this.textBox8.Name = "textBox8"; + this.textBox8.Size = new System.Drawing.Size(100, 20); + this.textBox8.TabIndex = 14; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(251, 6); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(60, 13); + this.label7.TabIndex = 15; + this.label7.Text = "Max Angle:"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(235, 62); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(114, 13); + this.label8.TabIndex = 16; + this.label8.Text = "Geo Correction Factor:"; + // + // btnRefresh + // + this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnRefresh.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.PositionHoldConfigBindingSource, "RefreshCommand", true)); + this.btnRefresh.Location = new System.Drawing.Point(195, 126); + this.btnRefresh.Name = "btnRefresh"; + this.btnRefresh.Size = new System.Drawing.Size(74, 23); + this.btnRefresh.TabIndex = 18; + this.btnRefresh.Text = "Refresh"; + this.btnRefresh.UseVisualStyleBackColor = true; + // + // btnUpdate + // + this.btnUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnUpdate.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.PositionHoldConfigBindingSource, "UpdateCommand", true)); + this.btnUpdate.Location = new System.Drawing.Point(275, 126); + this.btnUpdate.Name = "btnUpdate"; + this.btnUpdate.Size = new System.Drawing.Size(74, 23); + this.btnUpdate.TabIndex = 17; + this.btnUpdate.Text = "Update"; + this.btnUpdate.UseVisualStyleBackColor = true; + // + // PositionHoldConfigView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.btnRefresh); + this.Controls.Add(this.btnUpdate); + this.Controls.Add(this.label8); + this.Controls.Add(this.label7); + this.Controls.Add(this.textBox8); + this.Controls.Add(this.textBox7); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox3); + this.Name = "PositionHoldConfigView"; + this.Size = new System.Drawing.Size(352, 152); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PositionHoldConfigBindingSource)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.TextBox textBox6; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox7; + private System.Windows.Forms.TextBox textBox8; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.BindingSource PositionHoldConfigBindingSource; + private System.Windows.Forms.Button btnRefresh; + private System.Windows.Forms.Button btnUpdate; + } +} diff --git a/Configurator/Configurator.Net/Views/PositionHoldConfigView.cs b/Configurator/Configurator.Net/Views/PositionHoldConfigView.cs new file mode 100644 index 0000000000..fca47a7df8 --- /dev/null +++ b/Configurator/Configurator.Net/Views/PositionHoldConfigView.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class PositionHoldConfigView : PositionHoldConfigViewDesignable + { + public PositionHoldConfigView() + { + InitializeComponent(); + BindButtons(); + } + + public override void SetDataContext(PositionHoldConfigVm model) + { + PositionHoldConfigBindingSource.DataSource = model; + _vm = model; + } + } + // Required for VS2008 designer. No functional value + public class PositionHoldConfigViewDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/PositionHoldConfigView.resx b/Configurator/Configurator.Net/Views/PositionHoldConfigView.resx new file mode 100644 index 0000000000..f2aba133da --- /dev/null +++ b/Configurator/Configurator.Net/Views/PositionHoldConfigView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/SerialMonitorView.Designer.cs b/Configurator/Configurator.Net/Views/SerialMonitorView.Designer.cs new file mode 100644 index 0000000000..bcbc3a5d82 --- /dev/null +++ b/Configurator/Configurator.Net/Views/SerialMonitorView.Designer.cs @@ -0,0 +1,115 @@ +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator +{ + partial class SerialMonitorView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.txtSend = new System.Windows.Forms.TextBox(); + this.txtBoxRx = new System.Windows.Forms.TextBox(); + this.serialMonitorVmBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.txtBoxTx = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.serialMonitorVmBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // txtSend + // + this.txtSend.Location = new System.Drawing.Point(-167, 167); + this.txtSend.Name = "txtSend"; + this.txtSend.Size = new System.Drawing.Size(10, 20); + this.txtSend.TabIndex = 4; + // + // txtBoxRx + // + this.txtBoxRx.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.txtBoxRx.CausesValidation = false; + this.txtBoxRx.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.serialMonitorVmBindingSource, "ReceviedText", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + this.txtBoxRx.Location = new System.Drawing.Point(3, 3); + this.txtBoxRx.Multiline = true; + this.txtBoxRx.Name = "txtBoxRx"; + this.txtBoxRx.ReadOnly = true; + this.txtBoxRx.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtBoxRx.Size = new System.Drawing.Size(469, 356); + this.txtBoxRx.TabIndex = 3; + // + // serialMonitorVmBindingSource + // + this.serialMonitorVmBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.SerialMonitorVm); + // + // txtBoxTx + // + this.txtBoxTx.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtBoxTx.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.serialMonitorVmBindingSource, "SendText", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.txtBoxTx.Location = new System.Drawing.Point(4, 365); + this.txtBoxTx.Name = "txtBoxTx"; + this.txtBoxTx.Size = new System.Drawing.Size(357, 20); + this.txtBoxTx.TabIndex = 5; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(367, 365); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(104, 23); + this.button1.TabIndex = 6; + this.button1.Text = "Send Command"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // SerialMonitorView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.Controls.Add(this.button1); + this.Controls.Add(this.txtBoxTx); + this.Controls.Add(this.txtSend); + this.Controls.Add(this.txtBoxRx); + this.Name = "SerialMonitorView"; + this.Size = new System.Drawing.Size(475, 388); + ((System.ComponentModel.ISupportInitialize)(this.serialMonitorVmBindingSource)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtSend; + private System.Windows.Forms.TextBox txtBoxRx; + private System.Windows.Forms.TextBox txtBoxTx; + private System.Windows.Forms.BindingSource serialMonitorVmBindingSource; + private System.Windows.Forms.Button button1; + } +} diff --git a/Configurator/Configurator.Net/Views/SerialMonitorView.cs b/Configurator/Configurator.Net/Views/SerialMonitorView.cs new file mode 100644 index 0000000000..f91a600613 --- /dev/null +++ b/Configurator/Configurator.Net/Views/SerialMonitorView.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator +{ + public partial class SerialMonitorView : UserControl, IView + { + private IPresentationModel _vm; + + public SerialMonitorView() + { + InitializeComponent(); + } + + public void SetDataContext(SerialMonitorVm mode) + { + serialMonitorVmBindingSource.DataSource = mode; + _vm = mode; + } + + + public Control Control + { + get { return this; } + } + + private void button1_Click(object sender, EventArgs e) + { + (_vm as SerialMonitorVm).SendTextCommand(); + } + } +} diff --git a/Configurator/Configurator.Net/Views/SerialMonitorView.resx b/Configurator/Configurator.Net/Views/SerialMonitorView.resx new file mode 100644 index 0000000000..2113df4e8f --- /dev/null +++ b/Configurator/Configurator.Net/Views/SerialMonitorView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/StableConfigView.Designer.cs b/Configurator/Configurator.Net/Views/StableConfigView.Designer.cs new file mode 100644 index 0000000000..8ebd061f9d --- /dev/null +++ b/Configurator/Configurator.Net/Views/StableConfigView.Designer.cs @@ -0,0 +1,350 @@ +namespace ArducopterConfigurator.Views +{ + partial class StableConfigView + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.button2 = new System.Windows.Forms.Button(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.textBox7 = new System.Windows.Forms.TextBox(); + this.StableModeConfigVmBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.textBox8 = new System.Windows.Forms.TextBox(); + this.textBox9 = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.textBox4 = new System.Windows.Forms.TextBox(); + this.textBox5 = new System.Windows.Forms.TextBox(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.StableModeConfigVmBindingSource)).BeginInit(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.StableModeConfigVmBindingSource, "RefreshCommand", true)); + this.button2.Location = new System.Drawing.Point(187, 134); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(74, 23); + this.button2.TabIndex = 12; + this.button2.Text = "Refresh"; + this.button2.UseVisualStyleBackColor = true; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label7); + this.groupBox4.Controls.Add(this.label8); + this.groupBox4.Controls.Add(this.label9); + this.groupBox4.Controls.Add(this.textBox7); + this.groupBox4.Controls.Add(this.textBox8); + this.groupBox4.Controls.Add(this.textBox9); + this.groupBox4.Location = new System.Drawing.Point(234, 6); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(108, 101); + this.groupBox4.TabIndex = 11; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Yaw"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(7, 74); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(15, 13); + this.label7.TabIndex = 5; + this.label7.Text = "D"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(7, 48); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(10, 13); + this.label8.TabIndex = 4; + this.label8.Text = "I"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(7, 22); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(14, 13); + this.label9.TabIndex = 3; + this.label9.Text = "P"; + // + // textBox7 + // + this.textBox7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "YawD", true)); + this.textBox7.Location = new System.Drawing.Point(23, 71); + this.textBox7.Name = "textBox7"; + this.textBox7.Size = new System.Drawing.Size(78, 20); + this.textBox7.TabIndex = 2; + // + // StableModeConfigVmBindingSource + // + this.StableModeConfigVmBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.StableModeConfigVm); + // + // textBox8 + // + this.textBox8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "YawI", true)); + this.textBox8.Location = new System.Drawing.Point(23, 45); + this.textBox8.Name = "textBox8"; + this.textBox8.Size = new System.Drawing.Size(78, 20); + this.textBox8.TabIndex = 1; + // + // textBox9 + // + this.textBox9.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "YawP", true)); + this.textBox9.Location = new System.Drawing.Point(23, 19); + this.textBox9.Name = "textBox9"; + this.textBox9.Size = new System.Drawing.Size(78, 20); + this.textBox9.TabIndex = 0; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Controls.Add(this.textBox4); + this.groupBox2.Controls.Add(this.textBox5); + this.groupBox2.Controls.Add(this.textBox6); + this.groupBox2.Location = new System.Drawing.Point(120, 6); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(108, 101); + this.groupBox2.TabIndex = 10; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Pitch"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(7, 74); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(15, 13); + this.label4.TabIndex = 5; + this.label4.Text = "D"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(7, 48); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(10, 13); + this.label5.TabIndex = 4; + this.label5.Text = "I"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(7, 22); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(14, 13); + this.label6.TabIndex = 3; + this.label6.Text = "P"; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "PitchD", true)); + this.textBox4.Location = new System.Drawing.Point(23, 71); + this.textBox4.Name = "textBox4"; + this.textBox4.Size = new System.Drawing.Size(78, 20); + this.textBox4.TabIndex = 2; + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "PitchI", true)); + this.textBox5.Location = new System.Drawing.Point(23, 45); + this.textBox5.Name = "textBox5"; + this.textBox5.Size = new System.Drawing.Size(78, 20); + this.textBox5.TabIndex = 1; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "PitchP", true)); + this.textBox6.Location = new System.Drawing.Point(23, 19); + this.textBox6.Name = "textBox6"; + this.textBox6.Size = new System.Drawing.Size(78, 20); + this.textBox6.TabIndex = 0; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.label2); + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Controls.Add(this.textBox3); + this.groupBox3.Controls.Add(this.textBox2); + this.groupBox3.Controls.Add(this.textBox1); + this.groupBox3.Location = new System.Drawing.Point(6, 5); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(108, 101); + this.groupBox3.TabIndex = 9; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Roll"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(7, 74); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(15, 13); + this.label3.TabIndex = 5; + this.label3.Text = "D"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(7, 48); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(10, 13); + this.label2.TabIndex = 4; + this.label2.Text = "I"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(7, 22); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(14, 13); + this.label1.TabIndex = 3; + this.label1.Text = "P"; + // + // textBox3 + // + this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "RollD", true)); + this.textBox3.Location = new System.Drawing.Point(23, 71); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(78, 20); + this.textBox3.TabIndex = 2; + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "RollI", true)); + this.textBox2.Location = new System.Drawing.Point(23, 45); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(78, 20); + this.textBox2.TabIndex = 1; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.StableModeConfigVmBindingSource, "RollP", true)); + this.textBox1.Location = new System.Drawing.Point(23, 19); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(78, 20); + this.textBox1.TabIndex = 0; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.StableModeConfigVmBindingSource, "UpdateCommand", true)); + this.button1.Location = new System.Drawing.Point(267, 134); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(74, 23); + this.button1.TabIndex = 8; + this.button1.Text = "Update"; + this.button1.UseVisualStyleBackColor = true; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.DataBindings.Add(new System.Windows.Forms.Binding("Checked", this.StableModeConfigVmBindingSource, "MagnetometerEnable", true)); + this.checkBox1.Location = new System.Drawing.Point(14, 112); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(100, 17); + this.checkBox1.TabIndex = 13; + this.checkBox1.Text = "Magnetomoeter"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // StableConfigView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.checkBox1); + this.Controls.Add(this.button2); + this.Controls.Add(this.groupBox4); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.button1); + this.Name = "StableConfigView"; + this.Size = new System.Drawing.Size(344, 160); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.StableModeConfigVmBindingSource)).EndInit(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button2; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox textBox7; + private System.Windows.Forms.TextBox textBox8; + private System.Windows.Forms.TextBox textBox9; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textBox4; + private System.Windows.Forms.TextBox textBox5; + private System.Windows.Forms.TextBox textBox6; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.BindingSource StableModeConfigVmBindingSource; + private System.Windows.Forms.CheckBox checkBox1; + } +} diff --git a/Configurator/Configurator.Net/Views/StableConfigView.cs b/Configurator/Configurator.Net/Views/StableConfigView.cs new file mode 100644 index 0000000000..b5986d51b3 --- /dev/null +++ b/Configurator/Configurator.Net/Views/StableConfigView.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class StableConfigView : StableConfigViewDesignable + { + public StableConfigView() + { + InitializeComponent(); + BindButtons(); + } + + public override void SetDataContext(StableModeConfigVm model) + { + StableModeConfigVmBindingSource.DataSource = model; + } + + } + + // Required for VS2008 designer. No functional value + public class StableConfigViewDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/StableConfigView.resx b/Configurator/Configurator.Net/Views/StableConfigView.resx new file mode 100644 index 0000000000..78bfe5e21f --- /dev/null +++ b/Configurator/Configurator.Net/Views/StableConfigView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs b/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs new file mode 100644 index 0000000000..8e1534892f --- /dev/null +++ b/Configurator/Configurator.Net/Views/TransmitterChannelsView.Designer.cs @@ -0,0 +1,284 @@ +namespace ArducopterConfigurator.Views +{ + partial class TransmitterChannelsView + { + /// + /// 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.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.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(); + this.textBox3 = new System.Windows.Forms.TextBox(); + this.textBox4 = new System.Windows.Forms.TextBox(); + 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(); + ((System.ComponentModel.ISupportInitialize)(this.TransmitterChannelsBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(4, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(43, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Throttle"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(56, 11); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(31, 13); + this.label2.TabIndex = 3; + this.label2.Text = "Pitch"; + // + // progressBar3 + // + 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; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(171, 14); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(28, 13); + this.label9.TabIndex = 30; + this.label9.Text = "Yaw"; + // + // textBox6 + // + this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Yaw", true)); + this.textBox6.Location = new System.Drawing.Point(280, 30); + this.textBox6.Name = "textBox6"; + this.textBox6.ReadOnly = true; + 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; + this.label3.Location = new System.Drawing.Point(171, 64); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(25, 13); + this.label3.TabIndex = 33; + this.label3.Text = "Roll"; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Roll", true)); + this.textBox1.Location = new System.Drawing.Point(280, 80); + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(47, 20); + this.textBox1.TabIndex = 32; + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Throttle", true)); + this.textBox2.Location = new System.Drawing.Point(7, 147); + this.textBox2.Name = "textBox2"; + this.textBox2.ReadOnly = true; + this.textBox2.Size = new System.Drawing.Size(47, 20); + this.textBox2.TabIndex = 35; + // + // textBox3 + // + this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Pitch", true)); + this.textBox3.Location = new System.Drawing.Point(59, 147); + this.textBox3.Name = "textBox3"; + this.textBox3.ReadOnly = true; + this.textBox3.Size = new System.Drawing.Size(47, 20); + this.textBox3.TabIndex = 36; + // + // textBox4 + // + this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Mode", true)); + this.textBox4.Location = new System.Drawing.Point(137, 210); + this.textBox4.Name = "textBox4"; + this.textBox4.ReadOnly = true; + this.textBox4.Size = new System.Drawing.Size(47, 20); + this.textBox4.TabIndex = 39; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(141, 115); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(34, 13); + this.label4.TabIndex = 38; + this.label4.Text = "Mode"; + // + // textBox5 + // + this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.TransmitterChannelsBindingSource, "Aux", true)); + this.textBox5.Location = new System.Drawing.Point(197, 210); + this.textBox5.Name = "textBox5"; + this.textBox5.ReadOnly = true; + this.textBox5.Size = new System.Drawing.Size(47, 20); + this.textBox5.TabIndex = 42; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(201, 115); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(25, 13); + this.label5.TabIndex = 41; + this.label5.Text = "Aux"; + // + // TransmitterChannelsBindingSource + // + this.TransmitterChannelsBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.TransmitterChannelsVm); + // + // verticalProgressBar4 + // + 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; + // + // verticalProgressBar3 + // + 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; + // + // verticalProgressBar2 + // + 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; + // + // verticalProgressBar1 + // + 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; + // + // TransmitterChannelsView + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + 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(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #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; + } +} diff --git a/Configurator/Configurator.Net/Views/TransmitterChannelsView.cs b/Configurator/Configurator.Net/Views/TransmitterChannelsView.cs new file mode 100644 index 0000000000..f139b50d89 --- /dev/null +++ b/Configurator/Configurator.Net/Views/TransmitterChannelsView.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + public partial class TransmitterChannelsView : TransmitterChannelsViewDesignable + { + public TransmitterChannelsView() + { + InitializeComponent(); + } + + public override void SetDataContext(TransmitterChannelsVm model) + { + TransmitterChannelsBindingSource.DataSource = model; + } + + } + + // Required for VS2008 designer. No functional value + public class TransmitterChannelsViewDesignable : ViewCommon { } +} diff --git a/Configurator/Configurator.Net/Views/TransmitterChannelsView.resx b/Configurator/Configurator.Net/Views/TransmitterChannelsView.resx new file mode 100644 index 0000000000..240465f91c --- /dev/null +++ b/Configurator/Configurator.Net/Views/TransmitterChannelsView.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/Configurator/Configurator.Net/Views/ViewCommon.cs b/Configurator/Configurator.Net/Views/ViewCommon.cs new file mode 100644 index 0000000000..4f4288547f --- /dev/null +++ b/Configurator/Configurator.Net/Views/ViewCommon.cs @@ -0,0 +1,37 @@ +using System; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; + +namespace ArducopterConfigurator.Views +{ + // cannot be abstract due to vs2008 designer + public class ViewCommon : UserControl, IView where T : IPresentationModel + { + protected T _vm; + + public virtual void SetDataContext(T model) + { + } + + protected void BindButtons() + { + foreach (var c in this.Controls) + if (c is Button) + (c as Button).Click += btn_Click; + } + + protected void btn_Click(object sender, EventArgs e) + { + var cmd = (sender as Button).Tag as ICommand; + + if (cmd != null) + if (cmd.CanExecute(null)) + cmd.Execute(null); + } + + public Control Control + { + get { return this; } + } + } +} \ No newline at end of file diff --git a/Configurator/Configurator.Net/mainForm.Designer.cs b/Configurator/Configurator.Net/mainForm.Designer.cs new file mode 100644 index 0000000000..cf93dff5ce --- /dev/null +++ b/Configurator/Configurator.Net/mainForm.Designer.cs @@ -0,0 +1,157 @@ +namespace ArducopterConfigurator +{ + partial class mainForm + { + /// + /// 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 Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tabCtrlMonitorVms = new System.Windows.Forms.TabControl(); + this.mainVmBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.availablePortsBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.btnConnect = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.lblConnectionStatus = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.mainVmBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.availablePortsBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // tabCtrlMonitorVms + // + this.tabCtrlMonitorVms.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.tabCtrlMonitorVms.DataBindings.Add(new System.Windows.Forms.Binding("Enabled", this.mainVmBindingSource, "IsConnected", true, System.Windows.Forms.DataSourceUpdateMode.Never)); + this.tabCtrlMonitorVms.HotTrack = true; + this.tabCtrlMonitorVms.Location = new System.Drawing.Point(12, 10); + this.tabCtrlMonitorVms.Name = "tabCtrlMonitorVms"; + this.tabCtrlMonitorVms.SelectedIndex = 0; + this.tabCtrlMonitorVms.Size = new System.Drawing.Size(530, 396); + this.tabCtrlMonitorVms.TabIndex = 3; + this.tabCtrlMonitorVms.Selected += new System.Windows.Forms.TabControlEventHandler(this.tabCtrlConfigs_Selected); + // + // mainVmBindingSource + // + this.mainVmBindingSource.DataSource = typeof(ArducopterConfigurator.PresentationModels.MainVm); + // + // comboBox1 + // + this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mainVmBindingSource, "SelectedPort", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.comboBox1.DataSource = this.availablePortsBindingSource; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(12, 412); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(79, 21); + this.comboBox1.TabIndex = 5; + // + // availablePortsBindingSource + // + this.availablePortsBindingSource.DataMember = "AvailablePorts"; + this.availablePortsBindingSource.DataSource = this.mainVmBindingSource; + // + // btnConnect + // + this.btnConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnConnect.Cursor = System.Windows.Forms.Cursors.Arrow; + this.btnConnect.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.mainVmBindingSource, "ConnectCommand", true)); + this.btnConnect.Location = new System.Drawing.Point(139, 412); + this.btnConnect.Name = "btnConnect"; + this.btnConnect.Size = new System.Drawing.Size(70, 23); + this.btnConnect.TabIndex = 6; + this.btnConnect.Text = "Connect"; + this.btnConnect.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button1.Cursor = System.Windows.Forms.Cursors.Arrow; + this.button1.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.mainVmBindingSource, "DisconnectCommand", true)); + this.button1.Location = new System.Drawing.Point(215, 412); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(70, 23); + this.button1.TabIndex = 7; + this.button1.Text = "DisConnect"; + this.button1.UseVisualStyleBackColor = true; + // + // lblConnectionStatus + // + this.lblConnectionStatus.AutoSize = true; + this.lblConnectionStatus.Location = new System.Drawing.Point(307, 417); + this.lblConnectionStatus.Name = "lblConnectionStatus"; + this.lblConnectionStatus.Size = new System.Drawing.Size(35, 13); + this.lblConnectionStatus.TabIndex = 8; + this.lblConnectionStatus.Text = "label1"; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.button2.Cursor = System.Windows.Forms.Cursors.Arrow; + this.button2.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.mainVmBindingSource, "RefreshPortListCommand", true)); + this.button2.Location = new System.Drawing.Point(97, 410); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(23, 23); + this.button2.TabIndex = 9; + this.button2.Text = "R"; + this.button2.UseVisualStyleBackColor = true; + // + // mainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(554, 445); + this.Controls.Add(this.button2); + this.Controls.Add(this.lblConnectionStatus); + this.Controls.Add(this.button1); + this.Controls.Add(this.btnConnect); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.tabCtrlMonitorVms); + this.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.mainVmBindingSource, "Name", true)); + this.Name = "mainForm"; + this.Load += new System.EventHandler(this.MainFormLoaded); + this.SizeChanged += new System.EventHandler(this.mainForm_SizeChanged); + ((System.ComponentModel.ISupportInitialize)(this.mainVmBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.availablePortsBindingSource)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TabControl tabCtrlMonitorVms; + private System.Windows.Forms.BindingSource mainVmBindingSource; + private System.Windows.Forms.ComboBox comboBox1; + private System.Windows.Forms.Button btnConnect; + private System.Windows.Forms.BindingSource availablePortsBindingSource; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label lblConnectionStatus; + private System.Windows.Forms.Button button2; + } +} + diff --git a/Configurator/Configurator.Net/mainForm.cs b/Configurator/Configurator.Net/mainForm.cs new file mode 100644 index 0000000000..04112ec156 --- /dev/null +++ b/Configurator/Configurator.Net/mainForm.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Reflection; +using System.Windows.Forms; +using ArducopterConfigurator.PresentationModels; +using ArducopterConfigurator.views; +using ArducopterConfigurator.Views; + +namespace ArducopterConfigurator +{ + public partial class mainForm : Form, IView + { + private MainVm _vm; + + public mainForm(MainVm vm) + { + InitializeComponent(); + SetDataContext(vm); + } + + // IPresentationModel to IView map + private readonly Dictionary _viewMap = new Dictionary + { + {typeof (FlightDataVm), typeof (FlightDataView)}, + {typeof (TransmitterChannelsVm), typeof (TransmitterChannelsView)}, + {typeof (CalibrationOffsetsDataVm), typeof (CalibrationView)}, + {typeof (MotorCommandsVm), typeof (MotorCommandsView)}, + {typeof (AcroModeConfigVm), typeof (AcroConfigView)}, + {typeof (StableModeConfigVm), typeof (StableConfigView)}, + {typeof (PositionHoldConfigVm), typeof (PositionHoldConfigView)}, + {typeof (AltitudeHoldConfigVm), typeof (AltitudeHoldConfigView)}, + {typeof (SerialMonitorVm), typeof (SerialMonitorView)}, + }; + + + private Control CreateAndBindView(IPresentationModel model) + { + if (_viewMap.ContainsKey(model.GetType())) + { + var viewtype = _viewMap[model.GetType()]; + var view = Activator.CreateInstance(viewtype); + + var methodInfo = this.GetType().GetMethod("BindView"); + var closedBindViewMethod = methodInfo.MakeGenericMethod(model.GetType()); + return closedBindViewMethod.Invoke(this, new[] { model, view }) as Control; + } + return null; + } + + // called via reflection above to close the T + public Control BindView(T model, IView view) where T : IPresentationModel + { + view.SetDataContext(model); + return view.Control; + } + + protected void BindButtons(MainVm vm) + { + foreach (var c in this.Controls) + if (c is Button) + (c as Button).Click += btn_Click; + + vm.PropertyChanged += CheckCommandStates; + CheckCommandStates(this,new PropertyChangedEventArgs(string.Empty)); + } + + void CheckCommandStates(object sender, PropertyChangedEventArgs e) + { + foreach (var c in this.Controls) + { + var btn = c as Button; + if (btn == null) continue; + var cmd =btn.Tag as ICommand; + if (cmd!=null) + btn.Enabled = cmd.CanExecute(null); + } + } + + protected void btn_Click(object sender, EventArgs e) + { + var cmd = (sender as Button).Tag as ICommand; + + if (cmd != null) + if (cmd.CanExecute(null)) + cmd.Execute(null); + } + + + #region Implementation of IView + + public void SetDataContext(MainVm model) + { + _vm = model; + mainVmBindingSource.DataSource = model; + + foreach (var monitorVm in _vm.MonitorVms) + { + var tp = new TabPage(monitorVm.Name) {Tag = monitorVm}; + var control = CreateAndBindView(monitorVm); + if (control != null) + { + tp.Controls.Add(control); + control.Size = tp.ClientRectangle.Size; + } + tabCtrlMonitorVms.TabPages.Add(tp); + } + + var tabVm = tabCtrlMonitorVms.SelectedTab.Tag as MonitorVm; + _vm.Select(tabVm); + + UpdateConnectionStatusLabel(); + _vm.PropertyChanged += ((sender, e) => UpdateConnectionStatusLabel()); + + } + + public Control Control + { + get { return this; } + } + + #endregion + + private void tabCtrlConfigs_Selected(object sender, TabControlEventArgs e) + { + var control = e.TabPage.Controls[0]; + control.Size = e.TabPage.ClientRectangle.Size; + var tabVm = e.TabPage.Tag as MonitorVm; + _vm.Select(tabVm); + } + + + private void mainForm_SizeChanged(object sender, EventArgs e) + { + ResizeChildControls(); + } + + private void MainFormLoaded(object sender, EventArgs e) + { + ResizeChildControls(); + BindButtons(_vm); + } + + private void ResizeChildControls() + { + foreach (TabPage tabPage in tabCtrlMonitorVms.TabPages) + { + var control = tabPage.Controls[0]; + control.Size = tabPage.ClientRectangle.Size; + } + } + + private void UpdateConnectionStatusLabel() + { + switch (_vm.ConnectionState) + { + case MainVm.SessionStates.Disconnected: + lblConnectionStatus.Text="Not Connected"; + break; + case MainVm.SessionStates.Connecting: + lblConnectionStatus.Text="Connecting..."; + break; + case MainVm.SessionStates.Connected: + lblConnectionStatus.Text="Connected - version " + _vm.ApmVersion; + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + } +} diff --git a/Configurator/Configurator.Net/mainForm.resx b/Configurator/Configurator.Net/mainForm.resx new file mode 100644 index 0000000000..f081cdbea1 --- /dev/null +++ b/Configurator/Configurator.Net/mainForm.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 7, 19 + + + 170, 20 + + \ No newline at end of file