mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
Configurator.Net: Added icons for connect/disconnect buttons, tooltips, improved connection logic
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1186 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
82c4815e2c
commit
c78e001087
@ -48,10 +48,10 @@
|
||||
<Compile Include="PresentationModels\MonitorVm.cs" />
|
||||
<Compile Include="PresentationModels\MainVm.cs" />
|
||||
<Compile Include="PresentationModels\FlightDataMonitorVm.cs" />
|
||||
<Compile Include="mainForm.cs">
|
||||
<Compile Include="Views\mainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="mainForm.Designer.cs">
|
||||
<Compile Include="Views\mainForm.Designer.cs">
|
||||
<DependentUpon>mainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NotifyProperyChangedBase.cs" />
|
||||
@ -62,7 +62,7 @@
|
||||
<Compile Include="PresentationModels\TransmitterChannelsVm.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="mainForm.resx">
|
||||
<EmbeddedResource Include="Views\mainForm.resx">
|
||||
<DependentUpon>mainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
@ -187,6 +187,13 @@
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Views\icons\refresh.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\icons\connect.ico" />
|
||||
<Content Include="Views\icons\disconnect.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -63,6 +63,9 @@ namespace ArducopterConfigurator.PresentationModels
|
||||
// If we are waiting for the version string
|
||||
if (ConnectionState==SessionStates.Connecting)
|
||||
{
|
||||
if (strRx.Length > 6)
|
||||
return; // too long for a version string - reject
|
||||
|
||||
// then assume that this is the version string received
|
||||
ApmVersion = strRx;
|
||||
ConnectionState = SessionStates.Connected;
|
||||
@ -148,6 +151,7 @@ namespace ArducopterConfigurator.PresentationModels
|
||||
_connectionAttemptsTimer.Stop();
|
||||
return;
|
||||
}
|
||||
_session.Send("X");
|
||||
|
||||
// once we connected, then get the version string
|
||||
_session.Send("!");
|
||||
|
BIN
Configurator/Configurator.Net/Views/icons/connect.ico
Normal file
BIN
Configurator/Configurator.Net/Views/icons/connect.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
Configurator/Configurator.Net/Views/icons/disconnect.ico
Normal file
BIN
Configurator/Configurator.Net/Views/icons/disconnect.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
Configurator/Configurator.Net/Views/icons/refresh.ico
Normal file
BIN
Configurator/Configurator.Net/Views/icons/refresh.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
@ -29,6 +29,7 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(mainForm));
|
||||
this.tabCtrlMonitorVms = new System.Windows.Forms.TabControl();
|
||||
this.mainVmBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
@ -37,6 +38,7 @@
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.lblConnectionStatus = new System.Windows.Forms.Label();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.mainVmBindingSource)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.availablePortsBindingSource)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
@ -80,11 +82,12 @@
|
||||
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.Image = ((System.Drawing.Image)(resources.GetObject("btnConnect.Image")));
|
||||
this.btnConnect.Location = new System.Drawing.Point(126, 411);
|
||||
this.btnConnect.Name = "btnConnect";
|
||||
this.btnConnect.Size = new System.Drawing.Size(70, 23);
|
||||
this.btnConnect.Size = new System.Drawing.Size(26, 26);
|
||||
this.btnConnect.TabIndex = 6;
|
||||
this.btnConnect.Text = "Connect";
|
||||
this.toolTip.SetToolTip(this.btnConnect, "Connect");
|
||||
this.btnConnect.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// button1
|
||||
@ -92,11 +95,12 @@
|
||||
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.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
|
||||
this.button1.Location = new System.Drawing.Point(157, 411);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(70, 23);
|
||||
this.button1.Size = new System.Drawing.Size(26, 26);
|
||||
this.button1.TabIndex = 7;
|
||||
this.button1.Text = "DisConnect";
|
||||
this.toolTip.SetToolTip(this.button1, "Disconnect");
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lblConnectionStatus
|
||||
@ -104,20 +108,21 @@
|
||||
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.Size = new System.Drawing.Size(112, 13);
|
||||
this.lblConnectionStatus.TabIndex = 8;
|
||||
this.lblConnectionStatus.Text = "label1";
|
||||
this.lblConnectionStatus.Text = "connection string here";
|
||||
//
|
||||
// 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.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image")));
|
||||
this.button2.Location = new System.Drawing.Point(97, 410);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(23, 23);
|
||||
this.button2.Size = new System.Drawing.Size(26, 26);
|
||||
this.button2.TabIndex = 9;
|
||||
this.button2.Text = "R";
|
||||
this.toolTip.SetToolTip(this.button2, "Refresh port list");
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// mainForm
|
||||
@ -152,6 +157,7 @@
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Label lblConnectionStatus;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.ToolTip toolTip;
|
||||
}
|
||||
}
|
||||
|
@ -123,4 +123,59 @@
|
||||
<metadata name="availablePortsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>170, 20</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnConnect.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJZSURBVDhPlZPdT5JhGMbZ2trczNqiWdnanLnVbNTWhl9I
|
||||
koSoDTFfEzBFVCwTQlQQsECQ1K0wSnwBJV6ciKbZMiszY0ll88Ct7Ougsw76L9qugIN3Y3AQz/bbc5/c
|
||||
133d156HwUjzWEKE0DxHrERvIs1WBsMQEInMswQ+fF/Ao3UjjAFxV0oRvVvA7vNUUf3eKsSI1mSvt1Jk
|
||||
8ImwuRvE+29TiHwNYGD6ElIKqJ08amVrAr/+bMXxvTJB6xJgY8eP1zv3MbPRg35SCPUDXqIDy2LDXo2L
|
||||
H3Ata7G6fQ/+dVWc8JdpRHbn8fSjHZPPO6BynIdytFiTMD0WjnW+EbPhIbRaz8EaEOPhMzmNb+0mHEtN
|
||||
6LAXosV8NrG5YbFhj4kSR3cL4cfvNfheGCExFEDv5mNkvo7G8aQJI5QCV3SnJpJ27yUrowF5otaH8enn
|
||||
LCaX+1CnyYNqvAgmP58m+NYCkTr3b5LADQcXoXc6mvBnD8ZD3ai+loO2ERY0ZFGcHncJhMojyem32dmk
|
||||
0VMN78tOmtVtB8YoJSrkTMiG8tHpZEFy+wR4LQepJAdSU8Gg0l6MsQUCd5caaR5v2mDzNoMrzUKN+jA4
|
||||
kkyqTJrFThC43Js3qDCzsbo1ieG5Wujc5TDPCGmo9QHonbUobz7gTZpcff2oTqZnYSnigNEvQPvoGdR0
|
||||
HYPs1kloPSVx5LbTsSzIlK9O0J6N4Js70XBKIbPkg684FINzQc4kK1qZiBGrL17Nzk0pUCbdp6vpzkG9
|
||||
4Ti4sv0olWZy0v5lhUSGqLg+gyoiMhLD+Q+lf8mUXrH9fOw8AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>376, 20</value>
|
||||
</metadata>
|
||||
<data name="button1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJoSURBVDhPlZNtSFNRGMcHQWBuO/eeu7s73UszEyGxFMKQ
|
||||
FpgKFTYxzAyqD2FUipQWy0rICrEPNTVdSxoy2qiZoDZv84XeoAgzsj6ktYwyyV7sU9DX4N+50y69LKkL
|
||||
P86Bc58fz/k/HI3mP78b4pKNESkxPGDSbl2wVJb0ObJR65eNOij0G3VethZHLBTTZ2oxutkBWdRW/lXS
|
||||
y4pfHtuLrxFfjLEdRQiz4qmmGnw+VYZ3jfsQTuYQV3BN1FeOlG3Ah4ZyvN2dFWO2uQoznhOYqXMiWpaB
|
||||
PqsA5b+4gm6NZnFI4jCal4LJbStUXu9xYKIkHd1miisG3cFfim/RBPOwlNiorMpBQCD5ASOH+7kWPCtK
|
||||
VZkozcTdkgJcNpB2VaAkO2QmiFZvx81UIwYkbYVyeIlJOkUOt7NNGMuzqky6dsInkG8xAWt3kWwimGbh
|
||||
fPFU4aOnHoMpEsLzEi+TdBh4DGaIGFkjzZGbhIv0pwB7RR1mG0rxfv9qfKrbhJmWo5DtEvoMc520MYlH
|
||||
4CCn8bi3iuL6ch7tPOdXr9Al6vFm10qV6QMFmDp7BD12E0LzkmZC8s9THkEzh1ae97spzVEFQQPxDmUm
|
||||
4fmWdJXJinV41XQYXTYTAgYS60S57jmO+3N0nVRff9WejMfrbXhauFRlvDwHL07WIGg1wafX07gz7xCI
|
||||
K5BmR/R0LR6xud/JlvCQhfSDJ84sDDsL0cGTQ3EFXlHA+PFqPFhrR38axQUWVsjGwsoSYvQso2inxOu2
|
||||
WBLiClp43uW3iiwwDkpILCBHK8d52arsoezbCElZ8OWxYIrdvyf7j8/8Oz2IOBnxXRIyAAAAAElFTkSu
|
||||
QmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="button2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAALVSURBVDhPY2CgGojfz8Hgd0SKIXC/DBiD2CAxYoFW3fnE
|
||||
yHl37sUvufskFogj591+KF92NhGkXzDjqI5GzdlyqawjBjjNk8g6GpK35t7XGeff/p8OxJ0Hn/3RqjyZ
|
||||
yhC4Uyx8xrXDc0++/l+x4cEF3bLjngwM9UyoBlms5LRvOzOncfeT/73HXv7vP/Hqf+GaO+9ks/bbMPiv
|
||||
F/DqPTeza9fDz+uuvv9fs/HeVbA4MpBL2eGTv+rWh66Dz/7Hzrx0r2TN7S+xMy7eYXBbLgtWZzyTSyVr
|
||||
b2Hp6hsf5p569T94wpntDPbzBaBmpLE61R2cWb/94f/U+ZfeiEVv8DMr2VNmVbZ7CoNFLyfCono248Kd
|
||||
rR077/+tWHvzo3zyRg+InFK3mH/HoVPVm+79927av41BvZMXaCMrg8tMfvQAE/Ceq58w/fSr2g13/qsk
|
||||
rS6HyKvUy1iW7bgVMOXCf930NdMZGEKZcYa0Vb+6VdXu54FTzv+XjVjUCHVBsZh6ypoTetVH/qvELVnO
|
||||
wBCPGvcWvUI8tl3BQIv4xDwnR+kU7f6uU7r3t4jX1GSYRczygTMm6JXu/6+RvPo+p36VGbILhBy73IzS
|
||||
Vz5T8J82XSly/gn1koP/NVNXP+W2aNKFqxMwrbbTSlrxSit/938538kHuVRyDWFekXDuqtXK3flfIXXz
|
||||
H4X07f/Usnf8l/PqB3rVmBXJImNWCYfmOs3ktd+0snb8142ed0fMtCqQgcGVWyVg6laxxB3/2SJ3/BdO
|
||||
2PFf0X/aLVbVLIwUycjAby8gZl7aqR0x75NuyJRrfCrhbgwitkYawdMeKyVt/i8ZswEY8pv+6wRPfcKp
|
||||
EGOO7E1GIIcdiMUYGPiNOMVt8lh51FKAfC8GJu4IbjnPqbwqEct5VCMX86nFLBBUj2piFdTTgeoB6QUD
|
||||
UNoGhT4vEAsCsSgQSwKxFBBLQPnCQFoAiLmhmsH5AQAEwRbllcrpQwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user