Commit 3e1fb23d authored by 潘栩锋's avatar 潘栩锋 🚴

优化 称重删除与 BlowingDetectServiceClient 的连接,直接用 DynArea

parent e6934bce
......@@ -71,6 +71,10 @@
<Compile Include="Server\WeightSystem.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Project.FLY.Thick.Blowing\FLY.Thick.Blowing\FLY.Thick.Blowing.csproj">
<Project>{cc20abeb-59f6-492b-a963-51121eb5ae66}</Project>
<Name>FLY.Thick.Blowing</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.FObjSys\FObjBaseReflect\FObjBase.Reflect.csproj">
<Project>{15F40C32-D546-4B2A-8D80-B3DDBCDAA690}</Project>
<Name>FObjBase.Reflect</Name>
......@@ -95,10 +99,6 @@
<Project>{91a1aafe-a528-4c2e-a48a-9259e780255a}</Project>
<Name>FLY.Thick.Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project.FLY.Thick.Blowing\FLY.Thick.Blowing\FLY.Thick.Blowing.csproj">
<Project>{cc20abeb-59f6-492b-a963-51121eb5ae66}</Project>
<Name>FLY.Thick.Blowing</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.SQLiteHelper\SQLiteHelper\SQLiteHelper.csproj">
<Project>{4CBABFAA-1C62-4510-AC63-A51EE5FD50FF}</Project>
<Name>SQLiteHelper</Name>
......
......@@ -93,34 +93,29 @@ namespace FLY.Weight.Server
#region 与服务器同步的数据
FObjServiceClientManager.Instance.ConnAddrs.Add(new ConnAddr() { ConnName = connName, Addr = mSysParam.BlowingAddr });
mBDetect = new Thick.Blowing.Client.BlowingDetectServiceClient(FLY.Thick.Blowing.OBJ_INTERFACE.OBJ_INTERFACE_ID.BDETECT_ID, connName);
tDGageServiceClient = new Thick.Base.Client.TDGageServiceClient(FLY.Thick.Blowing.OBJ_INTERFACE.OBJ_INTERFACE_ID.TDGAGE_ID, connName);
#endregion
mBDetect.PropertyChanged += MBDetect_PropertyChanged;
tDGageServiceClient.DynArea.PropertyChanged += DynArea_PropertyChanged;
}
private void DynArea_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Thick.Base.Common.DynArea.Width)) {
mData.Accessory.TotalFilmWidth = (float)((int)tDGageServiceClient.DynArea.Width);
}
}
if (e.PropertyName == nameof(Thick.Base.Common.DynArea.Width))
{
double v = Math.Round(tDGageServiceClient.DynArea.Width / 10.0);
v = Math.Round(v * 10);
private void MBDetect_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(mBDetect.FilmVelocity))
mData.Accessory.TotalFilmWidth = (float)v;
}
else if (e.PropertyName == nameof(Thick.Base.Common.DynArea.FilmVelocity))
{
mData.Accessory.CurrentVelocitySet = (float)mBDetect.FilmVelocity;
double v = Math.Round(tDGageServiceClient.DynArea.FilmVelocity);
mData.Accessory.CurrentVelocitySet = (float)v;
}
}
}
}
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