ReferenceFigure.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using ScottPlot;
  11. using ScottPlot.Plottable;
  12. using Uestc.Auto6.Dso.Core;
  13. using System.Threading;
  14. using Uestc.Auto6.Dso.ComModel;
  15. using System.Diagnostics;
  16. using ScottPlot.Renderable;
  17. using Uni_Trend.MSO7000X.Common.Structs;
  18. using EventBus;
  19. namespace Uestc.Auto6.Dso.U2
  20. {
  21. public partial class ReferenceFigure : BaseDisplayForm, ITimebaseView, ITriggerView, IChnlView
  22. {
  23. public ReferenceFigure(DisplayPrsnt displayPrsnt)
  24. {
  25. InitializeComponent();
  26. ConfigureWavePlot();
  27. _TimerRefresh.Interval = 50;
  28. _TimerRefresh.Tick += TimerRefresh_Tick;
  29. _TimerRefresh.Enabled = true;
  30. _DrawMode = displayPrsnt.DrawMode;
  31. _WfmIntensity = displayPrsnt.WfmIntensity;
  32. _GridStyle = displayPrsnt.GridStyle;
  33. _GridIntensity = displayPrsnt.GridIntensity;
  34. _AxisTickVisible = displayPrsnt.AxisTickVisible;
  35. _XAxisTickBottom = displayPrsnt.XAxisTickBottom;
  36. _YAxisTickRight = displayPrsnt.YAxisTickRight;
  37. }
  38. private System.Windows.Forms.Timer _TimerRefresh = new System.Windows.Forms.Timer();
  39. private Boolean _IsRefreshing = false;
  40. private static readonly Object _ObjectLock = new();
  41. private Boolean _IsDraging = false;
  42. private WavePlot _WavePlot;
  43. public ChannelId Id;
  44. private VLIndicationArea vLIndicationArea;
  45. //private VRIndicationArea vRIndicationArea;
  46. //private HTIndicationArea hTIndicationArea;
  47. /// <summary>
  48. /// 视图设置窗口
  49. /// </summary>
  50. private TimeDomainViewSettingForm _TimeDomainViewSettingForm = null;
  51. #region WavePlot
  52. /// <summary>
  53. /// 更新波形
  54. /// </summary>
  55. private void DrawWave()
  56. {
  57. _IsRefreshing = true;
  58. AddWavePlot();
  59. if (Program.Oscilloscope.TryGetChannel(Id, out IChnlPrsnt channel))
  60. {
  61. //更新数据
  62. //if (channel.Pack != null)
  63. // _WavePlot.YTs = channel.Pack.Buffer;
  64. if (channel.VuDatabase.Current != null)
  65. {
  66. _WavePlot.YTs = (double[,])channel.VuDatabase.Current.Buffer;
  67. _WavePlot.SampleRate = channel.VuDatabase.Current.ZoomRatio;
  68. _WavePlot.OffsetX = channel.VuDatabase.Current.Start;
  69. }
  70. _WavePlot.Color = Color.FromArgb((Int32)(_WfmIntensity / 100d * 255), channel.DrawColor);
  71. //更新通道刻度信息
  72. if (Id == DsoPrsnt.FocusId)
  73. {
  74. ScottPlotFormControl.Plot.ResetChannelParameter((int)(channel as ReferencePrsnt).PosIndexBymDiv, (channel as ReferencePrsnt).Scale, (channel as ReferencePrsnt).Prefix.ToString(), channel.Unit, Color.FromArgb((Int32)(_GridIntensity / 100d * 255), Color.White/*channel.DrawColor*/));
  75. if (vLIndicationArea != null)
  76. {
  77. vLIndicationArea.IsFocused = true;
  78. }
  79. }
  80. else
  81. {
  82. if (vLIndicationArea != null)
  83. {
  84. vLIndicationArea.IsFocused = false;
  85. }
  86. }
  87. if (vLIndicationArea != null && _IsDraging == false)
  88. {
  89. vLIndicationArea.IsVisible = true;
  90. vLIndicationArea.Color = channel.DrawColor;
  91. vLIndicationArea.SetPosition(ScottPlotFormControl.Plot.YAxis.Dims.GetPixel(-(int)(channel as ReferencePrsnt).PosIndexBymDiv));
  92. }
  93. if (vLIndicationArea != null)
  94. {
  95. vLIndicationArea.Label = channel.Label;
  96. vLIndicationArea.Name = Id.ToString();
  97. }
  98. }
  99. //if (hTIndicationArea != null && _IsDraging == false)
  100. //{
  101. // double position = ScottPlotFormControl.Plot.XAxis.Dims.GetPixel(TmbPresenter.PosIndexBymDiv);
  102. // hTIndicationArea.SetPosition(position);
  103. //}
  104. ScottPlotFormControl.Plot.ResetTimebaseParameter((Int32)TmbPresenter.PosIndexBymDiv - 5000, TmbPresenter.ScaleByus, TmbPresenter.Prefix.ToString(), TmbPresenter.Unit, Color.FromArgb((Int32)(_GridIntensity / 100d * 255), Color.White));
  105. ScottPlotFormControl.Render(skipIfCurrentlyRendering: true);
  106. _IsRefreshing = false;
  107. }
  108. /// <summary>
  109. /// 添加波形
  110. /// </summary>
  111. private void AddWavePlot()
  112. {
  113. if (_WavePlot == null)
  114. if (Program.Oscilloscope.TryGetChannel(Id, out IChnlPrsnt channel))
  115. if (channel.Pack != null)
  116. _WavePlot = ScottPlotFormControl.Plot.AddWave(channel.Pack.Buffer, sampleRate: 1, isAfterglowOn: false, channel.DrawColor/*, label: channel.Id.ToString()*/);
  117. }
  118. /// <summary>
  119. /// 添加可拖拽指示区域
  120. /// </summary>
  121. private void AddDragArea()
  122. {
  123. PlotDimensions plotDimensions = ScottPlotFormControl.Plot.GetSettings().GetPlotDimensions(0, 0, 1);
  124. vLIndicationArea = ScottPlotFormControl.Plot.AddVLIndicationArea(plotDimensions, color: Color.Red);
  125. //vRIndicationArea = ScottPlotFormControl.Plot.AddVRIndicationArea(plotDimensions, color: Color.Yellow);
  126. //hTIndicationArea = ScottPlotFormControl.Plot.AddHTIndicationArea(plotDimensions, color: Color.OrangeRed,label:"T");
  127. double position0 = ScottPlotFormControl.Plot.YAxis.Dims.GetPixel(0);
  128. double position1 = ScottPlotFormControl.Plot.YAxis.Dims.GetPixel(0);
  129. double position2 = ScottPlotFormControl.Plot.XAxis.Dims.GetPixel(5000);
  130. vLIndicationArea.SetPosition(position0);
  131. //vRIndicationArea.SetPosition(position1);
  132. //hTIndicationArea.SetPosition(position2);
  133. vLIndicationArea.LabelFont = new Font("微软雅黑", 6);
  134. vLIndicationArea.Dragged += (sender, e) =>
  135. {
  136. if (Program.Oscilloscope.TryGetChannel(Id, out IChnlPrsnt channel))
  137. {
  138. double s = ScottPlotFormControl.Plot.YAxis.Dims.GetUnit((float)vLIndicationArea.GetIndicationValue());
  139. (channel as ReferencePrsnt).PosIndexBymDiv = s;
  140. }
  141. };
  142. vLIndicationArea.MouseDown += (sender, e) =>
  143. {
  144. DsoPrsnt.FocusId = Id;
  145. };
  146. //vRIndicationArea.Dragged += (sender, e) =>
  147. //{
  148. // // TrgPresenter.PosIndex = ScottPlotFormControl.Plot.YAxis.Dims.GetUnit((float)vRIndicationArea.GetIndicationValue());
  149. //};
  150. //hTIndicationArea.Dragged += (sender, e) =>
  151. //{
  152. // TmbPresenter.PosIndexBymDiv = ScottPlotFormControl.Plot.XAxis.Dims.GetUnit((float)hTIndicationArea.GetIndicationValue());
  153. //};
  154. ////更新拖动图片
  155. //vLIndicationArea.IndicationImage = new Bitmap(19,19);
  156. //vRIndicationArea.IndicationImage = new Bitmap(19,19);
  157. //hTIndicationArea.IndicationImage = new Bitmap(19,19);
  158. }
  159. /// <summary>
  160. /// 配置显示信息
  161. /// </summary>
  162. private void ConfigureWavePlot()
  163. {
  164. //控件属性配置
  165. ScottPlotFormControl.Configuration.MiddleClickAutoAxisMarginX = 0;
  166. ScottPlotFormControl.Configuration.Quality = 0;
  167. //波形线路名称
  168. ScottPlot.Renderable.Legend legend = ScottPlotFormControl.Plot.Legend();
  169. legend.FontColor = Color.Gray;
  170. legend.OutlineColor = Color.White;
  171. legend.FillColor = Color.Black;
  172. ScottPlotFormControl.Plot.AxisAutoX(margin: 0);
  173. ScottPlotFormControl.Plot.SetAxisLimits(xMin: 0, xMax: 10000, yMin: -5000, yMax: 5000);//初始视阈
  174. ScottPlotFormControl.Plot.SetViewLimits(xMin: -32768, xMax: 32768, yMin: -10000, yMax: 10000);//视阈限制
  175. ScottPlotFormControl.Dock = DockStyle.Fill;
  176. //图形颜色设置
  177. ScottPlotFormControl.Plot.Style(figureBackground: Color.Transparent, dataBackground: Color.Transparent, grid: Color.Gray, tick: Color.Gray, axisLabel: Color.White, titleLabel: Color.Gray);
  178. //网格属性配置
  179. ScottPlotFormControl.Plot.Grid(enable: true, color: Color.Gray, lineStyle: LineStyle.Dot);
  180. ScottPlotFormControl.BackColor = Color.Black;
  181. AddWavePlot();
  182. AddDragArea();
  183. ScottPlotFormControl.Plot.RenderEventHandler += ScottPlotFormControlPlot_RenderEventHandler;
  184. }
  185. private void ScottPlotFormControlPlot_RenderEventHandler(object sender, (Bitmap bmp, PlotDimensions plotDimensions, bool lowQuality) e)
  186. {
  187. CursorApp.Default?.DrawCursor(sender, e);
  188. }
  189. #endregion
  190. #region 窗口显示属性及配置
  191. private WfmDrawMode _DrawMode;
  192. /// <summary>
  193. /// 波形显示风格
  194. /// </summary>
  195. public WfmDrawMode DrawMode
  196. {
  197. get => _DrawMode;
  198. set => _DrawMode = value;
  199. }
  200. private Int32 _WfmIntensity;
  201. /// <summary>
  202. /// 波形亮度
  203. /// </summary>
  204. public Int32 WfmIntensity
  205. {
  206. get => _WfmIntensity;
  207. set => _WfmIntensity = value;
  208. }
  209. private GridType _GridStyle;
  210. /// <summary>
  211. /// 网格风格
  212. /// </summary>
  213. public GridType GridStyle
  214. {
  215. get => _GridStyle;
  216. set => _GridStyle = value;
  217. }
  218. private Int32 _GridIntensity;
  219. /// <summary>
  220. /// 网格亮度
  221. /// </summary>
  222. public Int32 GridIntensity
  223. {
  224. get => _GridIntensity;
  225. set => _GridIntensity = value;
  226. }
  227. private Boolean _AxisTickVisible;
  228. /// <summary>
  229. /// 标记是否可见
  230. /// </summary>
  231. public Boolean AxisTickVisible
  232. {
  233. get => _AxisTickVisible;
  234. set => _AxisTickVisible = value;
  235. }
  236. private Boolean _XAxisTickBottom;
  237. /// <summary>
  238. /// 水平标记是否显示在下方
  239. /// </summary>
  240. public Boolean XAxisTickBottom
  241. {
  242. get => _XAxisTickBottom;
  243. set => _XAxisTickBottom = value;
  244. }
  245. private Boolean _YAxisTickRight;
  246. /// <summary>
  247. /// 垂直标记是否显示在右方
  248. /// </summary>
  249. public Boolean YAxisTickRight
  250. {
  251. get => _YAxisTickRight;
  252. set => _YAxisTickRight = value;
  253. }
  254. /// <summary>
  255. /// 配置波形显示风格
  256. /// </summary>
  257. /// <param name="wfmDrawMode"></param>
  258. private void ConfigDrawMode(WfmDrawMode wfmDrawMode)
  259. {
  260. switch (wfmDrawMode)
  261. {
  262. case WfmDrawMode.Vector:
  263. ScottPlotFormControl.Plot.WavePlotStyle(WavePlotLineStyle.Vector);
  264. break;
  265. case WfmDrawMode.Dot:
  266. ScottPlotFormControl.Plot.WavePlotStyle(WavePlotLineStyle.Dot);
  267. break;
  268. default:
  269. break;
  270. }
  271. }
  272. /// <summary>
  273. /// 配置波形亮度
  274. /// </summary>
  275. /// <param name="wfmIntensity"></param>
  276. private void ConfigWfmIntensity(Int32 wfmIntensity)
  277. {
  278. ScottPlotFormControl.Plot.WavePlotStyle(wfmIntensity);
  279. }
  280. /// <summary>
  281. /// 配置水平标记的显示位置
  282. /// </summary>
  283. /// <param name="horizontalBottom"></param>
  284. private void ConfigHorizontalTickLabelDirection(Boolean horizontalBottom = true)
  285. {
  286. ScottPlotFormControl.Plot.XAxis.Edge = horizontalBottom == true ? ScottPlot.Renderable.Edge.Bottom : ScottPlot.Renderable.Edge.Top;
  287. }
  288. /// <summary>
  289. /// 配置垂直标记的显示位置
  290. /// </summary>
  291. /// <param name="virticalRight"></param>
  292. private void ConfigVirticalTickLabelDirection(Boolean virticalRight = true)
  293. {
  294. ScottPlotFormControl.Plot.YAxis.Edge = virticalRight == true ? ScottPlot.Renderable.Edge.Right : ScottPlot.Renderable.Edge.Left;
  295. }
  296. /// <summary>
  297. /// 配置标记label的显示
  298. /// </summary>
  299. /// <param name="visible"></param>
  300. private void ConfigTickLabelVisible(Boolean visible = true)
  301. {
  302. ScottPlotFormControl.Plot.XAxis.IsVisible = visible;
  303. ScottPlotFormControl.Plot.YAxis.IsVisible = visible;
  304. }
  305. /// <summary>
  306. /// 配置网格样式
  307. /// </summary>
  308. /// <param name="gridType"></param>
  309. private void ConfigGridStyle(GridType gridType)
  310. {
  311. switch (gridType)
  312. {
  313. case GridType.Full:
  314. ScottPlotFormControl.Plot.Grid(enable: true, lineStyle: LineStyle.Dot);
  315. ScottPlotFormControl.Plot.MinorTickVisible(true);
  316. break;
  317. case GridType.Brief:
  318. ScottPlotFormControl.Plot.Grid(enable: true, lineStyle: LineStyle.Dot);
  319. ScottPlotFormControl.Plot.MinorTickVisible(false);
  320. break;
  321. case GridType.None:
  322. ScottPlotFormControl.Plot.Grid(enable: false);
  323. ScottPlotFormControl.Plot.MinorTickVisible(false);
  324. break;
  325. default:
  326. break;
  327. }
  328. }
  329. /// <summary>
  330. /// 配置网格亮度
  331. /// </summary>
  332. /// <param name="GridIntensity"></param>
  333. private void ConfigGridIntensity(Int32 GridIntensity)
  334. {
  335. ScottPlotFormControl.Plot.Grid(color: Color.FromArgb((Int32)(GridIntensity / 100d * 255), Color.Gray));
  336. }
  337. private void OnLostFocusClick_FloatForm(object obj, EventArgs e)
  338. {
  339. var form = obj as Uni_Trend.MSO7000X.UserControls.FloatForm;
  340. if (form != null)
  341. {
  342. form.Close();
  343. }
  344. }
  345. private void ToolStripMenuItemTimeWave_Click(object sender, EventArgs e)
  346. {
  347. //if ((Program.Oscilloscope.View as DsoForm)?.OperateForm != null)
  348. //{
  349. // (Program.Oscilloscope.View as DsoForm)?.OperateForm.Close();
  350. //}
  351. if (_TimeDomainViewSettingForm != null)
  352. {
  353. _TimeDomainViewSettingForm.Close();
  354. }
  355. _TimeDomainViewSettingForm = new TimeDomainViewSettingForm();
  356. _TimeDomainViewSettingForm.SetGridComboBoxSelectType(Enum.GetValues<GridType>());
  357. XAxisTickType xaxisticktype = ScottPlotFormControl.Plot.XAxis.Edge == Edge.Bottom ? XAxisTickType.Bottom : XAxisTickType.Top;
  358. YAxisTickType yaxisticktype = ScottPlotFormControl.Plot.YAxis.Edge == Edge.Left ? YAxisTickType.Left : YAxisTickType.Right;
  359. _TimeDomainViewSettingForm.SetMutexButtonModeType(xaxisticktype, yaxisticktype, DrawMode);
  360. _TimeDomainViewSettingForm.SetParameterValue(TimeEventParameterType.TickIntensity, GridIntensity);
  361. _TimeDomainViewSettingForm.SetParameterValue(TimeEventParameterType.WFMIntensity, WfmIntensity);
  362. _TimeDomainViewSettingForm.SetParameterValue(TimeEventParameterType.AxisTick, ScottPlotFormControl.Plot.XAxis.IsVisible);
  363. _TimeDomainViewSettingForm.ParameterChangedEventHandler += TimeDomainViewSettingForm_ParameterChangedEventHandler;
  364. if (Program.Oscilloscope.View != null && Program.Oscilloscope.View is DsoForm dsoForm)
  365. {
  366. Int32 locationx = (dsoForm.Width - _TimeDomainViewSettingForm.Width) / 2;
  367. locationx = locationx > 0 ? locationx : 0;
  368. Int32 locationy = (dsoForm.Height - _TimeDomainViewSettingForm.Height) / 2;
  369. locationy = locationy > 0 ? locationy : 0;
  370. _TimeDomainViewSettingForm.Location = new Point(locationx, locationy);
  371. }
  372. _TimeDomainViewSettingForm.FormClosed += (sender, e) =>
  373. {
  374. _TimeDomainViewSettingForm.ParameterChangedEventHandler -= TimeDomainViewSettingForm_ParameterChangedEventHandler;
  375. _TimeDomainViewSettingForm = null;
  376. };
  377. FormEventArgs formeventargs = new FormEventArgs() { Current = _TimeDomainViewSettingForm, Type = FormType.SettingForm };
  378. EventBroker.Instance.GetEvent<FormEventArgs>().Publish(this, formeventargs);
  379. }
  380. private void TimeDomainViewSettingForm_ParameterChangedEventHandler(TimeEventParameterType type, object obj)
  381. {
  382. switch (type)
  383. {
  384. case TimeEventParameterType.AxisTick:
  385. {
  386. if (obj is Boolean visible)
  387. {
  388. AxisTickVisible = visible;
  389. ConfigTickLabelVisible(visible);
  390. }
  391. }
  392. break;
  393. case TimeEventParameterType.XAxisTick:
  394. {
  395. if (obj is XAxisTickType timeBaseMarkerType)
  396. {
  397. XAxisTickBottom = timeBaseMarkerType == XAxisTickType.Bottom;
  398. ConfigHorizontalTickLabelDirection(timeBaseMarkerType == XAxisTickType.Bottom);
  399. }
  400. }
  401. break;
  402. case TimeEventParameterType.YAxisTick:
  403. {
  404. if (obj is YAxisTickType verticalGearMarkerType)
  405. {
  406. YAxisTickRight = verticalGearMarkerType == YAxisTickType.Right;
  407. ConfigVirticalTickLabelDirection(verticalGearMarkerType == YAxisTickType.Right);
  408. }
  409. }
  410. break;
  411. case TimeEventParameterType.WFMType:
  412. if (obj is WfmDrawMode mode)
  413. {
  414. DrawMode = mode;
  415. ConfigDrawMode(DrawMode);
  416. }
  417. break;
  418. case TimeEventParameterType.WFMIntensity:
  419. if (obj is Int32 int32)
  420. {
  421. WfmIntensity = int32;
  422. ConfigWfmIntensity(WfmIntensity);
  423. }
  424. break;
  425. case TimeEventParameterType.TickType:
  426. if (obj is GridType value)
  427. {
  428. GridStyle = value;
  429. ConfigGridStyle(GridStyle);
  430. }
  431. break;
  432. case TimeEventParameterType.TickIntensity:
  433. if (obj is Int32 intensity)
  434. {
  435. GridIntensity = intensity;
  436. ConfigGridIntensity(GridIntensity);
  437. }
  438. break;
  439. default:
  440. break;
  441. }
  442. }
  443. #endregion
  444. #region 事件
  445. protected override void OnLoad(EventArgs e)
  446. {
  447. base.OnLoad(e);
  448. ConfigGridIntensity(GridIntensity);
  449. ConfigGridStyle(GridStyle);
  450. ConfigWfmIntensity(WfmIntensity);
  451. ConfigDrawMode(DrawMode);
  452. ConfigTickLabelVisible(AxisTickVisible);
  453. ConfigVirticalTickLabelDirection(XAxisTickBottom);
  454. ConfigHorizontalTickLabelDirection(YAxisTickRight);
  455. }
  456. private void TimerRefresh_Tick(object sender, EventArgs e)
  457. {
  458. if (_IsRefreshing == false)
  459. DrawWave();
  460. }
  461. protected override void OnFormClosed(FormClosedEventArgs e)
  462. {
  463. TmbPresenter.TryRemoveView(this);
  464. TrgPresenter.TryRemoveView(this);
  465. Presenter.TryRemoveView(this);
  466. Presenter.Active = false;
  467. (Program.Oscilloscope.View as DsoForm).RemoveBadge(Presenter);
  468. //(Program.Oscilloscope.View as DsoForm).DestroyDisplayForm(this);
  469. }
  470. ~ReferenceFigure()
  471. {
  472. if (_TimerRefresh != null)
  473. _TimerRefresh.Dispose();
  474. }
  475. #endregion
  476. #region IDsoView
  477. public ReferencePrsnt Presenter
  478. {
  479. get;
  480. set;
  481. }
  482. IBadge IView<IBadge>.Presenter
  483. {
  484. get => Presenter;
  485. set => Presenter = (ReferencePrsnt)value;
  486. }
  487. public TimebasePrsnt TmbPresenter
  488. {
  489. get;
  490. set;
  491. }
  492. ITimebasePrsnt IView<ITimebasePrsnt>.Presenter
  493. {
  494. get => TmbPresenter;
  495. set => TmbPresenter = (TimebasePrsnt)value;
  496. }
  497. public TriggerPrsnt TrgPresenter
  498. {
  499. get;
  500. set;
  501. }
  502. ITriggerPrsnt IView<ITriggerPrsnt>.Presenter
  503. {
  504. get => TrgPresenter;
  505. set => TrgPresenter = (TriggerPrsnt)value;
  506. }
  507. public void UpdateView(String propertyName)
  508. {
  509. if (String.IsNullOrEmpty(propertyName))
  510. {
  511. UpdateView();
  512. return;
  513. }
  514. switch (propertyName)
  515. {
  516. //case nameof(TrgPresenter.):
  517. // break;
  518. //case nameof(TmbPresenter.Length):
  519. // break;
  520. case nameof(TmbPresenter.ScaleByus):
  521. ScottPlotFormControl.Plot.ResetTimebaseParameter((Int32)TmbPresenter.PositionByus, TmbPresenter.ScaleByus, TmbPresenter.Prefix.ToString(), TmbPresenter.Unit, Color.White);
  522. break;
  523. case nameof(TmbPresenter.PositionByus):
  524. ScottPlotFormControl.Plot.ResetTimebaseParameter((Int32)TmbPresenter.PositionByus, TmbPresenter.ScaleByus, TmbPresenter.Prefix.ToString(), TmbPresenter.Unit, Color.White);
  525. break;
  526. }
  527. }
  528. protected void UpdateView()
  529. {
  530. }
  531. #endregion
  532. }
  533. }