1
+ using ReaLTaiizor . Controls ;
2
+ using ReaLTaiizor . UI . Helpers ;
3
+ using System ;
4
+ using System . Drawing ;
5
+ using System . Windows . Forms ;
6
+ using Panel = ReaLTaiizor . Controls . Panel ;
7
+
8
+ namespace ReaLTaiizor . UI . Forms
9
+ {
10
+ public partial class FormManager : Form
11
+ {
12
+ public FormManager ( )
13
+ {
14
+ InitializeComponent ( ) ;
15
+
16
+ MaximizeBox = false ;
17
+ Text = "Form Manager" ;
18
+ Size = new Size ( 616 , 520 ) ;
19
+ BackColor = Color . FromArgb ( 42 , 42 , 42 ) ;
20
+ FormBorderStyle = FormBorderStyle . FixedSingle ;
21
+ StartPosition = FormStartPosition . CenterScreen ;
22
+
23
+ Panel buttonPanel = new ( )
24
+ {
25
+ AutoScroll = false ,
26
+ Dock = DockStyle . Fill ,
27
+ Padding = new Padding ( 0 )
28
+ } ;
29
+
30
+ FlowLayoutPanel flowLayout = new ( )
31
+ {
32
+ AutoScroll = false ,
33
+ WrapContents = true ,
34
+ Dock = DockStyle . Fill ,
35
+ Padding = new Padding ( 0 )
36
+ } ;
37
+
38
+ string [ ] formNames = {
39
+ "Air" , "Dungeon" , "Dream" , "Ribbon" ,
40
+ "Space" , "Thunder" , "Sky" , "Moon" ,
41
+ "Alone" , "Fox" , "Forever" , "Hope" ,
42
+ "Lost" , "Royal" , "Material" , "Night" ,
43
+ "Metro" , "Poison" , "Crown" , "Parrot" ,
44
+ "Cyber" , "Form1" , "Form2"
45
+ } ;
46
+
47
+ for ( int i = 0 ; i < formNames . Length ; i ++ )
48
+ {
49
+ ForeverButton btn = new ( )
50
+ {
51
+ Tag = formNames [ i ] ,
52
+ Text = formNames [ i ] ,
53
+ TextColor = Color . White ,
54
+ Margin = new Padding ( 10 ) ,
55
+ Size = new Size ( 180 , 40 ) ,
56
+ BaseColor = Color . FromArgb ( 60 , 60 , 60 )
57
+ } ;
58
+
59
+ btn . Click += Button_Click ;
60
+ flowLayout . Controls . Add ( btn ) ;
61
+ }
62
+
63
+ buttonPanel . Controls . Add ( flowLayout ) ;
64
+ Controls . Add ( buttonPanel ) ;
65
+ }
66
+
67
+ private void Button_Click ( object sender , EventArgs e )
68
+ {
69
+ if ( sender is ForeverButton btn )
70
+ {
71
+ Form newForm = FormHelper . Open ( new [ ] { btn . Tag . ToString ( ) , "Manager" } ) ;
72
+ newForm . ShowDialog ( ) ;
73
+ }
74
+ }
75
+
76
+ private void InitializeComponent ( )
77
+ {
78
+ this . SuspendLayout ( ) ;
79
+ this . Name = "FormManager" ;
80
+ this . ClientSize = new Size ( 800 , 600 ) ;
81
+ this . AutoScaleMode = AutoScaleMode . Font ;
82
+ this . AutoScaleDimensions = new SizeF ( 7F , 15F ) ;
83
+ this . ResumeLayout ( false ) ;
84
+ }
85
+ }
86
+ }
0 commit comments