[fix] 调整发送提示

详细描述

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
xu 2024-07-02 14:58:54 +08:00
parent 92a56a247f
commit 7b024ed726
5 changed files with 22 additions and 7 deletions

View File

@ -367,7 +367,7 @@ namespace Plane.FormationCreator.Formation
string dis_EnVCopterNumber = "<" + EnVCopterNumber.ToString() + ">";
if (EnCopterNumber == -1) dis_EnCopterNumber = "<无限>";
if (EnVCopterNumber == -1) dis_EnVCopterNumber = "<无限>";
Loginstate ="["+ UserDisplayName + "]已登录,模拟飞机:"+ dis_EnVCopterNumber + "架,真实飞机:"+ dis_EnCopterNumber + "架";
Loginstate ="["+ UserDisplayName + "] 模拟飞机:"+ dis_EnVCopterNumber + "架,真实飞机:"+ dis_EnCopterNumber + "架";
Logined = true;
VersionControl.SetUserLever(userlever);
if (UserName != supername)

View File

@ -27,6 +27,7 @@ using GMap.NET.MapProviders;
using GMap.NET;
using static Plane.FormationCreator.CalculationLogLatDistance;
using Plane.CopterManagement;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
namespace Plane.FormationCreator.Formation
{
@ -482,7 +483,7 @@ namespace Plane.FormationCreator.Formation
public void AddTask()
{
//if (AppEx.Instance.CurrentMode == AppMode.PreparedForRunningTasks)
try
{
var copters = _copterManager.Copters;
if (!copters.Any()) return;
@ -514,6 +515,11 @@ namespace Plane.FormationCreator.Formation
foreach (var copter in copters)
{
preSingleCopterInfo = lastTask.SingleCopterInfos.Find(info => info.Copter == copter);
if (preSingleCopterInfo==null)
{
Alert.Show($"无法添加任务,{copter.Id}飞机可能是新加入的,没有找到之前的任务信息");
return;
}
if (coptindex == 0)
{
lastSingleCopterInfo = lastTask.SingleCopterInfos.Find(info => info.Copter == copter);
@ -567,6 +573,10 @@ namespace Plane.FormationCreator.Formation
}
catch (Exception ex)
{
Alert.Show($"创建任务失败:{ex}");
}
}
//是否显示计划航线

View File

@ -267,7 +267,7 @@
<TextBlock Margin="10,4"
Text="{Binding Message}" Width="480" MouseUp="LogShowHide"/>
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="0,8" BorderBrush="LightGray" BorderThickness="1"/>
<TextBlock Margin="10,4" Width="300" Text="{Binding SysStatusText}" />
<TextBlock Margin="10,4" Width="280" Text="{Binding SysStatusText}" />
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" Margin="0,8" BorderBrush="LightGray" BorderThickness="1"/>
<TextBlock Margin="10,4" Width="210"
Text="{Binding ControlPanelViewModelData.RTKState}" />

View File

@ -112,7 +112,7 @@ namespace Plane.FormationCreator.ViewModels
{
return _Openboardport ?? (_Openboardport = new RelayCommand<string>(async connectionType =>
{
if (_commModuleManager.Recomisopen)
if (btnBoardPortStr== "关闭广播端口")
{
//关闭广播端口
//正在发送rtcm数据并且使用了广播端口

View File

@ -85,10 +85,15 @@ namespace Plane.FormationCreator.ViewModels
{
if (value)
{ //发送
{
//发送
if (_commModuleManager.last_reserialport == "")
{
Alert.Show($"先在设置里打开广播端口", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
}else
if (!_commModuleManager.Recomisopen)
{
Alert.Show($"请先在设置里面打开广播端口,否则无法发送", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
Alert.Show($"广播端口未打开,无法发送", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
}
}