@@ -34,16 +34,14 @@ public RestoreFromBackupForm(string backupSourcePath, World backupTarget) {
34
34
Text = "バックアップから復元します" ;
35
35
Icon = new Icon ( ".\\ Image\\ app.ico" ) ;
36
36
Font = Util . FontStyle ;
37
- Padding = new Padding ( ( int ) Util . FontStyle . Size * 2 ) ;
38
- ClientSize = new Size ( ( int ) Util . FontStyle . Size * 30 , ( int ) Util . FontStyle . Size * 35 ) ;
37
+ ClientSize = new Size ( 500 , 220 ) ;
39
38
FormBorderStyle = FormBorderStyle . FixedSingle ;
40
39
41
40
panel = new FlowLayoutPanel ( ) {
42
- Padding = new Padding ( ( int ) Util . FontStyle . Size ) ,
43
- BorderStyle = BorderStyle . FixedSingle ,
41
+ Padding = new Padding ( 20 ) ,
44
42
Anchor = AnchorStyles . Top | AnchorStyles . Bottom | AnchorStyles . Left | AnchorStyles . Right ,
45
43
Dock = DockStyle . Fill ,
46
- BackColor = SystemColors . Window ,
44
+ // BackColor = SystemColors.Window,
47
45
WrapContents = false ,
48
46
FlowDirection = FlowDirection . TopDown
49
47
} ;
@@ -54,43 +52,36 @@ public RestoreFromBackupForm(string backupSourcePath, World backupTarget) {
54
52
catch ( FormatException ) {
55
53
//zipファイルの場合FormatExceptionが発生するため
56
54
time = DateTime . ParseExact ( Path . GetFileName ( pathSrc . Substring ( 0 , pathSrc . Length - 4 ) ) , "yyyyMMddHHmm" , null ) ;
57
-
58
55
}
59
-
60
-
61
56
Font lFont = ( Util . FontStyle ) ;
62
-
63
57
description = new Label ( ) {
64
- Font = new Font ( Util . FontStyle . FontFamily , Util . FontStyle . Size + 2 ) ,
58
+ Font = new Font ( Util . FontStyle . FontFamily , Util . FontStyle . Size ) ,
65
59
Text = time . ToString ( "yyyy-MM-dd HH:mm" ) + " のバックアップから復元します " ,
66
- Height = ( int ) Util . FontStyle . Height * 3 + 4 ,
67
60
//BackColor = Color.Blue,
68
61
Margin = new Padding ( 0 , 0 , 0 , 20 ) ,
69
- // AutoSize = true,
62
+ AutoSize = true ,
70
63
} ;
71
64
72
65
removeBackup = new CheckBox ( ) {
73
66
Text = $ "バックアップ元({ Path . GetFileName ( pathSrc ) } )を削除する",
74
- Width = Width - Padding . Left * 2 - panel . Padding . Left * 2 - 10 ,
75
- Height = ( int ) Util . FontStyle . Height * 2 + 2 ,
76
67
//BackColor = Color.Blue,
77
- //AutoSize = true,
68
+ AutoSize = true ,
69
+ Margin = new Padding ( 0 ) ,
78
70
} ;
79
71
80
72
dontOverwriting = new CheckBox ( ) {
81
73
Text = $ "バックアップ先({ Path . GetFileName ( Path . GetDirectoryName ( Path . GetDirectoryName ( pathTar ) ) ) } \\ saves\\ { Path . GetFileName ( pathTar ) } )を上書きしない\n (別名で新規作成する)",
82
- Width = Width - Padding . Left * 2 - panel . Padding . Left * 2 - 10 ,
83
- Height = ( int ) Util . FontStyle . Height * 6 ,
84
74
//BackColor = Color.Blue,
75
+ AutoSize = true ,
76
+
85
77
} ;
86
78
87
79
doRestore = new Button ( ) {
88
80
Text = "バックアップから復元する" ,
89
- Height = ( int ) Util . FontStyle . Size * 5 ,
90
- Width = Width - Padding . Left * 2 - panel . Padding . Left * 2 - 10 ,
91
- Margin = new Padding ( 0 , 0 , 0 , 20 ) ,
81
+ Height = 40 ,
82
+ BackColor = SystemColors . Control ,
92
83
UseVisualStyleBackColor = true ,
93
- BackColor = SystemColors . Control
84
+ Margin = new Padding ( 0 , 30 , 0 , 0 ) ,
94
85
} ;
95
86
doRestore . Click += new EventHandler ( doRestore_Click ) ;
96
87
@@ -108,7 +99,6 @@ public RestoreFromBackupForm(string backupSourcePath, World backupTarget) {
108
99
removeBackup . Width = panel . Width - panel . Padding . Left * 2 - 10 ;
109
100
dontOverwriting . Width = panel . Width - panel . Padding . Left * 2 - 10 ;
110
101
doRestore . Width = panel . Width - panel . Padding . Left * 2 - 10 ;
111
-
112
102
}
113
103
114
104
private void doRestore_Click ( object sender , EventArgs e ) {
0 commit comments