Commit 12787164 authored by 潘栩锋's avatar 潘栩锋 🚴
parents 3b0ebc03 6176c8fa
...@@ -333,27 +333,25 @@ namespace FObjBase.Reflect ...@@ -333,27 +333,25 @@ namespace FObjBase.Reflect
foreach (var methodInfo in methodInfos) foreach (var methodInfo in methodInfos)
{ {
var parameterInfos = methodInfo.GetParameters(); var parameterInfos = methodInfo.GetParameters();
var names = parameterInfos.Select(pi => pi.Name); //全部参数名称
var names = parameterInfos.Select(pi => pi.Name).ToList();
//删除掉 asyncDelegate,asyncContext
names.Remove("asyncDelegate");
names.Remove("asyncContext");
var names_req = parameterNames; var names_req = parameterNames;
//比较 names 与 names_data
var exps_req = names_req.Except(names); if (names.Count() != names_req.Count())
if (exps_req.Count() != 0) continue;//数量不一致,肯定不同
{
//请求的参数,这个method 不是全部都有 var sames = names_req.Intersect(names);
continue;
} if (sames.Count() != names_req.Count())
var exps = names.Except(names_req); continue;// names 与 names_req 的交集数量与names_req不一样,肯定不同
if (exps.Count() == 2 && exps.Contains("asyncDelegate") && exps.Contains("asyncContext"))
{ //就是它
//请求的参数 就只有 "asyncDelegate" 与 "asyncContext" 没有而已 return methodInfo;
//这个就是需要调用的 method
return methodInfo;
}
else
{
continue;
}
} }
return null; return null;
} }
......
...@@ -330,6 +330,10 @@ namespace FObjBase.Reflect ...@@ -330,6 +330,10 @@ namespace FObjBase.Reflect
//触发事件!!! //触发事件!!!
var methodInfo = GetType().GetMethod(anyEvent.triggerName); var methodInfo = GetType().GetMethod(anyEvent.triggerName);
if (methodInfo == null)
{
throw new Exception($"客户端 {GetType()} 忘记写 {anyEvent.triggerName}");
}
var obj = rData.data.ToObject(anyEvent.retType); var obj = rData.data.ToObject(anyEvent.retType);
//出错,就提示,肯定是客户端忘记写 "Trigger_XXXX" //出错,就提示,肯定是客户端忘记写 "Trigger_XXXX"
methodInfo.Invoke(this, new object[] { obj }); methodInfo.Invoke(this, new object[] { obj });
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="PropertyChanged.Fody"> <PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version> <Version>3.2.5</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
<Name>FLY.Simulation</Name> <Name>FLY.Simulation</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.2.5</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
...@@ -21,74 +21,23 @@ namespace FLY.Simulation.Casting ...@@ -21,74 +21,23 @@ namespace FLY.Simulation.Casting
/// <summary> /// <summary>
/// 1脉冲 = ? mm /// 1脉冲 = ? mm
/// </summary> /// </summary>
double mmpp = 0.1133; public double Mmpp { get; set; } = 0.0945;
public double Mmpp {
get { return mmpp; }
set {
mmpp = value;
}
}
double filmvelocity = 23;
/// <summary> /// <summary>
/// 膜速度 m/min /// 膜速度 m/min
/// </summary> /// </summary>
public double FilmVelocity public double FilmVelocity { get; set; } = 23;
{
get
{
return filmvelocity;
}
set
{
if (filmvelocity != value)
{
filmvelocity = value;
NotifyPropertyChanged("FilmVelocity");
}
}
}
double filmlength = 0;
/// <summary> /// <summary>
/// 膜长 m /// 膜长 m
/// </summary> /// </summary>
public double FilmLength public double FilmLength { get; set; }
{
get
{
return filmlength;
}
set
{
if (filmlength != value)
{
filmlength = value;
NotifyPropertyChanged("FilmLength");
}
}
}
bool isRunning = true;
/// <summary> /// <summary>
/// 运转中 /// 运转中
/// </summary> /// </summary>
public bool IsRunning public bool IsRunning { get; set; } = true;
{
get
{
return isRunning;
}
set
{
if (isRunning != value)
{
isRunning = value;
NotifyPropertyChanged("IsRunning");
}
}
}
public GageAD() public GageAD()
{ {
curve = new CurveCollection("curve.xml"); curve = new CurveCollection("curve.xml");
...@@ -185,13 +134,6 @@ namespace FLY.Simulation.Casting ...@@ -185,13 +134,6 @@ namespace FLY.Simulation.Casting
return 0; return 0;
} }
protected void NotifyPropertyChanged(string propertyname)
{
if (PropertyChanged != null)
{
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyname));
}
}
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
} }
} }
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="PropertyChanged.Fody"> <PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version> <Version>3.2.5</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
...@@ -92,8 +92,11 @@ ...@@ -92,8 +92,11 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoMapper">
<Version>10.1.1</Version>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody"> <PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version> <Version>3.2.5</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
...@@ -8,10 +8,13 @@ using System.IO; ...@@ -8,10 +8,13 @@ using System.IO;
using System.ComponentModel; using System.ComponentModel;
using System.Xml.Serialization; using System.Xml.Serialization;
using FlyADBase; using FlyADBase;
using static FLY.Simulation.Flyad7.FLYAD7;
using AutoMapper;
using Newtonsoft.Json;
namespace FLY.Simulation.Flyad7 namespace FLY.Simulation.Flyad7
{ {
public class FLYAD7 : IFlyAD, INotifyPropertyChanged, Misc.ISaveToXml public class FLYAD7 : IFlyAD, INotifyPropertyChanged
{ {
private IPEndPoint localep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 20008); private IPEndPoint localep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 20008);
...@@ -77,23 +80,11 @@ namespace FLY.Simulation.Flyad7 ...@@ -77,23 +80,11 @@ namespace FLY.Simulation.Flyad7
/// </summary> /// </summary>
Casting Casting
} }
private SIM_MODE simmode = SIM_MODE.Coating;
/// <summary> /// <summary>
/// 系统重启时,mSimModeCurr = SimMode ,之后怎么变化都不会影响 mSimModeCurr /// 系统重启时,mSimModeCurr = SimMode ,之后怎么变化都不会影响 mSimModeCurr
/// </summary> /// </summary>
public SIM_MODE SimMode public SIM_MODE SimMode { get; set; } = SIM_MODE.Coating;
{
get {
return simmode;
}
set {
if (simmode != value)
{
simmode = value;
NotifyPropertyChanged("SimMode");
}
}
}
/// <summary> /// <summary>
/// 当前模拟类型 /// 当前模拟类型
...@@ -104,16 +95,9 @@ namespace FLY.Simulation.Flyad7 ...@@ -104,16 +95,9 @@ namespace FLY.Simulation.Flyad7
//public SimDrive_Servo mSimDriveServo = new SimDrive_Servo(); //public SimDrive_Servo mSimDriveServo = new SimDrive_Servo();
#endregion #endregion
private string param_path;
public FLYAD7():this("simulation_flyad7.xml")
{
} public FLYAD7()
public FLYAD7(string param_path)
{ {
this.param_path = param_path;
PosOfGrid = 10;
Load(); Load();
mSimMode = SimMode; mSimMode = SimMode;
...@@ -230,14 +214,38 @@ namespace FLY.Simulation.Flyad7 ...@@ -230,14 +214,38 @@ namespace FLY.Simulation.Flyad7
} }
string file_path = "simulation_flyad7.json";
public void Save() public void Save()
{ {
Misc.SaveToXmlHepler.Save(param_path, this);
var p = FlyAd7JsonDb.Mapper.Map<FlyAd7JsonDb>(this);
try
{
File.WriteAllText(file_path, JsonConvert.SerializeObject(p, Formatting.Indented));
}
catch
{
//异常,没有json 编码失败
}
} }
public void Load()
void Load()
{ {
Misc.SaveToXmlHepler.Load(param_path, this); try
{
if (File.Exists(file_path))
{
string json = File.ReadAllText(file_path);
var p = JsonConvert.DeserializeObject<FlyAd7JsonDb>(json);
FlyAd7JsonDb.Mapper.Map(p, this);
}
}
catch
{
//异常,没有json 解码失败
}
} }
...@@ -604,26 +612,16 @@ namespace FLY.Simulation.Flyad7 ...@@ -604,26 +612,16 @@ namespace FLY.Simulation.Flyad7
} }
private MOTORTYPE motorType = MOTORTYPE.VF0;
public MOTORTYPE MotorType public MOTORTYPE MotorType { get; set; } = MOTORTYPE.VF0;
void OnMotorTypeChanged()
{ {
get //TODO
{ mSimDrive.MotorType = MotorType;
return motorType;
}
set
{
if (motorType != value)
{
motorType = value;
//TODO
mSimDrive.MotorType = value;
}
}
} }
//1个Grid=?脉冲数(2B) //1个Grid=?脉冲数(2B)
public UInt16 PosOfGrid { get; set; } public UInt16 PosOfGrid { get; set; } = 10;
...@@ -644,24 +642,12 @@ namespace FLY.Simulation.Flyad7 ...@@ -644,24 +642,12 @@ namespace FLY.Simulation.Flyad7
public Int16 PosOffset { get; set; } public Int16 PosOffset { get; set; }
UInt32 jogVelocity=500; public UInt32 JogVelocity { get; set; } = 500;
public UInt32 JogVelocity void OnJogVelocityChanged() {
{ //TODO
get mOrderMan.order_forw.Velocity = (int)JogVelocity;
{ mOrderMan.order_backw.Velocity = (int)JogVelocity;
return jogVelocity;
}
set
{
if (jogVelocity != value)
{
jogVelocity = value;
mOrderMan.order_forw.Velocity = (int)JogVelocity;
mOrderMan.order_backw.Velocity = (int)JogVelocity;
}
}
} }
#region 速度 #region 速度
UInt32 velocity; UInt32 velocity;
public UInt32 Velocity public UInt32 Velocity
...@@ -1101,19 +1087,43 @@ namespace FLY.Simulation.Flyad7 ...@@ -1101,19 +1087,43 @@ namespace FLY.Simulation.Flyad7
#endregion #endregion
#endregion #endregion
public string[] GetSavePropertyNames()
{
return new string[] {
"LocalEP",
"SimMode",
"MotorType"
};
}
public void SetVelocity(uint velocity) public void SetVelocity(uint velocity)
{ {
Velocity = velocity; Velocity = velocity;
} }
}
public class FlyAd7JsonDb
{
public static Mapper Mapper { get; } = new AutoMapper.Mapper(new MapperConfiguration(c =>
{
c.CreateMap<FLYAD7, FlyAd7JsonDb>().ForMember(d => d.Addr, opt =>
{
opt.MapFrom(s=>s.LocalEP.ToString());
}).ReverseMap().ForMember(d => d.LocalEP, opt =>
{
opt.MapFrom(s => Misc.StringConverter.ToIPEndPoint(s.Addr));
});
}));
public string Addr;
public SIM_MODE SimMode;
public MOTORTYPE MotorType;
public UInt16 PosOfGrid;
/// <summary>
/// //电机比例(2B)
/// </summary>
public UInt16 Ratio01;
/// <summary>
/// 脉冲比例(2B)
/// </summary>
public UInt16 Ratio02;
public UInt32 JogVelocity;
public Int16 PosOffset;
} }
public static class FLYAD7_IODefinition public static class FLYAD7_IODefinition
{ {
......
...@@ -101,6 +101,7 @@ namespace FLY.Simulation.Flyad7.OBJProxy ...@@ -101,6 +101,7 @@ namespace FLY.Simulation.Flyad7.OBJProxy
Data.MotorType = motortype; Data.MotorType = motortype;
Data.Ratio01 = pack.ratio01; Data.Ratio01 = pack.ratio01;
Data.Ratio02 = pack.ratio02; Data.Ratio02 = pack.ratio02;
Data.Save();
} break; } break;
case FLYAD7_OBJ_INTERFACE.SYS_DATA_INTERFACE.SET_ZERO_POS: case FLYAD7_OBJ_INTERFACE.SYS_DATA_INTERFACE.SET_ZERO_POS:
{ {
...@@ -109,6 +110,7 @@ namespace FLY.Simulation.Flyad7.OBJProxy ...@@ -109,6 +110,7 @@ namespace FLY.Simulation.Flyad7.OBJProxy
break; break;
Data.PosOffset = pack.zero_pos; Data.PosOffset = pack.zero_pos;
Data.JogVelocity = pack.jog_velocity; Data.JogVelocity = pack.jog_velocity;
Data.Save();
} break; } break;
} }
} }
......
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
<Name>FLY.Simulation</Name> <Name>FLY.Simulation</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.2.5</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
...@@ -55,6 +55,11 @@ ...@@ -55,6 +55,11 @@
<Name>Misc</Name> <Name>Misc</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.2.5</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
...@@ -186,18 +186,13 @@ ...@@ -186,18 +186,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Costura.Fody"> <PackageReference Include="Costura.Fody">
<Version>3.3.3</Version> <Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Fody">
<Version>4.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Newtonsoft.Json"> <PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version> <Version>12.0.3</Version>
</PackageReference> </PackageReference>
<PackageReference Include="PropertyChanged.Fody"> <PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version> <Version>3.2.5</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
...@@ -201,12 +201,7 @@ ...@@ -201,12 +201,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Costura.Fody"> <PackageReference Include="Costura.Fody">
<Version>3.3.3</Version> <Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="Fody">
<Version>4.2.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="MathNet.Numerics"> <PackageReference Include="MathNet.Numerics">
<Version>4.9.0</Version> <Version>4.9.0</Version>
...@@ -218,10 +213,10 @@ ...@@ -218,10 +213,10 @@
<Version>12.0.3</Version> <Version>12.0.3</Version>
</PackageReference> </PackageReference>
<PackageReference Include="PropertyChanged.Fody"> <PackageReference Include="PropertyChanged.Fody">
<Version>2.6.1</Version> <Version>3.2.5</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Unity"> <PackageReference Include="Unity">
<Version>5.11.1</Version> <Version>5.11.7</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -82,7 +82,7 @@ namespace FLY.Thick.Base.UI.OnInit ...@@ -82,7 +82,7 @@ namespace FLY.Thick.Base.UI.OnInit
DynArea dynarea = s as DynArea; DynArea dynarea = s as DynArea;
var t = tags.Find(_t => _t.dynArea == dynarea); var t = tags.Find(_t => _t.dynArea == dynarea);
if (e.PropertyName == "ControllerState") if (e.PropertyName == nameof(DynArea.ControllerState))
{ {
UpdateControllerState(t); UpdateControllerState(t);
} }
...@@ -104,6 +104,8 @@ namespace FLY.Thick.Base.UI.OnInit ...@@ -104,6 +104,8 @@ namespace FLY.Thick.Base.UI.OnInit
return; return;
//找出设备页面 //找出设备页面
if (manager.layout.GageTabItems == null)
return;
var gageTabItems = from _gageTabItem in manager.layout.GageTabItems where _gageTabItem.ServiceContainerName == rontainerName select _gageTabItem; var gageTabItems = from _gageTabItem in manager.layout.GageTabItems where _gageTabItem.ServiceContainerName == rontainerName select _gageTabItem;
if (gageTabItems.Count() == 0) if (gageTabItems.Count() == 0)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment