Commit 51ba77ec authored by 潘栩锋's avatar 潘栩锋 🚴

1.优化 IFixService 改为轮询模式, 使用 FObj.Reflect 作为服务代理

2.添加 测试模式,DynArea.IsTest, 就是 B=100, 不需要找边界。 用于没有膜时,测试机架。
3.删除 系统参数界面 删除 编码器2 放大设置
parent aaba269c
...@@ -227,8 +227,8 @@ ...@@ -227,8 +227,8 @@
</Compile> </Compile>
<Compile Include="UiModule\FixGraph\FixGraphItemParam.cs" /> <Compile Include="UiModule\FixGraph\FixGraphItemParam.cs" />
<Compile Include="UiModule\FixGraph\FixGraphParams.cs" /> <Compile Include="UiModule\FixGraph\FixGraphParams.cs" />
<Compile Include="UiModule\FixGraph\FixGraphViewModel.cs" /> <Compile Include="UiModule\FixGraph\FixGraphVm.cs" />
<Compile Include="UiModule\FixGraph\FixGraphViewModel_UnitTest.cs" /> <Compile Include="UiModule\FixGraph\FixGraphVmUt.cs" />
<Compile Include="UiModule\FixGraph\PgFixAnalyze.xaml.cs"> <Compile Include="UiModule\FixGraph\PgFixAnalyze.xaml.cs">
<DependentUpon>PgFixAnalyze.xaml</DependentUpon> <DependentUpon>PgFixAnalyze.xaml</DependentUpon>
</Compile> </Compile>
......
...@@ -117,15 +117,6 @@ ...@@ -117,15 +117,6 @@
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="编码器2放大" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Encoder2_comp}" HorizontalAlignment="Left"/>
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" >
<Run Text="倍"/>
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding IsSelected,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed, ElementName=comboBoxotem_ROUND}"> <StackPanel Orientation="Horizontal" Visibility="{Binding IsSelected,Converter={StaticResource visbilityconv},ConverterParameter=Collapsed, ElementName=comboBoxotem_ROUND}">
......
...@@ -22,16 +22,21 @@ ...@@ -22,16 +22,21 @@
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Border Style="{StaticResource BorderStyle_module}" Name="Border_AD" > <Border Style="{StaticResource Styles.Module.Border}" Name="Border_AD" >
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="auto" /> <RowDefinition Height="auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid x:Name="grid_initparam"/> <Grid x:Name="grid_initparam"/>
<Border Background="{StaticResource Background_Title}" CornerRadius="3" Height="130" > <Border Background="{StaticResource Brushes.TitleBar.Background}" CornerRadius="3" Height="130" >
<Grid> <Grid>
<Viewbox Margin="10"> <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-4" Visibility="{Binding IsTest,Converter={StaticResource visbilityconv}}"
Style="{StaticResource Styles.Card.Title}"
Background="{StaticResource MahApps.Brushes.SemiTransparent}"
Foreground="{StaticResource Brushes.TitleBar.Foreground}"
Text="测试模式" />
<Viewbox Margin="10">
<TextBlock Text="{Binding Thk,StringFormat={}{0:F1}}" Foreground="White" FontSize="30" FontWeight="Bold" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" /> <TextBlock Text="{Binding Thk,StringFormat={}{0:F1}}" Foreground="White" FontSize="30" FontWeight="Bold" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" />
</Viewbox> </Viewbox>
<TextBlock Text="{Binding ControllerState,Converter={StaticResource ctrlstateconv}}" FontSize="12" FontFamily="Microsoft Sans Serif" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="White" Margin="5"/> <TextBlock Text="{Binding ControllerState,Converter={StaticResource ctrlstateconv}}" FontSize="12" FontFamily="Microsoft Sans Serif" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="White" Margin="5"/>
......
...@@ -31,7 +31,7 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -31,7 +31,7 @@ namespace FLY.Thick.Base.UI.UiModule
/// </summary> /// </summary>
public partial class FixGraph : UserControl public partial class FixGraph : UserControl
{ {
FixGraphViewModel viewModel; FixGraphVm viewModel;
FixGraphItemParam graphparam; FixGraphItemParam graphparam;
public FixGraph() public FixGraph()
{ {
...@@ -51,7 +51,7 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -51,7 +51,7 @@ namespace FLY.Thick.Base.UI.UiModule
} }
//获取设备 //获取设备
viewModel = new FixGraphViewModel(); viewModel = new FixGraphVm();
viewModel.Init(fixService, graphparam); viewModel.Init(fixService, graphparam);
this.DataContext = viewModel; this.DataContext = viewModel;
......
...@@ -13,7 +13,7 @@ using FLY.Thick.Base.UI; ...@@ -13,7 +13,7 @@ using FLY.Thick.Base.UI;
namespace FLY.Thick.Base.UI.UiModule namespace FLY.Thick.Base.UI.UiModule
{ {
public class FixGraphViewModel : ISaveManager, INotifyPropertyChanged public class FixGraphVm : ISaveManager, INotifyPropertyChanged
{ {
#region 图表控制 #region 图表控制
/// <summary> /// <summary>
...@@ -113,10 +113,10 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -113,10 +113,10 @@ namespace FLY.Thick.Base.UI.UiModule
/// </summary> /// </summary>
const int values_cap = 1000; const int values_cap = 1000;
IFixService mFixService; IFixService fixService;
FixGraphItemParam graphparam; FixGraphItemParam graphparam;
DateTime updateTime;
public FixGraphViewModel() public FixGraphVm()
{ {
#region 与数据无关界面参数 #region 与数据无关界面参数
XFormatter = (x) => XFormatter = (x) =>
...@@ -132,18 +132,31 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -132,18 +132,31 @@ namespace FLY.Thick.Base.UI.UiModule
} }
public void Init(IFixService fixService, FixGraphItemParam bulkGraphItemFix) public void Init(IFixService fixService, FixGraphItemParam bulkGraphItemFix)
{ {
mFixService = fixService; this.fixService = fixService;
graphparam = bulkGraphItemFix; graphparam = bulkGraphItemFix;
Update4Graphparam(); Update4Graphparam();
graphparam.PropertyChanged += Graphparam_PropertyChanged; graphparam.PropertyChanged += Graphparam_PropertyChanged;
mFixService.RegistTimeGridEvent(new FixEventHandler(mFixService_TimeGridEvent)); this.fixService.PropertyChanged += FixService_PropertyChanged;
this.PropertyChanged += FixGraphViewModel_PropertyChanged; this.PropertyChanged += FixGraphViewModel_PropertyChanged;
} }
private void FixService_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(fixService.UpdateTime))
{
//检测是哪个变化了
if (fixService.UpdateTime != updateTime)
{
//变化了
//向服务获取数据
fixService.GetFixDatas(fixService_GetFixDatas, this);
}
}
}
private void FixGraphViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e) private void FixGraphViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
{ {
if (e.PropertyName == "AutoTarget") if (e.PropertyName == "AutoTarget")
...@@ -358,18 +371,19 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -358,18 +371,19 @@ namespace FLY.Thick.Base.UI.UiModule
List<double> data_mix = new List<double>(); List<double> data_mix = new List<double>();
#endregion #endregion
void mFixService_TimeGridEvent(object sender, FixEventArgs e) void fixService_GetFixDatas(object asyncContext, object retData)
{ {
var reponse = retData as GetFixDatasReponse;
if (IsPaused) if (IsPaused)
return; return;
//输入1.28ms 的数据, 输出 混合为mix,间隔为 interval 的数据 //输入1.28ms 的数据, 输出 混合为mix,间隔为 interval 的数据
List<double> data_out = new List<double>(); List<double> data_out = new List<double>();
for (int i = 0; i < e.thicks.Length; i++) for (int i = 0; i < reponse.thicks.Length; i++)
{ {
double v = (IsADMode) ? e.ADs[i] : e.thicks[i]; double v = (IsADMode) ? reponse.ADs[i] : reponse.thicks[i];
data_interval.Add(v); data_interval.Add(v);
data_interval_totaltime += e.ts; data_interval_totaltime += reponse.ts;
if (data_interval_totaltime >= Interval) if (data_interval_totaltime >= Interval)
{ {
...@@ -387,10 +401,11 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -387,10 +401,11 @@ namespace FLY.Thick.Base.UI.UiModule
if (data_out.Count() > 0) if (data_out.Count() > 0)
{ {
Time = e.time; Time = reponse.time;
AddPoint(data_out); AddPoint(data_out);
} }
} }
void UpdateStat() void UpdateStat()
{ {
if (mDatas.Count() == 0) if (mDatas.Count() == 0)
......
...@@ -8,7 +8,7 @@ using System.Threading.Tasks; ...@@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace FLY.Thick.Base.UI.UiModule namespace FLY.Thick.Base.UI.UiModule
{ {
public class FixGraphViewModel_UnitTest : INotifyPropertyChanged public class FixGraphVmUt : INotifyPropertyChanged
{ {
#region 图表控制 #region 图表控制
public double YMax { get; set; } = double.NaN; public double YMax { get; set; } = double.NaN;
...@@ -56,7 +56,7 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -56,7 +56,7 @@ namespace FLY.Thick.Base.UI.UiModule
const int TotalValueCountInView = 1000; const int TotalValueCountInView = 1000;
public FixGraphViewModel_UnitTest() public FixGraphVmUt()
{ {
#region 与数据无关界面参数 #region 与数据无关界面参数
XFormatter = (x) => XFormatter = (x) =>
......
...@@ -9,84 +9,29 @@ using FObjBase; ...@@ -9,84 +9,29 @@ using FObjBase;
using FLY.Thick.Base.IService; using FLY.Thick.Base.IService;
using FLY.Thick.Base.OBJ_INTERFACE; using FLY.Thick.Base.OBJ_INTERFACE;
using FLY.Thick.Base.Common; using FLY.Thick.Base.Common;
using FObjBase.Reflect;
namespace FLY.Thick.Base.Client namespace FLY.Thick.Base.Client
{ {
public class FixServiceClient : FObjServiceClient, IFixService public class FixServiceClient : FObjBase.Reflect.Reflect_SeviceClient, IFixService
{ {
protected override Type InterfaceType => typeof(IFixService);
public FixServiceClient(UInt32 serviceId) : base(serviceId) { } public FixServiceClient(UInt32 serviceId) : base(serviceId) { }
public FixServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { } public FixServiceClient(UInt32 serviceId, string connName) : base(serviceId, connName) { }
#region IFlyAD接口
/// <summary>
/// 注册timegrid 事件
/// </summary>
/// <param name="handler"></param>
public void RegistTimeGridEvent(FixEventHandler handler)
{
FixEvent += handler;
CurrObjSys.SenseConfigEx(
mConn, mServerID, ID,
Misc.MyBase.BIT(FIX_OBJ_INTERFACE.PUSH_TIMEGRID),
SENSE_CONFIG.ADD);
}
/// <summary>
/// 关闭注册timegrid 事件
/// </summary>
/// <param name="handler"></param>
public void UnRegistTimeGridEvent(FixEventHandler handler)
{
FixEvent -= handler;
if (FixEvent == null)
{
CurrObjSys.SenseConfigEx(
mConn, mServerID, ID,
Misc.MyBase.BIT(FIX_OBJ_INTERFACE.PUSH_TIMEGRID),
SENSE_CONFIG.REMOVE);
}
}
event FixEventHandler FixEvent; public DateTime UpdateTime { get; set; }
#endregion [Call(typeof(GetFixDatasReponse))]
public void GetFixDatas(AsyncCBHandler asyncDelegate, object asyncContext)
public override void ConnectNotify(IFConn from)
{ {
base.ConnectNotify(from); Call(nameof(GetFixDatas), null, asyncDelegate, asyncContext);
if (from.IsConnected)
{
//设置推送
if (FixEvent != null)
{
UInt32 sense_mask = Misc.MyBase.BIT(FIX_OBJ_INTERFACE.PUSH_TIMEGRID);
CurrObjSys.SenseConfigEx(
mConn, mServerID, ID,
sense_mask,
SENSE_CONFIG.ADD);
}
}
} }
public override void PushInfo(IFConn from, uint srcid, ushort infoid, byte[] infodata)
{
switch (infoid)
{
case FIX_OBJ_INTERFACE.PUSH_TIMEGRID:
{
string json = Misc.Converter.BytesToString(infodata);
var p = Newtonsoft.Json.JsonConvert.DeserializeObject<FixEventArgs>(json);
FixEvent?.Invoke(this, p);
} break;
}
}
} }
} }
\ No newline at end of file
...@@ -116,6 +116,11 @@ namespace FLY.Thick.Base.Common ...@@ -116,6 +116,11 @@ namespace FLY.Thick.Base.Common
/// </summary> /// </summary>
public int AutoScanCounter { get; set; } = 5; public int AutoScanCounter { get; set; } = 5;
/// <summary>
/// 测试模式
/// </summary>
public bool IsTest { get; set; }
#endregion #endregion
#region IO #region IO
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<Compile Include="Client\FlyADServiceClient.cs" /> <Compile Include="Client\FlyADServiceClient.cs" />
<Compile Include="Client\GageInfoServiceClient.cs" /> <Compile Include="Client\GageInfoServiceClient.cs" />
<Compile Include="Client\GetSampleServiceClient.cs" /> <Compile Include="Client\GetSampleServiceClient.cs" />
<Compile Include="Client\FlyAdIoDefineServiceClient.cs" />
<Compile Include="Client\InitParamServiceClient.cs" /> <Compile Include="Client\InitParamServiceClient.cs" />
<Compile Include="Client\RejectServiceClient.cs" /> <Compile Include="Client\RejectServiceClient.cs" />
<Compile Include="Client\ScanCorrServiceClient.cs" /> <Compile Include="Client\ScanCorrServiceClient.cs" />
...@@ -78,6 +79,7 @@ ...@@ -78,6 +79,7 @@
<Compile Include="IService\IBorderSearchService.cs" /> <Compile Include="IService\IBorderSearchService.cs" />
<Compile Include="IService\ICurveService.cs" /> <Compile Include="IService\ICurveService.cs" />
<Compile Include="IService\IFixService.cs" /> <Compile Include="IService\IFixService.cs" />
<Compile Include="IService\IFlyAdIoDefineService.cs" />
<Compile Include="IService\IFlyADService.cs" /> <Compile Include="IService\IFlyADService.cs" />
<Compile Include="IService\IGageInfoService.cs" /> <Compile Include="IService\IGageInfoService.cs" />
<Compile Include="IService\IGetSampleService.cs" /> <Compile Include="IService\IGetSampleService.cs" />
...@@ -93,8 +95,6 @@ ...@@ -93,8 +95,6 @@
<Compile Include="OBJ_INTERFACE\GETSAMPLE_OBJ_INTERFACE.cs" /> <Compile Include="OBJ_INTERFACE\GETSAMPLE_OBJ_INTERFACE.cs" />
<Compile Include="OBJ_INTERFACE\SCANCORR_OBJ_INTERFACE.cs" /> <Compile Include="OBJ_INTERFACE\SCANCORR_OBJ_INTERFACE.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Server.OBJProxy\Fix_OBJProxy.cs" />
<Compile Include="Server.OBJProxy\Gage_ObjProxy.cs" />
<Compile Include="Server.OBJProxy\GetSample_OBJProxy.cs" /> <Compile Include="Server.OBJProxy\GetSample_OBJProxy.cs" />
<Compile Include="Server.OBJProxy\ScanCorr_OBJProxy.cs" /> <Compile Include="Server.OBJProxy\ScanCorr_OBJProxy.cs" />
<Compile Include="Server\BoltMapImg.cs" /> <Compile Include="Server\BoltMapImg.cs" />
......
using System; using FObjBase;
using FObjBase.Reflect;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -8,23 +11,16 @@ namespace FLY.Thick.Base.IService ...@@ -8,23 +11,16 @@ namespace FLY.Thick.Base.IService
/// <summary> /// <summary>
/// 定点测量服务 /// 定点测量服务
/// </summary> /// </summary>
public interface IFixService public interface IFixService : INotifyPropertyChanged
{ {
/// <summary> DateTime UpdateTime { get; }
/// 注册timegrid 事件
/// </summary> [Call(typeof(GetFixDatasReponse))]
/// <param name="handler"></param> void GetFixDatas(AsyncCBHandler asyncDelegate, object asyncContext);
void RegistTimeGridEvent(FixEventHandler handler);
/// <summary>
/// 关闭注册timegrid 事件
/// </summary>
/// <param name="handler"></param>
void UnRegistTimeGridEvent(FixEventHandler handler);
} }
public delegate void FixEventHandler(object sender, FixEventArgs e);
public class FixEventArgs : EventArgs public class GetFixDatasReponse
{ {
/// <summary> /// <summary>
/// 数据, AD数据!!!!! /// 数据, AD数据!!!!!
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FObjBase;
using FLY.Thick.Base.Server;
using FLY.Thick.Base.OBJ_INTERFACE;
using FLY.Thick.Base.IService;
using FLY.Thick.Base.Common;
namespace FLY.Thick.Base.Server.OBJProxy
{
public class Fix_OBJProxy: FObj
{
#region 延时推送 MARKNO
#endregion
IFixService mFix;
public Fix_OBJProxy(int objsys_idx, UInt32 id, IFixService fix)
: base(objsys_idx)
{
ID = id;
mFix = fix;
mFix.RegistTimeGridEvent(new FixEventHandler(GM_Fix_TimeGridEvent));
}
void GM_Fix_TimeGridEvent(object sender, FixEventArgs e)
{
string json = Newtonsoft.Json.JsonConvert.SerializeObject(e);
CurrObjSys.PushObjInfoEx(
this, FIX_OBJ_INTERFACE.PUSH_TIMEGRID,
Misc.Converter.StringToBytes(json));
}
#region FObj 重载
#endregion
}
}
...@@ -8,6 +8,8 @@ using System.ComponentModel; ...@@ -8,6 +8,8 @@ using System.ComponentModel;
using FLY.Thick.Base.Common; using FLY.Thick.Base.Common;
using FLY.Thick.Base.IService; using FLY.Thick.Base.IService;
using Misc; using Misc;
using FlyADBase;
using FObjBase;
namespace FLY.Thick.Base.Server namespace FLY.Thick.Base.Server
{ {
...@@ -22,6 +24,11 @@ namespace FLY.Thick.Base.Server ...@@ -22,6 +24,11 @@ namespace FLY.Thick.Base.Server
public bool IsRunning { get; protected set; } public bool IsRunning { get; protected set; }
#endregion #endregion
#region IFixService
public DateTime UpdateTime { get; private set; }
#endregion
/// <summary> /// <summary>
/// 闲置时(IsRunning==false) 忽略数据 /// 闲置时(IsRunning==false) 忽略数据
/// </summary> /// </summary>
...@@ -29,7 +36,7 @@ namespace FLY.Thick.Base.Server ...@@ -29,7 +36,7 @@ namespace FLY.Thick.Base.Server
FlyADBase.FlyAD7 mFlyAD; FlyADBase.FlyAD7 mFlyAD;
DynArea mDynArea; DynArea mDynArea;
AD2ThkHandler Ad2Thk; AD2ThkHandler Ad2Thk;
GetFixDatasReponse reponse;
public GM_Fix() public GM_Fix()
{ {
...@@ -53,15 +60,12 @@ namespace FLY.Thick.Base.Server ...@@ -53,15 +60,12 @@ namespace FLY.Thick.Base.Server
void flyad_TimeGridEvent(object sender, FlyADBase.TimeGridEventArgs e) void flyad_TimeGridEvent(object sender, FlyADBase.TimeGridEventArgs e)
{ {
//if (IsIgnoreDataWhenIdle && !IsRunning)
// return;
DateTime dt = e.Time; DateTime dt = e.Time;
TimeSpan ts = e.Ts; TimeSpan ts = e.Ts;
List<int> data = new List<int>(e.Data); var datas = e.Data.ToArray();
//1秒数据 //1秒数据
Data1s.AddRange(data); Data1s.AddRange(datas);
if (TimeSpan.FromTicks(Data1s.Count * ts.Ticks) >= TimeSpan.FromSeconds(1)) if (TimeSpan.FromTicks(Data1s.Count * ts.Ticks) >= TimeSpan.FromSeconds(1))
{ {
int ad = (int)Data1s.Average(); int ad = (int)Data1s.Average();
...@@ -73,35 +77,16 @@ namespace FLY.Thick.Base.Server ...@@ -73,35 +77,16 @@ namespace FLY.Thick.Base.Server
//转换为thick //转换为thick
List<double> thicks = new List<double>(); double[] thks = datas.Select((ad) => Ad2Thk(ad)).ToArray();
foreach(int ad in data)
{
double thk = Ad2Thk(ad);
thicks.Add(thk);
}
//需要限制大小,push 不能太大 reponse = new GetFixDatasReponse()
//分拆为多个包
int size = 200;
while (data.Count()>0)
{ {
int cnt = (data.Count() > size) ? size : data.Count(); ADs = datas,
int[] ADs2 = data.Take(cnt).ToArray(); thicks = thks,
double[] thicks2 = thicks.Take(cnt).ToArray(); time = dt,
ts = TimeGridAdvHelperExt.ad_ts
data.RemoveRange(0, cnt); };
thicks.RemoveRange(0, cnt); UpdateTime = dt;
FixEvent?.Invoke(this,
new FixEventArgs()
{
time = dt,
ts = ts,
ADs = ADs2,
thicks = thicks2
});
dt += TimeSpan.FromTicks(cnt * ts.Ticks);
}
} }
#region IGageMode #region IGageMode
...@@ -120,24 +105,9 @@ namespace FLY.Thick.Base.Server ...@@ -120,24 +105,9 @@ namespace FLY.Thick.Base.Server
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public void GetFixDatas(AsyncCBHandler asyncDelegate, object asyncContext)
event FixEventHandler FixEvent;
/// <summary>
/// 注册定点数据事件 FixEvent += handler;
/// </summary>
/// <param name="handler"></param>
public void RegistTimeGridEvent(FixEventHandler handler)
{
FixEvent += handler;
}
/// <summary>
/// 取消注册定点数据事件 FixEvent -= handler;
/// </summary>
/// <param name="handler"></param>
public void UnRegistTimeGridEvent(FixEventHandler handler)
{ {
FixEvent -= handler; asyncDelegate(asyncContext, reponse);
} }
} }
} }
...@@ -241,7 +241,7 @@ namespace FLY.Thick.Base.Server ...@@ -241,7 +241,7 @@ namespace FLY.Thick.Base.Server
/// <summary> /// <summary>
/// 保存 /// 保存
/// </summary> /// </summary>
void Save() public void Save()
{ {
string json = Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); string json = Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
File.WriteAllText(param_path, json); File.WriteAllText(param_path, json);
......
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