-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDataGrid.cs
More file actions
1411 lines (1263 loc) · 44.7 KB
/
DataGrid.cs
File metadata and controls
1411 lines (1263 loc) · 44.7 KB
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 ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Reflection;
namespace osf
{
public class DataGridEx : System.Windows.Forms.DataGrid
{
public osf.DataGrid M_Object;
}
public class DataGrid : Control
{
public string CurrentCellChanged;
public ClDataGrid dll_obj;
public DataGridEx M_DataGrid;
public DataGrid()
{
M_DataGrid = new DataGridEx();
M_DataGrid.M_Object = this;
base.M_Control = M_DataGrid;
M_DataGrid.CurrentCellChanged += M_DataGrid_CurrentCellChanged;
M_DataGrid.MouseDown += M_DataGrid_MouseDown;
CurrentCellChanged = "";
}
public DataGrid(osf.DataGrid p1)
{
M_DataGrid = p1.M_DataGrid;
M_DataGrid.M_Object = this;
base.M_Control = M_DataGrid;
M_DataGrid.CurrentCellChanged += M_DataGrid_CurrentCellChanged;
M_DataGrid.MouseDown += M_DataGrid_MouseDown;
CurrentCellChanged = "";
}
public DataGrid(System.Windows.Forms.DataGrid p1)
{
M_DataGrid = (DataGridEx)p1;
M_DataGrid.M_Object = this;
base.M_Control = M_DataGrid;
M_DataGrid.CurrentCellChanged += M_DataGrid_CurrentCellChanged;
M_DataGrid.MouseDown += M_DataGrid_MouseDown;
CurrentCellChanged = "";
}
public bool AllowSorting
{
get { return M_DataGrid.AllowSorting; }
set
{
M_DataGrid.AllowSorting = value;
//System.Windows.Forms.Application.DoEvents();
}
}
public osf.Color BackgroundColor
{
get { return new Color(M_DataGrid.BackgroundColor); }
set
{
M_DataGrid.BackgroundColor = value.M_Color;
//System.Windows.Forms.Application.DoEvents();
}
}
public osf.Color CaptionBackColor
{
get { return new Color(M_DataGrid.CaptionBackColor); }
set
{
M_DataGrid.CaptionBackColor = value.M_Color;
//System.Windows.Forms.Application.DoEvents();
}
}
public string CaptionText
{
get { return M_DataGrid.CaptionText; }
set
{
M_DataGrid.CaptionText = value;
//System.Windows.Forms.Application.DoEvents();
}
}
public bool CaptionVisible
{
get { return M_DataGrid.CaptionVisible; }
set
{
M_DataGrid.CaptionVisible = value;
//System.Windows.Forms.Application.DoEvents();
}
}
public osf.DataGridCell CurrentCell
{
get { return new DataGridCell(M_DataGrid.CurrentCell); }
set
{
M_DataGrid.CurrentCell = value.M_DataGridCell;
//System.Windows.Forms.Application.DoEvents();
}
}
public int CurrentRowIndex
{
get { return M_DataGrid.CurrentRowIndex; }
set
{
M_DataGrid.CurrentRowIndex = value;
//System.Windows.Forms.Application.DoEvents();
}
}
public string DataMember
{
get { return M_DataGrid.DataMember; }
set { M_DataGrid.DataMember = value; }
}
public object DataSource
{
get
{
if (M_DataGrid.DataSource != null)
{
if (M_DataGrid.DataSource.GetType() == typeof(System.Data.DataView))
{
osf.DataView DataView1 = new osf.DataView((System.Data.DataView)M_DataGrid.DataSource);
return (dynamic)DataView1;
}
else
{
return ((dynamic)M_DataGrid.DataSource).M_Object;
}
}
return null;
}
set
{
System.Type Type1 = ((dynamic)value).GetType();
string strType1 = Type1.ToString();
string str1 = strType1.Substring(strType1.LastIndexOf(".") + 1);
M_DataGrid.DataSource = Type1.GetField("M_" + str1).GetValue(value);
//System.Windows.Forms.Application.DoEvents();
}
}
public int PreferredRowHeight
{
get { return M_DataGrid.PreferredRowHeight; }
set { M_DataGrid.PreferredRowHeight = value; }
}
public bool ReadOnly
{
get { return M_DataGrid.ReadOnly; }
set
{
M_DataGrid.ReadOnly = value;
//System.Windows.Forms.Application.DoEvents();
}
}
public osf.GridTableStylesCollection TableStyles
{
get { return new GridTableStylesCollection(M_DataGrid.TableStyles); }
}
public bool BeginEdit(osf.DataGridColumnStyle p1, int p2)
{
return M_DataGrid.BeginEdit(p1.M_DataGridColumnStyle, p2);
}
public bool EndEdit(osf.DataGridColumnStyle p1, int p2, bool p3)
{
return M_DataGrid.EndEdit(p1.M_DataGridColumnStyle, p2, p3);
}
public osf.Rectangle GetCurrentCellBounds()
{
return new Rectangle(M_DataGrid.GetCurrentCellBounds());
}
public bool IsSelected(int row)
{
return M_DataGrid.IsSelected(row);
}
public void M_DataGrid_CurrentCellChanged(object sender, System.EventArgs e)
{
if (CurrentCellChanged.Length > 0)
{
EventArgs EventArgs1 = new EventArgs();
EventArgs1.EventString = CurrentCellChanged;
EventArgs1.Sender = this;
EventArgs1.Parameter = OneScriptForms.GetEventParameter(((dynamic)sender).M_Object.dll_obj.CurrentCellChanged);
ClEventArgs ClEventArgs1 = new ClEventArgs(EventArgs1);
OneScriptForms.Event = ClEventArgs1;
OneScriptForms.ExecuteEvent(((dynamic)sender).M_Object.dll_obj.CurrentCellChanged);
}
}
private void M_DataGrid_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
OneScriptForms.gridMouseDownTime = DateTime.Now;
}
public void SelectRow(int row)
{
M_DataGrid.Select(row);
}
public void SetDataBinding(object source, string member = null)
{
if (source is osf.DataView)
{
M_DataGrid.SetDataBinding((System.Data.DataView)((osf.DataView)source).M_DataView, member);
}
if (source is osf.DataTable)
{
M_DataGrid.SetDataBinding((System.Data.DataTable)((osf.DataTable)source).M_DataTable, member);
}
if (source is osf.DataSet)
{
M_DataGrid.SetDataBinding((System.Data.DataSet)((osf.DataSet)source).M_DataSet, member);
}
if (source is osf.ArrayList)
{
M_DataGrid.SetDataBinding((System.Collections.ArrayList)((osf.ArrayList)source).M_ArrayList, member);
}
//System.Windows.Forms.Application.DoEvents();
}
}
[ContextClass("КлСеткаДанных", "ClDataGrid")]
public class ClDataGrid : AutoContext<ClDataGrid>
{
private IValue _Click;
private IValue _ControlAdded;
private IValue _ControlRemoved;
private IValue _CurrentCellChanged;
private IValue _DoubleClick;
private IValue _Enter;
private IValue _KeyDown;
private IValue _KeyPress;
private IValue _KeyUp;
private IValue _Leave;
private IValue _LocationChanged;
private IValue _LostFocus;
private IValue _MouseDown;
private IValue _MouseEnter;
private IValue _MouseHover;
private IValue _MouseLeave;
private IValue _MouseMove;
private IValue _MouseUp;
private IValue _Move;
private IValue _Paint;
private IValue _SizeChanged;
private IValue _TextChanged;
private ClColor backColor;
private ClColor backgroundColor;
private ClRectangle bounds;
private ClColor captionBackColor;
private ClRectangle clientRectangle;
private ClControlCollection controls;
private ClCursor cursor;
private ClFont font;
private ClColor foreColor;
private ClGridTableStylesCollection tableStyles;
private ClCollection tag = new ClCollection();
public ClDataGrid()
{
DataGrid DataGrid1 = new DataGrid();
DataGrid1.dll_obj = this;
Base_obj = DataGrid1;
bounds = new ClRectangle(Base_obj.Bounds);
clientRectangle = new ClRectangle(Base_obj.ClientRectangle);
foreColor = new ClColor(Base_obj.ForeColor);
tableStyles = new ClGridTableStylesCollection(Base_obj.TableStyles);
backColor = new ClColor(Base_obj.BackColor);
captionBackColor = new ClColor(Base_obj.CaptionBackColor);
backgroundColor = new ClColor(Base_obj.BackgroundColor);
controls = new ClControlCollection(Base_obj.Controls);
}
public ClDataGrid(DataGrid p1)
{
DataGrid DataGrid1 = p1;
DataGrid1.dll_obj = this;
Base_obj = DataGrid1;
bounds = new ClRectangle(Base_obj.Bounds);
clientRectangle = new ClRectangle(Base_obj.ClientRectangle);
foreColor = new ClColor(Base_obj.ForeColor);
tableStyles = new ClGridTableStylesCollection(Base_obj.TableStyles);
backColor = new ClColor(Base_obj.BackColor);
captionBackColor = new ClColor(Base_obj.CaptionBackColor);
backgroundColor = new ClColor(Base_obj.BackgroundColor);
controls = new ClControlCollection(Base_obj.Controls);
}
public DataGrid Base_obj;
[ContextProperty("ВерсияПродукта", "ProductVersion")]
public string ProductVersion
{
get { return Base_obj.ProductVersion; }
}
[ContextProperty("Верх", "Top")]
public int Top
{
get { return Base_obj.Top; }
set { Base_obj.Top = value; }
}
[ContextProperty("Высота", "Height")]
public int Height
{
get { return Base_obj.Height; }
set { Base_obj.Height = value; }
}
[ContextProperty("ВысотаШрифта", "FontHeight")]
public int FontHeight
{
get { return Convert.ToInt32(Base_obj.FontHeight); }
}
[ContextProperty("Границы", "Bounds")]
public ClRectangle Bounds
{
get { return bounds; }
set
{
bounds = value;
Base_obj.Bounds = value.Base_obj;
}
}
[ContextProperty("ДвойноеНажатие", "DoubleClick")]
public IValue DoubleClick
{
get { return _DoubleClick; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_DoubleClick = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.DoubleClick = "DelegateActionDoubleClick";
}
else
{
_DoubleClick = value;
Base_obj.DoubleClick = "osfActionDoubleClick";
}
}
}
[ContextProperty("Доступность", "Enabled")]
public bool Enabled
{
get { return Base_obj.Enabled; }
set { Base_obj.Enabled = value; }
}
[ContextProperty("ЖирныйШрифт", "FontBold")]
public bool FontBold
{
get { return Base_obj.FontBold; }
set { Base_obj.FontBold = value; }
}
[ContextProperty("Захват", "Capture")]
public bool Capture
{
get { return Base_obj.Capture; }
set { Base_obj.Capture = value; }
}
[ContextProperty("Имя", "Name")]
public string Name
{
get { return Base_obj.Name; }
set { Base_obj.Name = value; }
}
[ContextProperty("ИмяПродукта", "ProductName")]
public string ProductName
{
get { return ((AssemblyTitleAttribute)Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0]).Title.ToString(); }
}
[ContextProperty("ИмяШрифта", "FontName")]
public string FontName
{
get { return Base_obj.FontName; }
set { Base_obj.FontName = value; }
}
[ContextProperty("ИндексТекущейСтроки", "CurrentRowIndex")]
public int CurrentRowIndex
{
get { return Base_obj.CurrentRowIndex; }
set { Base_obj.CurrentRowIndex = value; }
}
[ContextProperty("ИспользоватьКурсорОжидания", "UseWaitCursor")]
public bool UseWaitCursor
{
get { return Base_obj.UseWaitCursor; }
set { Base_obj.UseWaitCursor = value; }
}
[ContextProperty("ИсточникДанных", "DataSource")]
public IValue DataSource
{
get { return OneScriptForms.RevertObj(Base_obj.DataSource); }
set
{
try
{
Base_obj.DataSource = ((dynamic)value).Base_obj;
}
catch
{
Base_obj.DataSource = null;
}
}
}
[ContextProperty("КлавишаВверх", "KeyUp")]
public IValue KeyUp
{
get { return _KeyUp; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_KeyUp = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.KeyUp = "DelegateActionKeyUp";
}
else
{
_KeyUp = value;
Base_obj.KeyUp = "osfActionKeyUp";
}
}
}
[ContextProperty("КлавишаВниз", "KeyDown")]
public IValue KeyDown
{
get { return _KeyDown; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_KeyDown = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.KeyDown = "DelegateActionKeyDown";
}
else
{
_KeyDown = value;
Base_obj.KeyDown = "osfActionKeyDown";
}
}
}
[ContextProperty("КлавишаНажата", "KeyPress")]
public IValue KeyPress
{
get { return _KeyPress; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_KeyPress = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.KeyPress = "DelegateActionKeyPress";
}
else
{
_KeyPress = value;
Base_obj.KeyPress = "osfActionKeyPress";
}
}
}
[ContextProperty("КлиентВысота", "ClientHeight")]
public int ClientHeight
{
get { return Base_obj.ClientHeight; }
set { Base_obj.ClientHeight = value; }
}
[ContextProperty("КлиентПрямоугольник", "ClientRectangle")]
public ClRectangle ClientRectangle
{
get { return clientRectangle; }
}
[ContextProperty("КлиентРазмер", "ClientSize")]
public ClSize ClientSize
{
get { return (ClSize)OneScriptForms.RevertObj(Base_obj.ClientSize); }
set { Base_obj.ClientSize = value.Base_obj; }
}
[ContextProperty("КлиентШирина", "ClientWidth")]
public int ClientWidth
{
get { return Base_obj.ClientWidth; }
set { Base_obj.ClientWidth = value; }
}
[ContextProperty("КнопкиМыши", "MouseButtons")]
public int MouseButtons
{
get { return (int)Base_obj.MouseButtons; }
}
[ContextProperty("КонтекстноеМеню", "ContextMenu")]
public ClContextMenu ContextMenu
{
get { return (ClContextMenu)OneScriptForms.RevertObj(Base_obj.ContextMenu); }
set { Base_obj.ContextMenu = value.Base_obj; }
}
[ContextProperty("Курсор", "Cursor")]
public ClCursor Cursor
{
get
{
if (cursor != null)
{
return cursor;
}
return new ClCursor(Base_obj.Cursor);
}
set
{
cursor = value;
Base_obj.Cursor = value.Base_obj;
}
}
[ContextProperty("Лево", "Left")]
public int Left
{
get { return Base_obj.Left; }
set { Base_obj.Left = value; }
}
[ContextProperty("Метка", "Tag")]
public ClCollection Tag
{
get { return tag; }
}
[ContextProperty("МышьНадЭлементом", "MouseEnter")]
public IValue MouseEnter
{
get { return _MouseEnter; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_MouseEnter = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.MouseEnter = "DelegateActionMouseEnter";
}
else
{
_MouseEnter = value;
Base_obj.MouseEnter = "osfActionMouseEnter";
}
}
}
[ContextProperty("МышьПокинулаЭлемент", "MouseLeave")]
public IValue MouseLeave
{
get { return _MouseLeave; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_MouseLeave = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.MouseLeave = "DelegateActionMouseLeave";
}
else
{
_MouseLeave = value;
Base_obj.MouseLeave = "osfActionMouseLeave";
}
}
}
[ContextProperty("Нажатие", "Click")]
public IValue Click
{
get { return _Click; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_Click = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.Click = "DelegateActionClick";
}
else
{
_Click = value;
Base_obj.Click = "osfActionClick";
}
}
}
[ContextProperty("Низ", "Bottom")]
public int Bottom
{
get { return Base_obj.Bottom; }
}
[ContextProperty("ОсновнойЦвет", "ForeColor")]
public ClColor ForeColor
{
get { return foreColor; }
set
{
foreColor = value;
Base_obj.ForeColor = value.Base_obj;
}
}
[ContextProperty("Отображать", "Visible")]
public bool Visible
{
get { return Base_obj.Visible; }
set { Base_obj.Visible = value; }
}
[ContextProperty("ОтображатьЗаголовок", "CaptionVisible")]
public bool CaptionVisible
{
get { return Base_obj.CaptionVisible; }
set { Base_obj.CaptionVisible = value; }
}
[ContextProperty("ПозицияМыши", "MousePosition")]
public ClPoint MousePosition
{
get { return new ClPoint(System.Windows.Forms.Control.MousePosition); }
}
[ContextProperty("Положение", "Location")]
public ClPoint Location
{
get { return (ClPoint)OneScriptForms.RevertObj(Base_obj.Location); }
set { Base_obj.Location = value.Base_obj; }
}
[ContextProperty("ПоложениеИзменено", "LocationChanged")]
public IValue LocationChanged
{
get { return _LocationChanged; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_LocationChanged = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.LocationChanged = "DelegateActionLocationChanged";
}
else
{
_LocationChanged = value;
Base_obj.LocationChanged = "osfActionLocationChanged";
}
}
}
[ContextProperty("ПорядокОбхода", "TabIndex")]
public int TabIndex
{
get { return Base_obj.TabIndex; }
set { Base_obj.TabIndex = value; }
}
[ContextProperty("Право", "Right")]
public int Right
{
get { return Base_obj.Right; }
}
[ContextProperty("ПредпочтительнаяВысотаСтрок", "PreferredRowHeight")]
public int PreferredRowHeight
{
get { return Base_obj.PreferredRowHeight; }
set { Base_obj.PreferredRowHeight = value; }
}
[ContextProperty("ПриВходе", "Enter")]
public IValue Enter
{
get { return _Enter; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_Enter = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.Enter = "DelegateActionEnter";
}
else
{
_Enter = value;
Base_obj.Enter = "osfActionEnter";
}
}
}
[ContextProperty("ПриЗадержкеМыши", "MouseHover")]
public IValue MouseHover
{
get { return _MouseHover; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_MouseHover = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.MouseHover = "DelegateActionMouseHover";
}
else
{
_MouseHover = value;
Base_obj.MouseHover = "osfActionMouseHover";
}
}
}
[ContextProperty("ПриНажатииКнопкиМыши", "MouseDown")]
public IValue MouseDown
{
get { return _MouseDown; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_MouseDown = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.MouseDown = "DelegateActionMouseDown";
}
else
{
_MouseDown = value;
Base_obj.MouseDown = "osfActionMouseDown";
}
}
}
[ContextProperty("ПриОтпусканииМыши", "MouseUp")]
public IValue MouseUp
{
get { return _MouseUp; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_MouseUp = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.MouseUp = "DelegateActionMouseUp";
}
else
{
_MouseUp = value;
Base_obj.MouseUp = "osfActionMouseUp";
}
}
}
[ContextProperty("ПриПеремещении", "Move")]
public IValue Move
{
get { return _Move; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_Move = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.Move = "DelegateActionMove";
}
else
{
_Move = value;
Base_obj.Move = "osfActionMove";
}
}
}
[ContextProperty("ПриПеремещенииМыши", "MouseMove")]
public IValue MouseMove
{
get { return _MouseMove; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_MouseMove = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.MouseMove = "DelegateActionMouseMove";
}
else
{
_MouseMove = value;
Base_obj.MouseMove = "osfActionMouseMove";
}
}
}
[ContextProperty("ПриПерерисовке", "Paint")]
public IValue Paint
{
get { return _Paint; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_Paint = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.Paint = "DelegateActionPaint";
}
else
{
_Paint = value;
Base_obj.Paint = "osfActionPaint";
}
}
}
[ContextProperty("ПриПотереФокуса", "LostFocus")]
public IValue LostFocus
{
get { return _LostFocus; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_LostFocus = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.LostFocus = "DelegateActionLostFocus";
}
else
{
_LostFocus = value;
Base_obj.LostFocus = "osfActionLostFocus";
}
}
}
[ContextProperty("ПриУходе", "Leave")]
public IValue Leave
{
get { return _Leave; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_Leave = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.Leave = "DelegateActionLeave";
}
else
{
_Leave = value;
Base_obj.Leave = "osfActionLeave";
}
}
}
[ContextProperty("Размер", "Size")]
public ClSize Size
{
get { return (ClSize)OneScriptForms.RevertObj(Base_obj.Size); }
set { Base_obj.Size = value.Base_obj; }
}
[ContextProperty("РазмерИзменен", "SizeChanged")]
public IValue SizeChanged
{
get { return _SizeChanged; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_SizeChanged = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.SizeChanged = "DelegateActionSizeChanged";
}
else
{
_SizeChanged = value;
Base_obj.SizeChanged = "osfActionSizeChanged";
}
}
}
[ContextProperty("РазмерШрифта", "FontSize")]
public int FontSize
{
get { return Convert.ToInt32(Base_obj.FontSize); }
set { Base_obj.FontSize = value; }
}
[ContextProperty("РазрешитьСортировку", "AllowSorting")]
public bool AllowSorting
{
get { return Base_obj.AllowSorting; }
set { Base_obj.AllowSorting = value; }
}
[ContextProperty("Родитель", "Parent")]
public IValue Parent
{
get { return OneScriptForms.RevertObj(Base_obj.Parent); }
set { Base_obj.Parent = ((dynamic)value).Base_obj; }
}
[ContextProperty("СтилиТаблицы", "TableStyles")]
public ClGridTableStylesCollection TableStyles
{
get { return tableStyles; }
}
[ContextProperty("Стыковка", "Dock")]
public int Dock
{
get { return (int)Base_obj.Dock; }
set { Base_obj.Dock = value; }
}
[ContextProperty("Сфокусирован", "Focused")]
public bool Focused
{
get { return Base_obj.Focused; }
}
[ContextProperty("ТабФокус", "TabStop")]
public bool TabStop
{
get { return Base_obj.TabStop; }
set { Base_obj.TabStop = value; }
}
[ContextProperty("Текст", "Text")]
public string Text
{
get { return Base_obj.Text; }
set { Base_obj.Text = value; }
}
[ContextProperty("ТекстЗаголовка", "CaptionText")]
public string CaptionText
{
get { return Base_obj.CaptionText; }
set { Base_obj.CaptionText = value; }
}
[ContextProperty("ТекстИзменен", "TextChanged")]
public IValue TextChanged
{
get { return _TextChanged; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_TextChanged = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.TextChanged = "DelegateActionTextChanged";
}
else
{
_TextChanged = value;
Base_obj.TextChanged = "osfActionTextChanged";
}
}
}
[ContextProperty("ТекущаяЯчейка", "CurrentCell")]
public ClDataGridCell CurrentCell
{
get { return new ClDataGridCell(Base_obj.CurrentCell); }
set { Base_obj.CurrentCell = value.Base_obj; }
}
[ContextProperty("ТекущаяЯчейкаИзменена", "CurrentCellChanged")]
public IValue CurrentCellChanged
{
get { return _CurrentCellChanged; }
set
{
if (value.GetType() == typeof(ScriptEngine.HostedScript.Library.DelegateAction))
{
_CurrentCellChanged = (ScriptEngine.HostedScript.Library.DelegateAction)value.AsObject();
Base_obj.CurrentCellChanged = "DelegateActionCurrentCellChanged";
}
else