forked from Blackfrosch/VAGEDCSuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MapViewerEx.cs
5624 lines (5043 loc) · 222 KB
/
MapViewerEx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraCharts;
using System.Runtime.InteropServices;
using Nevron.Chart;
using Nevron.GraphicsCore;
using Nevron.Chart.WinForm;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using DevExpress.XtraBars.Docking;
using System.IO;
using System.Globalization;
namespace VAGSuite
{
public enum ViewType : int
{
Hexadecimal = 0,
Decimal,
Easy,
ASCII
}
public enum ViewSize : int
{
NormalView = 0,
SmallView,
ExtraSmallView
}
public enum XDFCategories : int
{
Undocumented = 0,
Fuel,
Ignition,
Boost_control,
Idle,
Correction,
Misc,
Sensor,
Runtime,
Diagnostics
}
public enum XDFSubCategory : int
{
None = 0,
Basic,
Advanced,
Undocumented,
Startup,
Enrichment,
Idle,
Axis,
Basic_manual,
Basic_automatic,
Advanced_manual,
Advanced_automatic,
Warmup,
Cranking,
Temperature_compensation,
Lambda_sensor,
Transient,
Airpump_control,
Temperature_calculation,
Limp_home,
Misfire
}
public enum XDFUnits : int
{
Seconds,
Milliseconds,
Minutes,
Degrees,
DegF, // Deg F
DegC, // Deg C
RPM,
MPH,
KMPH,
DC // %DC
}
public partial class MapViewerEx : DevExpress.XtraEditors.XtraUserControl //IMapViewer
{
private bool m_isDifferenceViewer = false;
public bool IsDifferenceViewer
{
get { return m_isDifferenceViewer; }
set
{
m_isDifferenceViewer = value;
if (m_isDifferenceViewer)
{
// disable buttons etc
simpleButton10.Visible = false;
simpleButton2.Visible = false;
}
}
}
public class AxisEditorRequestedEventArgs : System.EventArgs
{
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
private string _filename;
public string Filename
{
get { return _filename; }
set { _filename = value; }
}
private AxisIdent _axisident;
public AxisIdent Axisident
{
get { return _axisident; }
set { _axisident = value; }
}
public AxisEditorRequestedEventArgs(AxisIdent ident, string mapname, string filename)
{
this._axisident = ident;
this._mapname = mapname;
this._filename = filename;
}
}
public class ViewTypeChangedEventArgs : System.EventArgs
{
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
private ViewType _view;
public ViewType View
{
get { return _view; }
set { _view = value; }
}
public ViewTypeChangedEventArgs(ViewType view, string mapname)
{
this._view = view;
this._mapname = mapname;
}
}
public class AxisLockEventArgs : System.EventArgs
{
private int _y_axis_max_value;
private string _mapname;
private string _filename;
private int _lock_mode;
public int AxisMaxValue
{
get
{
return _y_axis_max_value;
}
}
public int LockMode
{
get
{
return _lock_mode;
}
}
public string SymbolName
{
get
{
return _mapname;
}
}
public string Filename
{
get
{
return _filename;
}
}
public AxisLockEventArgs(int max_value, int lockmode, string mapname, string filename)
{
this._y_axis_max_value = max_value;
this._lock_mode = lockmode;
this._mapname = mapname;
this._filename = filename;
}
}
public class SliderMoveEventArgs : System.EventArgs
{
private int _slider_position;
private string _mapname;
private string _filename;
public int SliderPosition
{
get
{
return _slider_position;
}
}
public string SymbolName
{
get
{
return _mapname;
}
}
public string Filename
{
get
{
return _filename;
}
}
public SliderMoveEventArgs(int slider_position, string mapname, string filename)
{
this._slider_position = slider_position;
this._mapname = mapname;
this._filename = filename;
}
}
public class SplitterMovedEventArgs : System.EventArgs
{
private int _splitdistance;
public int Splitdistance
{
get { return _splitdistance; }
set { _splitdistance = value; }
}
private int _panel1height;
public int Panel1height
{
get { return _panel1height; }
set { _panel1height = value; }
}
private int _panel2height;
public int Panel2height
{
get { return _panel2height; }
set { _panel2height = value; }
}
private bool _panel1collapsed;
public bool Panel1collapsed
{
get { return _panel1collapsed; }
set { _panel1collapsed = value; }
}
private bool _panel2collapsed;
public bool Panel2collapsed
{
get { return _panel2collapsed; }
set { _panel2collapsed = value; }
}
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
public SplitterMovedEventArgs(int panel1height, int panel2height, int splitdistance, bool panel1collapsed, bool panel2collapsed, string mapname)
{
this._splitdistance = splitdistance;
this._panel1collapsed = panel1collapsed;
this._panel1height = panel1height;
this._panel2collapsed = panel2collapsed;
this._panel2height = panel2height;
this._mapname = mapname;
}
}
public class CellSelectionChangedEventArgs : System.EventArgs
{
private int _rowhandle;
public int Rowhandle
{
get { return _rowhandle; }
set { _rowhandle = value; }
}
private int _colindex;
public int Colindex
{
get { return _colindex; }
set { _colindex = value; }
}
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
public CellSelectionChangedEventArgs(int rowhandle, int colindex, string mapname)
{
this._rowhandle = rowhandle;
this._colindex = colindex;
this._mapname = mapname;
}
}
public enum AxisIdent : int
{
X_Axis = 0,
Y_Axis = 1,
Z_Axis = 2
}
public class ReadFromSRAMEventArgs : System.EventArgs
{
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
public ReadFromSRAMEventArgs(string mapname)
{
this._mapname = mapname;
}
}
public class WriteToSRAMEventArgs : System.EventArgs
{
private byte[] _data;
public byte[] Data
{
get { return _data; }
set { _data = value; }
}
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
public WriteToSRAMEventArgs(string mapname, byte[] data)
{
this._mapname = mapname;
this._data = data;
}
}
public class ReadSymbolEventArgs : System.EventArgs
{
private string _mapname;
private string _filename;
public string SymbolName
{
get
{
return _mapname;
}
}
public string Filename
{
get
{
return _filename;
}
}
public ReadSymbolEventArgs(string mapname, string filename)
{
this._mapname = mapname;
this._filename = filename;
}
}
public class SaveSymbolEventArgs : System.EventArgs
{
private int _address;
private int _length;
private byte[] _mapdata;
private string _mapname;
private string _filename;
public int SymbolAddress
{
get
{
return _address;
}
}
public int SymbolLength
{
get
{
return _length;
}
}
public byte[] SymbolDate
{
get
{
return _mapdata;
}
}
public string SymbolName
{
get
{
return _mapname;
}
}
public string Filename
{
get
{
return _filename;
}
}
public SaveSymbolEventArgs(int address, int length, byte[] mapdata, string mapname, string filename)
{
this._address = address;
this._length = length;
this._mapdata = mapdata;
this._mapname = mapname;
this._filename = filename;
}
}
public class GraphSelectionChangedEventArgs : System.EventArgs
{
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
private int _tabpageindex;
public int Tabpageindex
{
get { return _tabpageindex; }
set { _tabpageindex = value; }
}
public GraphSelectionChangedEventArgs(int tabpageindex, string mapname)
{
this._tabpageindex = tabpageindex;
this._mapname = mapname;
}
}
public class SurfaceGraphViewChangedEventArgs : System.EventArgs
{
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
private int _pov_x;
public int Pov_x
{
get { return _pov_x; }
set { _pov_x = value; }
}
private int _pov_y;
public int Pov_y
{
get { return _pov_y; }
set { _pov_y = value; }
}
private int _pov_z;
public int Pov_z
{
get { return _pov_z; }
set { _pov_z = value; }
}
private int _pan_x;
public int Pan_x
{
get { return _pan_x; }
set { _pan_x = value; }
}
private int _pan_y;
public int Pan_y
{
get { return _pan_y; }
set { _pan_y = value; }
}
private double _pov_d;
public double Pov_d
{
get { return _pov_d; }
set { _pov_d = value; }
}
public SurfaceGraphViewChangedEventArgs(int povx, int povy, int povz, int panx, int pany, double povd, string mapname)
{
this._pan_x = panx;
this._pan_y = pany;
this._pov_d = povd;
this._pov_x = povx;
this._pov_y = povy;
this._pov_z = povz;
this._mapname = mapname;
}
}
public class SurfaceGraphViewChangedEventArgsEx : System.EventArgs
{
private string _mapname;
public string Mapname
{
get { return _mapname; }
set { _mapname = value; }
}
private float _depthx;
public float DepthX
{
get { return _depthx; }
set { _depthx = value; }
}
private float _depthy;
public float DepthY
{
get { return _depthy; }
set { _depthy = value; }
}
private float _zoom;
public float Zoom
{
get { return _zoom; }
set { _zoom = value; }
}
private float _rotation;
public float Rotation
{
get { return _rotation; }
set { _rotation = value; }
}
private float _elevation;
public float Elevation
{
get { return _elevation; }
set { _elevation = value; }
}
public SurfaceGraphViewChangedEventArgsEx(float depthx, float depthy, float zoom, float rotation, float elevation, string mapname)
{
this._depthx = depthx;
this._depthy = depthy;
this._zoom = zoom;
this._rotation = rotation;
this._elevation = elevation;
this._mapname = mapname;
}
}
public delegate void ViewerClose(object sender, EventArgs e);
public event ViewerClose onClose;
public delegate void AxisEditorRequested(object sender, AxisEditorRequestedEventArgs e);
public event MapViewerEx.AxisEditorRequested onAxisEditorRequested;
public delegate void ReadDataFromSRAM(object sender, ReadFromSRAMEventArgs e);
public event MapViewerEx.ReadDataFromSRAM onReadFromSRAM;
public delegate void WriteDataToSRAM(object sender, WriteToSRAMEventArgs e);
public event MapViewerEx.WriteDataToSRAM onWriteToSRAM;
public delegate void ViewTypeChanged(object sender, ViewTypeChangedEventArgs e);
public event MapViewerEx.ViewTypeChanged onViewTypeChanged;
public delegate void GraphSelectionChanged(object sender, GraphSelectionChangedEventArgs e);
public event MapViewerEx.GraphSelectionChanged onGraphSelectionChanged;
public delegate void SurfaceGraphViewChanged(object sender, SurfaceGraphViewChangedEventArgs e);
public event MapViewerEx.SurfaceGraphViewChanged onSurfaceGraphViewChanged;
public delegate void SurfaceGraphViewChangedEx(object sender, SurfaceGraphViewChangedEventArgsEx e);
public event MapViewerEx.SurfaceGraphViewChangedEx onSurfaceGraphViewChangedEx;
public delegate void NotifySaveSymbol(object sender, SaveSymbolEventArgs e);
public event MapViewerEx.NotifySaveSymbol onSymbolSave;
public delegate void NotifyReadSymbol(object sender, ReadSymbolEventArgs e);
public event MapViewerEx.NotifyReadSymbol onSymbolRead;
public delegate void SplitterMoved(object sender, SplitterMovedEventArgs e);
public event MapViewerEx.SplitterMoved onSplitterMoved;
public delegate void SelectionChanged(object sender, CellSelectionChangedEventArgs e);
public event MapViewerEx.SelectionChanged onSelectionChanged;
public delegate void NotifyAxisLock(object sender, AxisLockEventArgs e);
public event MapViewerEx.NotifyAxisLock onAxisLock;
public delegate void NotifySliderMove(object sender, SliderMoveEventArgs e);
public event MapViewerEx.NotifySliderMove onSliderMove;
private bool m_issixteenbit = false;
private int m_TableWidth = 8;
private bool m_datasourceMutated = false;
private int m_MaxValueInTable = 0;
private bool m_prohibitcellchange = false;
private bool m_prohibitsplitchange = false;
private bool m_prohibitgraphchange = false;
private ViewType m_viewtype = ViewType.Hexadecimal;
private ViewType m_previousviewtype = ViewType.Easy;
private bool m_prohibit_viewchange = false;
private bool m_trackbarBlocked = true;
private ViewSize m_vs = ViewSize.NormalView;
private bool m_OverlayVisible = true;
private double m_realMaxValue = -65535;
private double m_realMinValue = 65535;
private double m_Yaxiscorrectionfactor = 1;
private double m_Yaxiscorrectionoffset = 0;
public double Yaxiscorrectionoffset
{
get { return m_Yaxiscorrectionoffset; }
set { m_Yaxiscorrectionoffset = value; }
}
public double Yaxiscorrectionfactor
{
get { return m_Yaxiscorrectionfactor; }
set { m_Yaxiscorrectionfactor = value; }
}
private string m_xaxisUnits = string.Empty;
public string XaxisUnits
{
get { return m_xaxisUnits; }
set
{
m_xaxisUnits = value.ToUpper();
}
}
private string m_yaxisUnits = string.Empty;
public string YaxisUnits
{
get { return m_yaxisUnits; }
set
{
m_yaxisUnits = value.ToUpper();
}
}
private double m_Xaxiscorrectionfactor = 1;
private double m_Xaxiscorrectionoffset = 0;
public double Xaxiscorrectionoffset
{
get { return m_Xaxiscorrectionoffset; }
set { m_Xaxiscorrectionoffset = value; }
}
public double Xaxiscorrectionfactor
{
get { return m_Xaxiscorrectionfactor; }
set { m_Xaxiscorrectionfactor = value; }
}
byte[] open_loop;
public byte[] Open_loop
{
get { return open_loop; }
set { open_loop = value; }
}
public void SetViewSize(ViewSize vs)
{
m_vs = vs;
if (vs == ViewSize.SmallView)
{
gridView1.PaintStyleName = "UltraFlat";
gridView1.Appearance.Row.Font = new Font("Tahoma", 8);
this.Font = new Font("Tahoma", 8);
gridView1.Appearance.Row.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
gridView1.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
}
else if (vs == ViewSize.ExtraSmallView)
{
gridView1.PaintStyleName = "UltraFlat";
gridView1.Appearance.Row.Font = new Font("Tahoma", 7);
this.Font = new Font("Tahoma", 7);
gridView1.Appearance.Row.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
gridView1.Appearance.Row.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
}
}
private SymbolCollection m_SymbolCollection = new SymbolCollection();
public SymbolCollection mapSymbolCollection
{
get { return m_SymbolCollection; }
set { m_SymbolCollection = value; }
}
public ViewType Viewtype
{
get { return m_viewtype; }
set
{
m_viewtype = value;
m_prohibit_viewchange = true;
toolStripComboBox3.SelectedIndex = (int)m_viewtype;
m_prohibit_viewchange = false;
}
}
int[] afr_counter;
public int[] Afr_counter
{
get { return afr_counter; }
set { afr_counter = value; }
}
private void ShowHitInfo(GridHitInfo hi)
{
if (hi.InRowCell)
{
if (afr_counter != null)
{
// fetch correct counter
int current_afrcounter = (int)afr_counter[(afr_counter.Length - ((hi.RowHandle + 1) * m_TableWidth)) + hi.Column.AbsoluteIndex];
// show number of measurements in balloon
string detailline = "# measurements: " + current_afrcounter.ToString();
toolTipController1.ShowHint(detailline, "Information", Cursor.Position);
}
}
else
{
toolTipController1.HideHint();
}
}
public int MaxValueInTable
{
get { return m_MaxValueInTable; }
set { m_MaxValueInTable = value; }
}
public bool AutoSizeColumns
{
set
{
gridView1.OptionsView.ColumnAutoWidth = value;
}
}
private bool m_disablecolors = false;
public bool DisableColors
{
get
{
return m_disablecolors;
}
set
{
m_disablecolors = value;
Invalidate();
}
}
private string m_filename;
//private bool m_isHexMode = true;
private bool m_isRedWhite = false;
private int m_textheight = 12;
private string m_xformatstringforhex = "X4";
private bool m_isDragging = false;
private int _mouse_drag_x = 0;
private int _mouse_drag_y = 0;
private bool m_prohibitlock_change = false;
private bool _isCompareViewer = false;
public bool IsCompareViewer
{
get { return _isCompareViewer; }
set
{
_isCompareViewer = value;
if (_isCompareViewer)
{
gridView1.OptionsBehavior.Editable = false; // don't let the user edit a compare viewer
toolStripButton3.Enabled = false;
toolStripTextBox1.Enabled = false;
toolStripComboBox1.Enabled = false;
smoothSelectionToolStripMenuItem.Enabled = false;
pasteSelectedCellsToolStripMenuItem.Enabled = false;
//exportMapToolStripMenuItem.Enabled = false;
simpleButton2.Enabled = false;
// simpleButton3.Enabled = false;
//btnSaveToRAM.Enabled = false;
//btnReadFromRAM.Enabled = false;
}
}
}
private bool m_tableVisible = false;
public int SliderPosition
{
get { return (int)trackBarControl1.EditValue; }
set { trackBarControl1.EditValue = value; }
}
public bool TableVisible
{
get { return m_tableVisible; }
set
{
m_tableVisible = value;
splitContainer1.Panel1Collapsed = !m_tableVisible;
}
}
public int LockMode
{
get
{
return toolStripComboBox2.SelectedIndex;
}
set
{
m_prohibitlock_change = true;
toolStripComboBox2.SelectedIndex = value;
m_prohibitlock_change = false;
}
}
private double _max_y_axis_value = 0;
public double Max_y_axis_value
{
get
{
//_max_y_axis_value = ((XYDiagram)chartControl1.Diagram).AxisY.Range.MaxValueInternal;
return _max_y_axis_value;
}
set {
_max_y_axis_value = value;
/*if (_max_y_axis_value > 0)
{
((XYDiagram)chartControl1.Diagram).AxisY.Range.MaxValueInternal = (_max_y_axis_value + correction_offset) * correction_factor;
}
else
{
// set to autoscale
((XYDiagram)chartControl1.Diagram).AxisY.Range.Auto = true;
}*/
}
}
private bool m_isRAMViewer = false;
public bool IsRAMViewer
{
get { return m_isRAMViewer; }
set
{
m_isRAMViewer = value;
// Also when software is open
// simpleButton8.Enabled = m_isRAMViewer;
// simpleButton9.Enabled = m_isRAMViewer;
}
}
private bool m_isOpenSoftware = false;
public bool IsOpenSoftware
{
get { return m_isOpenSoftware; }
set
{
m_isOpenSoftware = value;
// Also when software is open
// simpleButton8.Enabled = m_isOpenSoftware;
// simpleButton9.Enabled = m_isOpenSoftware;
}
}
private bool m_isUpsideDown = false;
public bool IsUpsideDown
{
get { return m_isUpsideDown; }
set { m_isUpsideDown = value; }
}
private double correction_factor = 1;
public double Correction_factor
{
get { return correction_factor; }
set { correction_factor = value; }
}
private double correction_offset = 0;
public double Correction_offset
{
get { return correction_offset; }
set { correction_offset = value; }
}
public bool GraphVisible
{
get
{
return !splitContainer1.Panel2Collapsed;
}
set
{
splitContainer1.Panel2Collapsed = !value;
}
}
private void btnToggleOverlay_Click(object sender, EventArgs e)
{
// do/don't show the graph overlay
m_OverlayVisible = !m_OverlayVisible;
RefreshMeshGraph();
}
private void RefreshMeshGraph()
{
try
{
NChart chart = nChartControl1.Charts[0];