From 52961372084269ade10bd24ed490dcb553d715f7 Mon Sep 17 00:00:00 2001 From: xu Date: Tue, 5 May 2020 18:59:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E8=80=81=E7=89=88=E5=9B=BA=E4=BB=B6=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Formation/FlightTaskSingleCopterInfo_LED.cs | 17 +++++++++++++---- .../ViewModels/ControlPanelViewModel.cs | 2 +- Plane.FormationCreator/Views/ConnectWindow.xaml | 7 ++++--- .../Views/ConnectWindow.xaml.cs | 2 +- Plane.FormationCreator/Views/LoginView.xaml | 9 ++++++--- Plane.FormationCreator/Views/LoginView.xaml.cs | 4 ++++ .../Views/ModifyTaskView.xaml | 12 +++++------- 7 files changed, 34 insertions(+), 19 deletions(-) diff --git a/Plane.FormationCreator/Formation/FlightTaskSingleCopterInfo_LED.cs b/Plane.FormationCreator/Formation/FlightTaskSingleCopterInfo_LED.cs index 239bd65..a895b78 100644 --- a/Plane.FormationCreator/Formation/FlightTaskSingleCopterInfo_LED.cs +++ b/Plane.FormationCreator/Formation/FlightTaskSingleCopterInfo_LED.cs @@ -243,12 +243,17 @@ namespace Plane.FormationCreator.Formation get { return ledmode; } set { ledmode = value; } } + //为了发布兼容老版本的,用ledInterval当成频率在用,并且不保存LEDInterval到文件 + [Newtonsoft.Json.JsonIgnore] public float LEDInterval { get { return ledInterval; } set { ledInterval = value; - if (ledInterval != 0) - ledrate = (int)Math.Round(1 / ledInterval); //用于兼容老版本 + //为了发布兼容老版本的,用ledInterval当成频率在用,并且不保存LEDInterval到文件 + ledrate = (int)ledInterval; + //新版用这个 + //if (ledInterval != 0) + // ledrate = (int)Math.Round(1 / ledInterval); //用于兼容老版本 } } @@ -256,8 +261,12 @@ namespace Plane.FormationCreator.Formation { get { return ledrate; } set { ledrate = value; - if ((ledrate!=0)&&(ledInterval==0)) - ledInterval = 1 / ledrate; + //为了发布兼容老版本的,用ledInterval当成频率在用,并且不保存LEDInterval到文件 + ledInterval = ledrate; + + //新版用这个 + // if ((ledrate!=0)&&(ledInterval==0)) + // ledInterval = 1 / ledrate; } } diff --git a/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs b/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs index a9e8f3d..756ecfb 100644 --- a/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs +++ b/Plane.FormationCreator/ViewModels/ControlPanelViewModel.cs @@ -1514,7 +1514,7 @@ namespace Plane.FormationCreator.ViewModels Color color = (Color)ColorConverter.ConvertFromString("#" + ledInfo.LEDRGB); int ledMode = ledInfo.LEDMode; //拉烟任务模式ID是50,需要改为50 - if (ledMode == 11) ledMode = 50; + if (ledMode == 8) ledMode = 50; IMission LEDMission = Mission.CreateLEDControlMission( (int)(ledInfo.Delay * 10), ledMode, diff --git a/Plane.FormationCreator/Views/ConnectWindow.xaml b/Plane.FormationCreator/Views/ConnectWindow.xaml index e63f0da..1c4f62e 100644 --- a/Plane.FormationCreator/Views/ConnectWindow.xaml +++ b/Plane.FormationCreator/Views/ConnectWindow.xaml @@ -9,7 +9,7 @@ mc:Ignorable="d" Title="" Width="500" - Height="300" + Height="325.107" WindowStartupLocation="CenterScreen" FontFamily="Microsoft YaHei" @@ -28,6 +28,7 @@ + @@ -84,8 +85,8 @@ - - + + diff --git a/Plane.FormationCreator/Views/ConnectWindow.xaml.cs b/Plane.FormationCreator/Views/ConnectWindow.xaml.cs index 605cac5..67492cf 100644 --- a/Plane.FormationCreator/Views/ConnectWindow.xaml.cs +++ b/Plane.FormationCreator/Views/ConnectWindow.xaml.cs @@ -49,7 +49,7 @@ namespace Plane.FormationCreator.Views var version = Assembly.GetExecutingAssembly().GetName().Version; about_ver.Text = "版本:" + version.ToString(); - about_buildtm .Text= "编译时间:" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString() ; + about_buildtm .Text= "编译时间:" + System.IO.File.GetLastWriteTime(this.GetType().Assembly.Location).ToString()+"(兼容4.1.2之前固件)"; diff --git a/Plane.FormationCreator/Views/LoginView.xaml b/Plane.FormationCreator/Views/LoginView.xaml index 3966c63..63b027c 100644 --- a/Plane.FormationCreator/Views/LoginView.xaml +++ b/Plane.FormationCreator/Views/LoginView.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ignore="http://www.galasoft.ch/ignore" xmlns:Helper="clr-namespace:Plane.Util" - mc:Ignorable="d ignore" Height="253.421" Width="463.894" Title="登录系统" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" + mc:Ignorable="d ignore" Height="253.421" Width="463.894" Title="飞行魔方地面控制中心" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" > @@ -13,6 +13,7 @@ + @@ -31,7 +32,7 @@ - + - + + diff --git a/Plane.FormationCreator/Views/LoginView.xaml.cs b/Plane.FormationCreator/Views/LoginView.xaml.cs index 4b2e2fc..1b99798 100644 --- a/Plane.FormationCreator/Views/LoginView.xaml.cs +++ b/Plane.FormationCreator/Views/LoginView.xaml.cs @@ -1,5 +1,6 @@ using Microsoft.Practices.ServiceLocation; using Plane.FormationCreator.ViewModels; +using System.Reflection; using System.Windows; using System.Windows.Controls; @@ -18,6 +19,9 @@ namespace Plane.FormationCreator.Views InitializeComponent(); LoginViewModel loginViewModel = ServiceLocator.Current.GetInstance(); this.DataContext = loginViewModel; + var version = Assembly.GetExecutingAssembly().GetName().Version; + about_ver.Content = "版本:" + version.ToString()+ "(兼容版)"; + } } diff --git a/Plane.FormationCreator/Views/ModifyTaskView.xaml b/Plane.FormationCreator/Views/ModifyTaskView.xaml index 65084bd..c914073 100644 --- a/Plane.FormationCreator/Views/ModifyTaskView.xaml +++ b/Plane.FormationCreator/Views/ModifyTaskView.xaml @@ -457,6 +457,7 @@