forked from ahyahy/OneScriptForms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupBox.cs
More file actions
742 lines (631 loc) · 22.1 KB
/
GroupBox.cs
File metadata and controls
742 lines (631 loc) · 22.1 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
using System;
using ScriptEngine.Machine.Contexts;
using ScriptEngine.Machine;
using System.Reflection;
namespace osf
{
public class GroupBoxEx : System.Windows.Forms.GroupBox
{
public osf.GroupBox M_Object;
}
public class GroupBox : Control
{
public ClGroupBox dll_obj;
public GroupBoxEx M_GroupBox;
public GroupBox()
{
M_GroupBox = new GroupBoxEx();
M_GroupBox.M_Object = this;
base.M_Control = M_GroupBox;
}
public GroupBox(System.Windows.Forms.GroupBox p1)
{
M_GroupBox = (GroupBoxEx)p1;
M_GroupBox.M_Object = this;
base.M_Control = M_GroupBox;
}
public GroupBox(osf.GroupBox p1)
{
M_GroupBox = p1.M_GroupBox;
M_GroupBox.M_Object = this;
base.M_Control = M_GroupBox;
}
//Свойства============================================================
//Методы============================================================
}
[ContextClass ("КлРамкаГруппы", "ClGroupBox")]
public class ClGroupBox : AutoContext<ClGroupBox>
{
private ClColor backColor;
private ClRectangle bounds;
private ClRectangle clientRectangle;
private ClControlCollection controls;
private ClColor foreColor;
private ClCollection tag = new ClCollection();
public ClGroupBox()
{
GroupBox GroupBox1 = new GroupBox();
GroupBox1.dll_obj = this;
Base_obj = GroupBox1;
bounds = new ClRectangle(Base_obj.Bounds);
clientRectangle = new ClRectangle(Base_obj.ClientRectangle);
foreColor = new ClColor(Base_obj.ForeColor);
backColor = new ClColor(Base_obj.BackColor);
controls = new ClControlCollection(Base_obj.Controls);
}
public ClGroupBox(GroupBox p1)
{
GroupBox GroupBox1 = p1;
GroupBox1.dll_obj = this;
Base_obj = GroupBox1;
bounds = new ClRectangle(Base_obj.Bounds);
clientRectangle = new ClRectangle(Base_obj.ClientRectangle);
foreColor = new ClColor(Base_obj.ForeColor);
backColor = new ClColor(Base_obj.BackColor);
controls = new ClControlCollection(Base_obj.Controls);
}
public GroupBox 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 string DoubleClick
{
get { return Base_obj.DoubleClick; }
set { Base_obj.DoubleClick = value; }
}
[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("ИспользоватьКурсорОжидания", "UseWaitCursor")]
public bool UseWaitCursor
{
get { return Base_obj.UseWaitCursor; }
set { Base_obj.UseWaitCursor = value; }
}
[ContextProperty("КлавишаВверх", "KeyUp")]
public string KeyUp
{
get { return Base_obj.KeyUp; }
set { Base_obj.KeyUp = value; }
}
[ContextProperty("КлавишаВниз", "KeyDown")]
public string KeyDown
{
get { return Base_obj.KeyDown; }
set { Base_obj.KeyDown = value; }
}
[ContextProperty("КлавишаНажата", "KeyPress")]
public string KeyPress
{
get { return Base_obj.KeyPress; }
set { Base_obj.KeyPress = value; }
}
[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 { return (ClCursor)OneScriptForms.RevertObj(Base_obj.Cursor); }
set { 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 string MouseEnter
{
get { return Base_obj.MouseEnter; }
set { Base_obj.MouseEnter = value; }
}
[ContextProperty("МышьПокинулаЭлемент", "MouseLeave")]
public string MouseLeave
{
get { return Base_obj.MouseLeave; }
set { Base_obj.MouseLeave = value; }
}
[ContextProperty("Нажатие", "Click")]
public string Click
{
get { return Base_obj.Click; }
set { Base_obj.Click = value; }
}
[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("ПозицияМыши", "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 string LocationChanged
{
get { return Base_obj.LocationChanged; }
set { Base_obj.LocationChanged = value; }
}
[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("ПриВходе", "Enter")]
public string Enter
{
get { return Base_obj.Enter; }
set { Base_obj.Enter = value; }
}
[ContextProperty("ПриЗадержкеМыши", "MouseHover")]
public string MouseHover
{
get { return Base_obj.MouseHover; }
set { Base_obj.MouseHover = value; }
}
[ContextProperty("ПриНажатииКнопкиМыши", "MouseDown")]
public string MouseDown
{
get { return Base_obj.MouseDown; }
set { Base_obj.MouseDown = value; }
}
[ContextProperty("ПриОтпусканииМыши", "MouseUp")]
public string MouseUp
{
get { return Base_obj.MouseUp; }
set { Base_obj.MouseUp = value; }
}
[ContextProperty("ПриПеремещении", "Move")]
public string Move
{
get { return Base_obj.Move; }
set { Base_obj.Move = value; }
}
[ContextProperty("ПриПеремещенииМыши", "MouseMove")]
public string MouseMove
{
get { return Base_obj.MouseMove; }
set { Base_obj.MouseMove = value; }
}
[ContextProperty("ПриПерерисовке", "Paint")]
public string Paint
{
get { return Base_obj.Paint; }
set { Base_obj.Paint = value; }
}
[ContextProperty("ПриПотереФокуса", "LostFocus")]
public string LostFocus
{
get { return Base_obj.LostFocus; }
set { Base_obj.LostFocus = value; }
}
[ContextProperty("ПриУходе", "Leave")]
public string Leave
{
get { return Base_obj.Leave; }
set { Base_obj.Leave = value; }
}
[ContextProperty("Размер", "Size")]
public ClSize Size
{
get { return (ClSize)OneScriptForms.RevertObj(Base_obj.Size); }
set { Base_obj.Size = value.Base_obj; }
}
[ContextProperty("РазмерИзменен", "SizeChanged")]
public string SizeChanged
{
get { return Base_obj.SizeChanged; }
set { Base_obj.SizeChanged = value; }
}
[ContextProperty("РазмерШрифта", "FontSize")]
public int FontSize
{
get { return Convert.ToInt32(Base_obj.FontSize); }
set { Base_obj.FontSize = value; }
}
[ContextProperty("Родитель", "Parent")]
public IValue Parent
{
get { return OneScriptForms.RevertObj(Base_obj.Parent); }
set { Base_obj.Parent = ((dynamic)value).Base_obj; }
}
[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("ТекстИзменен", "TextChanged")]
public string TextChanged
{
get { return Base_obj.TextChanged; }
set { Base_obj.TextChanged = value; }
}
[ContextProperty("Тип", "Type")]
public ClType Type
{
get { return new ClType(this); }
}
[ContextProperty("Фокусируемый", "CanFocus")]
public bool CanFocus
{
get { return Base_obj.CanFocus; }
}
[ContextProperty("ФоновоеИзображение", "BackgroundImage")]
public ClBitmap BackgroundImage
{
get { return new ClBitmap(Base_obj.BackgroundImage); }
set { Base_obj.BackgroundImage = value.Base_obj; }
}
[ContextProperty("ЦветФона", "BackColor")]
public ClColor BackColor
{
get { return backColor; }
set
{
backColor = value;
Base_obj.BackColor = value.Base_obj;
}
}
[ContextProperty("Ширина", "Width")]
public int Width
{
get { return Base_obj.Width; }
set { Base_obj.Width = value; }
}
[ContextProperty("Шрифт", "Font")]
public ClFont Font
{
get { return (ClFont)OneScriptForms.RevertObj(Base_obj.Font); }
set
{
Base_obj.Font = value.Base_obj;
Base_obj.Font.dll_obj = value;
}
}
[ContextProperty("ЭлементВерхнегоУровня", "TopLevelControl")]
public IValue TopLevelControl
{
get { return OneScriptForms.RevertObj(Base_obj.TopLevelControl); }
}
[ContextProperty("ЭлементДобавлен", "ControlAdded")]
public string ControlAdded
{
get { return Base_obj.ControlAdded; }
set { Base_obj.ControlAdded = value; }
}
[ContextProperty("ЭлементУдален", "ControlRemoved")]
public string ControlRemoved
{
get { return Base_obj.ControlRemoved; }
set { Base_obj.ControlRemoved = value; }
}
[ContextProperty("ЭлементыУправления", "Controls")]
public ClControlCollection Controls
{
get { return controls; }
}
[ContextProperty("Якорь", "Anchor")]
public int Anchor
{
get { return (int)Base_obj.Anchor; }
set { Base_obj.Anchor = value; }
}
//Методы============================================================
[ContextMethod("Актуализировать", "Refresh")]
public void Refresh()
{
Base_obj.Refresh();
}
[ContextMethod("Аннулировать", "Invalidate")]
public void Invalidate()
{
Base_obj.Invalidate();
}
[ContextMethod("ВозобновитьРазмещение", "ResumeLayout")]
public void ResumeLayout(bool p1 = false)
{
Base_obj.ResumeLayout(p1);
}
[ContextMethod("ВосстановитьФоновоеИзображение", "ResetBackgroundImage")]
public void ResetBackgroundImage()
{
Base_obj.ResetBackgroundImage();
}
[ContextMethod("Выбрать", "Select")]
public void Select()
{
Base_obj.Select();
}
[ContextMethod("ВыполнитьРазмещение", "PerformLayout")]
public void PerformLayout()
{
Base_obj.PerformLayout();
}
[ContextMethod("Выше", "PlaceTop")]
public void PlaceTop(IValue p1, int p2)
{
dynamic p3 = ((dynamic)p1).Base_obj;
Base_obj.Location = new Point(p3.Left, p3.Top - Base_obj.Height - p2);
}
[ContextMethod("ДочернийПоКоординатам", "GetChildAtPoint")]
public IValue GetChildAtPoint(ClPoint p1)
{
return ((dynamic)Base_obj.GetChildAtPoint(p1.Base_obj)).dll_obj;
}
[ContextMethod("ЗавершитьОбновление", "EndUpdate")]
public void EndUpdate()
{
Base_obj.EndUpdate();
}
[ContextMethod("Левее", "PlaceLeft")]
public void PlaceLeft(IValue p1, int p2)
{
dynamic p3 = ((dynamic)p1).Base_obj;
Base_obj.Location = new Point(p3.Left - Base_obj.Width - p2, p3.Top);
}
[ContextMethod("НаЗаднийПлан", "SendToBack")]
public void SendToBack()
{
Base_obj.SendToBack();
}
[ContextMethod("НаПереднийПлан", "BringToFront")]
public void BringToFront()
{
Base_obj.BringToFront();
}
[ContextMethod("НайтиФорму", "FindForm")]
public ClForm FindForm()
{
if (Base_obj.FindForm() != null)
{
return Base_obj.FindForm().dll_obj;
}
return null;
}
[ContextMethod("НайтиЭлемент", "FindControl")]
public IValue FindControl(string p1)
{
return OneScriptForms.RevertObj(Base_obj.FindControl(p1));
}
[ContextMethod("НачатьОбновление", "BeginUpdate")]
public void BeginUpdate()
{
Base_obj.BeginUpdate();
}
[ContextMethod("Ниже", "PlaceBottom")]
public void PlaceBottom(IValue p1, int p2)
{
dynamic p3 = ((dynamic)p1).Base_obj;
Base_obj.Location = new Point(p3.Left, p3.Top + p3.Height + p2);
}
[ContextMethod("Обновить", "Update")]
public void Update()
{
Base_obj.Update();
}
[ContextMethod("Освободить", "Dispose")]
public void Dispose()
{
Base_obj.Dispose();
}
[ContextMethod("Показать", "Show")]
public void Show()
{
Base_obj.Show();
}
[ContextMethod("Правее", "PlaceRight")]
public void PlaceRight(IValue p1, int p2)
{
dynamic p3 = ((dynamic)p1).Base_obj;
Base_obj.Location = new Point(p3.Right + p2, p3.Top);
}
[ContextMethod("ПриостановитьРазмещение", "SuspendLayout")]
public void SuspendLayout()
{
Base_obj.SuspendLayout();
}
[ContextMethod("Скрыть", "Hide")]
public void Hide()
{
Base_obj.Hide();
}
[ContextMethod("СледующийЭлемент", "GetNextControl")]
public IValue GetNextControl(IValue p1, bool p2)
{
return Base_obj.GetNextControl(((dynamic)p1).Base_obj, p2).dll_obj;
}
[ContextMethod("СоздатьГрафику", "CreateGraphics")]
public ClGraphics CreateGraphics()
{
return new ClGraphics(Base_obj.CreateGraphics());
}
[ContextMethod("СоздатьЭлемент", "CreateControl")]
public void CreateControl()
{
Base_obj.CreateControl();
}
[ContextMethod("ТочкаНаКлиенте", "PointToClient")]
public ClPoint PointToClient(ClPoint p1)
{
return new ClPoint(Base_obj.PointToClient(p1.Base_obj));
}
[ContextMethod("ТочкаНаЭкране", "PointToScreen")]
public ClPoint PointToScreen(ClPoint p1)
{
return new ClPoint(Base_obj.PointToScreen(p1.Base_obj));
}
[ContextMethod("УстановитьГраницы", "SetBounds")]
public void SetBounds(int p1, int p2, int p3, int p4)
{
Base_obj.SetBounds(p1, p2, p3, p4);
}
[ContextMethod("Фокус", "Focus")]
public void Focus()
{
Base_obj.Focus();
}
[ContextMethod("Центр", "Center")]
public void Center()
{
Base_obj.Center();
}
[ContextMethod("ЭлементУправления", "Control")]
public IValue Control(int p1)
{
return OneScriptForms.RevertObj(Base_obj.getControl(p1));
}
[ContextMethod("ЭлементыУправления", "Controls")]
public IValue Controls2(int p1)
{
return OneScriptForms.RevertObj(Base_obj.Controls2(p1));
}
}
}