增加保存读取虚拟编号
多次写入参数 加入测试灯光和灯光频率可以为小数---需要升级飞控 修改3D颜色和编号刷新的bug
This commit is contained in:
parent
9b5b3bb22c
commit
e1c81f28ff
@ -1,4 +1,5 @@
|
|||||||
using GalaSoft.MvvmLight.Command;
|
using GalaSoft.MvvmLight.Command;
|
||||||
|
using Plane.CommunicationManagement;
|
||||||
using Plane.Copters;
|
using Plane.Copters;
|
||||||
using Plane.Windows.Messages;
|
using Plane.Windows.Messages;
|
||||||
using System;
|
using System;
|
||||||
@ -6,6 +7,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
@ -13,6 +15,7 @@ namespace Plane.FormationCreator.Formation
|
|||||||
{
|
{
|
||||||
public partial class FlightTaskSingleCopterInfo
|
public partial class FlightTaskSingleCopterInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
public static FlightTaskSingleCopterInfo CreateForFlyToTask(ICopter copter)
|
public static FlightTaskSingleCopterInfo CreateForFlyToTask(ICopter copter)
|
||||||
{
|
{
|
||||||
var info = new FlightTaskSingleCopterInfo(copter)
|
var info = new FlightTaskSingleCopterInfo(copter)
|
||||||
@ -57,6 +60,7 @@ namespace Plane.FormationCreator.Formation
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private CommModuleManager _commModuleManager = CommModuleManager.Instance;
|
||||||
|
|
||||||
private ICommand _SetAllCopterLEDCommand;
|
private ICommand _SetAllCopterLEDCommand;
|
||||||
public ICommand SetAllCopterLEDCommand
|
public ICommand SetAllCopterLEDCommand
|
||||||
@ -81,8 +85,58 @@ namespace Plane.FormationCreator.Formation
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool LEDTestRun = false;
|
||||||
|
/*
|
||||||
|
private string _TestLEDtxt = "测试";
|
||||||
|
public string TestLEDtxt
|
||||||
|
{
|
||||||
|
get { return _TestLEDtxt; }
|
||||||
|
set { Set(nameof(TestLEDtxt), ref _TestLEDtxt, value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LEDMode 0 = "常亮"
|
||||||
|
1="同步闪烁(单色)" />
|
||||||
|
2 = "异步闪烁(随机)" />
|
||||||
|
3="渐亮" />
|
||||||
|
4 = "渐暗" />
|
||||||
|
5="呼吸灯" />
|
||||||
|
6 = "同步闪烁(随机)" />
|
||||||
|
7="异步闪烁(单色)" />
|
||||||
|
8 = "拉烟" />(飞控是50 ? )
|
||||||
|
*/
|
||||||
|
//测试灯光
|
||||||
|
private ICommand _TestCopterLEDCommand;
|
||||||
|
public ICommand TestCopterLEDCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _TestCopterLEDCommand ?? (_TestCopterLEDCommand = new RelayCommand<double>(async =>
|
||||||
|
{
|
||||||
|
if (!LEDTestRun)
|
||||||
|
{
|
||||||
|
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
LEDTestRun = true;
|
||||||
|
foreach (LEDInfo vLEDInfo in LEDInfos)
|
||||||
|
{
|
||||||
|
Thread.Sleep((int)vLEDInfo.Delay * 1000);
|
||||||
|
if (!LEDTestRun) break;
|
||||||
|
_commModuleManager.LED_TaskAsync(vLEDInfo.LEDMode, vLEDInfo.LEDRate, vLEDInfo.LEDTimes, vLEDInfo.LEDRGB, this.Copter);
|
||||||
|
}
|
||||||
|
//LEDTestRun = false;
|
||||||
|
});
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
LEDTestRun = false;
|
||||||
|
_commModuleManager.LED_TaskAsync(99, 0, 0, "000000", this.Copter);
|
||||||
|
}
|
||||||
|
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private ICommand _SetSelectedCopterLEDCommand;
|
private ICommand _SetSelectedCopterLEDCommand;
|
||||||
public ICommand SetSelectedCopterLEDCommand
|
public ICommand SetSelectedCopterLEDCommand
|
||||||
@ -116,7 +170,7 @@ namespace Plane.FormationCreator.Formation
|
|||||||
{
|
{
|
||||||
private double delay = 1; //灯光延时 单位:100ms (从当前任务开为0,延时几秒后设置LED)
|
private double delay = 1; //灯光延时 单位:100ms (从当前任务开为0,延时几秒后设置LED)
|
||||||
private int ledmode = 0; //灯光模式 0常亮 1闪烁 2随机闪烁(RGB无意义)
|
private int ledmode = 0; //灯光模式 0常亮 1闪烁 2随机闪烁(RGB无意义)
|
||||||
private int ledrate = 0; //闪烁延时 单位:100ms
|
private float ledRate = 0; //闪烁延时 单位:100ms
|
||||||
private int ledtimes = 0; //次数 (预留、暂取消其意义)
|
private int ledtimes = 0; //次数 (预留、暂取消其意义)
|
||||||
private string ledRGB = "FFFFFF"; //灯光颜色
|
private string ledRGB = "FFFFFF"; //灯光颜色
|
||||||
|
|
||||||
@ -129,7 +183,7 @@ namespace Plane.FormationCreator.Formation
|
|||||||
{
|
{
|
||||||
delay = led.delay;
|
delay = led.delay;
|
||||||
ledmode = led.ledmode;
|
ledmode = led.ledmode;
|
||||||
ledrate = led.ledrate;
|
ledRate = led.ledRate;
|
||||||
ledRGB = led.ledRGB;
|
ledRGB = led.ledRGB;
|
||||||
}
|
}
|
||||||
public double Delay
|
public double Delay
|
||||||
@ -143,10 +197,10 @@ namespace Plane.FormationCreator.Formation
|
|||||||
get { return ledmode; }
|
get { return ledmode; }
|
||||||
set { ledmode = value; }
|
set { ledmode = value; }
|
||||||
}
|
}
|
||||||
public int LEDRate
|
public float LEDRate
|
||||||
{
|
{
|
||||||
get { return ledrate; }
|
get { return ledRate; }
|
||||||
set { ledrate = value; }
|
set { ledRate = value; }
|
||||||
}
|
}
|
||||||
public int LEDTimes
|
public int LEDTimes
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Microsoft.Practices.ServiceLocation;
|
using Microsoft.Practices.ServiceLocation;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Plane.FormationCreator.ViewModels
|
namespace Plane.FormationCreator.ViewModels
|
||||||
{
|
{
|
||||||
@ -52,6 +53,71 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清除所有编号
|
||||||
|
/// </summary>
|
||||||
|
private ICommand _SaveVirtualIdCommand;
|
||||||
|
public ICommand SaveVirtualIdCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _SaveVirtualIdCommand ?? (_SaveVirtualIdCommand = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
string Savestr = "";
|
||||||
|
foreach (var c in _copterManager.Copters)
|
||||||
|
{
|
||||||
|
Savestr += c.Id + "=" + c.VirtualId + ';';
|
||||||
|
}
|
||||||
|
StreamWriter writer = new StreamWriter("vid.dat");
|
||||||
|
writer.Write(Savestr);
|
||||||
|
writer.Close();
|
||||||
|
Message.Show($"保存成功");
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清除所有编号
|
||||||
|
/// </summary>
|
||||||
|
private ICommand _LoadVirtualIdCommand;
|
||||||
|
public ICommand LoadVirtualIdCommand
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _LoadVirtualIdCommand ?? (_LoadVirtualIdCommand = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
if (!File.Exists("vid.dat"))
|
||||||
|
return;
|
||||||
|
// string str = System.IO.File.ReadAllText(@"vid.dat");
|
||||||
|
|
||||||
|
string str = File.ReadAllText("vid.dat");
|
||||||
|
|
||||||
|
string[] arr = str.Split(';');
|
||||||
|
foreach (string s in arr)
|
||||||
|
{
|
||||||
|
|
||||||
|
string[] arrs = s.Split('=');
|
||||||
|
|
||||||
|
|
||||||
|
var copter = _copterManager.Copters.FirstOrDefault(c => c.Id == arrs[0]);
|
||||||
|
if (copter != null)
|
||||||
|
{
|
||||||
|
copter.VirtualId = int.Parse(arrs[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Message.Show($"读入成功");
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置单个虚拟ID
|
/// 设置单个虚拟ID
|
||||||
@ -75,6 +141,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
copter.VirtualId = SingleVirtualId;
|
copter.VirtualId = SingleVirtualId;
|
||||||
Message.Show($"飞机{copter.Name} 设置编号={SingleVirtualId}");
|
Message.Show($"飞机{copter.Name} 设置编号={SingleVirtualId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -652,8 +652,52 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
foreach (string name in paramlist.Keys)
|
foreach (string name in paramlist.Keys)
|
||||||
{
|
{
|
||||||
float value = float.Parse( paramlist[name].ToString());
|
float value = float.Parse( paramlist[name].ToString());
|
||||||
await Task.WhenAll(_copterManager.AcceptingControlCopters.Select
|
//写5次
|
||||||
(copter => copter.SetParamAsync(name, value)));
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_copterManager.AcceptingControlCopters.Count() < _copterManager.Copters.Count)
|
||||||
|
await _commModuleManager.SetParamAsync(name, value, _copterManager.AcceptingControlCopters);
|
||||||
|
else if (_copterManager.AcceptingControlCopters.Count() == _copterManager.Copters.Count)
|
||||||
|
{
|
||||||
|
_commModuleManager.SetAllCoptersForWifi(_copterManager.Copters);
|
||||||
|
await _commModuleManager.SetParamAsync(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// await Task.WhenAll(_copterManager.AcceptingControlCopters.Select
|
||||||
|
// (copter => copter.SetParamAsync(name, value)));
|
||||||
|
}
|
||||||
|
await Task.Delay(2000);
|
||||||
|
|
||||||
|
//发送读取5次
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
if (_copterManager.AcceptingControlCopters.Count() < _copterManager.Copters.Count)
|
||||||
|
await _commModuleManager.ReadParamAsnyc(name, _copterManager.AcceptingControlCopters);
|
||||||
|
else if (_copterManager.AcceptingControlCopters.Count() == _copterManager.Copters.Count)
|
||||||
|
await _commModuleManager.ReadParamAsnyc(name);
|
||||||
|
}
|
||||||
|
await Task.Delay(1000);
|
||||||
|
|
||||||
|
//开始检查飞机返回参数是否正确
|
||||||
|
|
||||||
|
foreach (ICopter copter in _copterManager.AcceptingControlCopters)
|
||||||
|
{
|
||||||
|
if (value != copter.RetainInt)
|
||||||
|
{
|
||||||
|
ifallok = false;
|
||||||
|
Alert.Show(copter.Id + "参数[" + name + "]设置失败,读取的值是[" + copter.RetainInt + "]", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
await Task.WhenAll(
|
await Task.WhenAll(
|
||||||
@ -671,6 +715,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
));
|
));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ifallok)
|
if (ifallok)
|
||||||
@ -702,6 +747,11 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
{
|
{
|
||||||
float paramvalue = Convert.ToSingle(ModifyParamWindow.textParamValue.Text);
|
float paramvalue = Convert.ToSingle(ModifyParamWindow.textParamValue.Text);
|
||||||
int num = 0;
|
int num = 0;
|
||||||
|
int writeTime = 0;
|
||||||
|
//连续写5次,为了都写成功
|
||||||
|
for ( writeTime=0; writeTime<5; writeTime++)
|
||||||
|
{
|
||||||
|
|
||||||
if (_copterManager.AcceptingControlCopters.Count() < _copterManager.Copters.Count)
|
if (_copterManager.AcceptingControlCopters.Count() < _copterManager.Copters.Count)
|
||||||
num = await _commModuleManager.SetParamAsync(paramstr, paramvalue, _copterManager.AcceptingControlCopters);
|
num = await _commModuleManager.SetParamAsync(paramstr, paramvalue, _copterManager.AcceptingControlCopters);
|
||||||
else if (_copterManager.AcceptingControlCopters.Count() == _copterManager.Copters.Count)
|
else if (_copterManager.AcceptingControlCopters.Count() == _copterManager.Copters.Count)
|
||||||
@ -709,7 +759,8 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
_commModuleManager.SetAllCoptersForWifi(_copterManager.Copters);
|
_commModuleManager.SetAllCoptersForWifi(_copterManager.Copters);
|
||||||
num = await _commModuleManager.SetParamAsync(paramstr, paramvalue);
|
num = await _commModuleManager.SetParamAsync(paramstr, paramvalue);
|
||||||
}
|
}
|
||||||
Alert.Show($"广播完成! 当前序列号:{num}");
|
}
|
||||||
|
Alert.Show($"广播完成! 序列号从:{num-writeTime+1}到{num}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1462,6 +1513,7 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
{
|
{
|
||||||
Color color = (Color)ColorConverter.ConvertFromString("#" + ledInfo.LEDRGB);
|
Color color = (Color)ColorConverter.ConvertFromString("#" + ledInfo.LEDRGB);
|
||||||
int ledMode = ledInfo.LEDMode;
|
int ledMode = ledInfo.LEDMode;
|
||||||
|
//拉烟任务模式ID是50,需要改为50
|
||||||
if (ledMode == 8) ledMode = 50;
|
if (ledMode == 8) ledMode = 50;
|
||||||
IMission LEDMission = Mission.CreateLEDControlMission(
|
IMission LEDMission = Mission.CreateLEDControlMission(
|
||||||
(int)(ledInfo.Delay * 10),
|
(int)(ledInfo.Delay * 10),
|
||||||
|
@ -21,6 +21,7 @@ using Newtonsoft.Json;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Plane.Windows.Messages;
|
using Plane.Windows.Messages;
|
||||||
|
using Plane.Collections;
|
||||||
|
|
||||||
namespace Plane.FormationCreator.ViewModels
|
namespace Plane.FormationCreator.ViewModels
|
||||||
{
|
{
|
||||||
@ -176,7 +177,8 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
copter.DisplayVirtualId = true;
|
copter.DisplayVirtualId = true;
|
||||||
copter.DisplayID = false;
|
copter.DisplayID = false;
|
||||||
}
|
}
|
||||||
|
//强制刷新飞机显示
|
||||||
|
// _copterManager.Copters.ForEach(copter => copter.RefreashLoc());
|
||||||
|
|
||||||
|
|
||||||
}));
|
}));
|
||||||
@ -197,6 +199,8 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
copter.DisplayVirtualId = false;
|
copter.DisplayVirtualId = false;
|
||||||
copter.DisplayID = true;
|
copter.DisplayID = true;
|
||||||
}
|
}
|
||||||
|
//强制刷新飞机显示
|
||||||
|
// _copterManager.Copters.ForEach(copter => copter.RefreashLoc());
|
||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -252,6 +256,8 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
copter.DisplayVirtualId = true;
|
copter.DisplayVirtualId = true;
|
||||||
copter.DisplayID = true;
|
copter.DisplayID = true;
|
||||||
}
|
}
|
||||||
|
//强制刷新飞机显示
|
||||||
|
// _copterManager.Copters.ForEach(copter => copter.RefreashLoc());
|
||||||
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -200,11 +200,14 @@ namespace Plane.FormationCreator.ViewModels
|
|||||||
|
|
||||||
Color color;
|
Color color;
|
||||||
if (copter.LEDColor != null && copter.LEDColor != "")
|
if (copter.LEDColor != null && copter.LEDColor != "")
|
||||||
|
{
|
||||||
color = (Color)ColorConverter.ConvertFromString("#" + copter.LEDColor);
|
color = (Color)ColorConverter.ConvertFromString("#" + copter.LEDColor);
|
||||||
else
|
|
||||||
color = (Color)ColorConverter.ConvertFromString("#" + CopterManager.CopterDefaultColor);
|
|
||||||
panle3D.Material = MaterialHelper.CreateMaterial(color);
|
panle3D.Material = MaterialHelper.CreateMaterial(color);
|
||||||
panle3D.BackMaterial = MaterialHelper.CreateMaterial(color);
|
panle3D.BackMaterial = MaterialHelper.CreateMaterial(color);
|
||||||
|
}
|
||||||
|
//else
|
||||||
|
// color = (Color)ColorConverter.ConvertFromString("#" + CopterManager.CopterDefaultColor);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
|
||||||
<TextBlock Margin="10,5" Text="清除所有编号"/>
|
<StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
<Button Margin="0,0" Width="100" Content = "清除编号" VerticalAlignment="Center" Command="{Binding ClearVirtualIdCommand}"/>
|
|
||||||
|
<Button Margin="5" Width="95" Content = "清除编号" Command="{Binding ClearVirtualIdCommand}"/>
|
||||||
|
<Button Margin="5" Width="95" Content = "保存编号" Command="{Binding SaveVirtualIdCommand}"/>
|
||||||
|
<Button Margin="5" Width="95" Content = "读入编号" Command="{Binding LoadVirtualIdCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
<MenuItem Header="显示所有飞机"
|
<MenuItem Header="显示所有飞机"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
Command="{Binding ShowAllCoptersCommand}"/>
|
Command="{Binding ShowAllCoptersCommand}"/>
|
||||||
<MenuItem Header="显示所有编号"
|
<MenuItem Header="所有编号(虚拟排序)"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
Command="{Binding ShowAllIDCommand}"/>
|
Command="{Binding ShowAllIDCommand}"/>
|
||||||
<MenuItem Header="显示虚拟编号"
|
<MenuItem Header="虚拟编号(虚拟排序)"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
Command="{Binding SortbyVIdCommand}"/>
|
Command="{Binding SortbyVIdCommand}"/>
|
||||||
<MenuItem Header="显示飞机编号"
|
<MenuItem Header="真实编号(真实排序)"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
Command="{Binding SortbyIdCommand}"/>
|
Command="{Binding SortbyIdCommand}"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
<Button Margin="0,5,5,0" Content="优化路线" Width="105" Command="{Binding OptimizeRouteCommand}"
|
<Button Margin="0,5,5,0" Content="优化路线" Width="105" Command="{Binding OptimizeRouteCommand}"
|
||||||
/>
|
/>
|
||||||
<Button Margin="0,5,5,0" Content="导出到C4D" Width="105" Command="{Binding ExportWayPointCommand}"/>
|
<Button Margin="0,5,5,0" Content="导出到C4D" Width="105" Command="{Binding ExportWayPointCommand}"/>
|
||||||
<Button Margin="0,5,5,0" Content="估计飞行时间" Width="105" Command="{Binding AutoWayPointTmCommand}"/>
|
<Button Margin="0,5,5,0" Content="估计时间" Width="105" Command="{Binding AutoWayPointTmCommand}"/>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
@ -351,17 +351,18 @@
|
|||||||
<StackPanel DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
<StackPanel DataContext="{Binding FlightTaskManager.SelectedTask.ModifyingSingleCopterInfo}">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="33*"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="89*"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="61*"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition Width="61*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Text="灯光控制" Margin="5, 10, 5, 0" VerticalAlignment="Center"/>
|
<TextBlock Text="灯光控制" Margin="5,7,5,2" VerticalAlignment="Center" Height="15"/>
|
||||||
<Grid Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center">
|
<Grid Grid.Column="1" Grid.ColumnSpan="3" VerticalAlignment="Center" Height="34">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Content="应用到全部" VerticalAlignment="Center"
|
<Button Content="应用到全部" VerticalAlignment="Center"
|
||||||
Margin="0,5,5,0"
|
Margin="0,5,5,0"
|
||||||
@ -370,8 +371,17 @@
|
|||||||
Margin="0,5,5,0"
|
Margin="0,5,5,0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Command="{Binding SetSelectedCopterLEDCommand}" />
|
Command="{Binding SetSelectedCopterLEDCommand}" />
|
||||||
<Button Content="添加" VerticalAlignment="Center"
|
|
||||||
|
|
||||||
|
<Button Content="测试/停止" VerticalAlignment="Center"
|
||||||
|
Margin="0,5,5,0"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
Command="{Binding TestCopterLEDCommand}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button Content="添加" VerticalAlignment="Center"
|
||||||
|
Grid.Column="3"
|
||||||
Margin="0,5,5,0"
|
Margin="0,5,5,0"
|
||||||
Command="{Binding AddLEDCommand}" />
|
Command="{Binding AddLEDCommand}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user