@@ -29,10 +29,12 @@ public class SettingsApp : Application
2929 Label _themeBmpPathLabel ;
3030 Label _themeXmlPathLabel ;
3131 Label _windowsAlphaLabel ;
32+ Label _taskbarAlphaLabel ;
3233
3334 Checkbox _autoLogin ;
3435
3536 Slider _windowsAlpha ;
37+ Slider _taskbarAlpha ;
3638
3739 Button _save ;
3840
@@ -52,7 +54,8 @@ public SettingsApp(int width, int height, int x = 0, int y = 0) : base(Applicati
5254 _computerNameLabel = new Label ( "Computer Name: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 2 ) ;
5355 _themeBmpPathLabel = new Label ( "Theme BMP Path: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 3 ) ;
5456 _themeXmlPathLabel = new Label ( "Theme XML Path: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 4 ) ;
55- _windowsAlphaLabel = new Label ( "Windows Alpha: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 6 ) ;
57+ _windowsAlphaLabel = new Label ( "Windows Alpha: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 5 ) ;
58+ _taskbarAlphaLabel = new Label ( "Taskbar Alpha: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 6 ) ;
5659
5760 int textBoxXOffset = 6 + ( _themeXmlPathLabel . Text . Length * Kernel . font . Width ) ;
5861
@@ -61,25 +64,34 @@ public SettingsApp(int width, int height, int x = 0, int y = 0) : base(Applicati
6164 _computerName = new TextBox ( textBoxXOffset , baseY + ( 23 + spacing ) * 2 , 200 , 23 , "" ) ;
6265 _themeBmpPath = new TextBox ( textBoxXOffset , baseY + ( 23 + spacing ) * 3 , 200 , 23 , "" ) ;
6366 _themeXmlPath = new TextBox ( textBoxXOffset , baseY + ( 23 + spacing ) * 4 , 200 , 23 , "" ) ;
64-
65- _windowsAlpha = new Slider ( textBoxXOffset , baseY + ( 23 + spacing ) * 6 , 200 , 23 ) ;
67+ _windowsAlpha = new Slider ( textBoxXOffset , baseY + ( 23 + spacing ) * 5 , 200 , 23 ) ;
68+ _taskbarAlpha = new Slider ( textBoxXOffset , baseY + ( 23 + spacing ) * 6 , 200 , 23 ) ;
6669
6770 if ( Kernel . Installed )
6871 {
6972 Settings config = new Settings ( @"0:\System\settings.ini" ) ;
7073 string autologin = config . GetValue ( "autologin" ) ;
74+ byte windowsTransparency = byte . Parse ( config . GetValue ( "windowsTransparency" ) ) ;
75+ _windowsAlpha . Value = windowsTransparency ;
76+ byte taskbarTransparency = byte . Parse ( config . GetValue ( "taskbarTransparency" ) ) ;
77+ _taskbarAlpha . Value = taskbarTransparency ;
7178
7279 if ( autologin == "true" )
7380 {
74- _autoLogin = new Checkbox ( "Auto LogIn: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 5 , true ) ;
81+ _autoLogin = new Checkbox ( "Auto LogIn: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 7 , true ) ;
7582 }
7683 else
7784 {
78- _autoLogin = new Checkbox ( "Auto LogIn: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 5 ) ;
85+ _autoLogin = new Checkbox ( "Auto LogIn: " , Color . Black , labelX , baseY + ( 23 + spacing ) * 7 ) ;
7986 }
80- }
8187
82- _save = new Button ( "Save Settings" , Width / 2 - 100 / 2 , baseY + ( 23 + spacing ) * 7 , 100 , 23 ) ;
88+ _save = new Button ( "Save Settings" , Width / 2 - 100 / 2 , baseY + ( 23 + spacing ) * 8 , 100 , 23 ) ;
89+ }
90+ else
91+ {
92+ _save = new Button ( "Save Settings" , Width / 2 - 100 / 2 , baseY + ( 23 + spacing ) * 7 , 100 , 23 ) ;
93+ }
94+
8395 _save . Click = new Action ( ( ) =>
8496 {
8597 _showDialog = true ;
@@ -91,13 +103,16 @@ public SettingsApp(int width, int height, int x = 0, int y = 0) : base(Applicati
91103 Kernel . ThemeManager . BmpPath = _themeBmpPath . Text ;
92104 Kernel . ThemeManager . XmlPath = _themeXmlPath . Text ;
93105 Explorer . WindowManager . WindowsTransparency = ( byte ) _windowsAlpha . Value ;
106+ Explorer . WindowManager . TaskbarTransparency = ( byte ) _taskbarAlpha . Value ;
94107
95108 if ( Kernel . Installed )
96109 {
97110 Settings config = new Settings ( @"0:\System\settings.ini" ) ;
98111 config . EditValue ( "hostname" , Kernel . ComputerName ) ;
99112 config . EditValue ( "themeBmpPath" , Kernel . ThemeManager . BmpPath ) ;
100113 config . EditValue ( "themeXmlPath" , Kernel . ThemeManager . XmlPath ) ;
114+ config . EditValue ( "windowsTransparency" , Explorer . WindowManager . WindowsTransparency . ToString ( ) ) ;
115+ config . EditValue ( "taskbarTransparency" , Explorer . WindowManager . TaskbarTransparency . ToString ( ) ) ;
101116 if ( _autoLogin . Checked )
102117 {
103118 config . EditValue ( "autologin" , "true" ) ;
@@ -130,13 +145,15 @@ public SettingsApp(int width, int height, int x = 0, int y = 0) : base(Applicati
130145 AddChild ( _themeBmpPath ) ;
131146 AddChild ( _themeXmlPath ) ;
132147 AddChild ( _windowsAlpha ) ;
148+ AddChild ( _taskbarAlpha ) ;
133149
134150 AddChild ( _usernameLabel ) ;
135151 AddChild ( _passwordLabel ) ;
136152 AddChild ( _computerNameLabel ) ;
137153 AddChild ( _themeBmpPathLabel ) ;
138154 AddChild ( _themeXmlPathLabel ) ;
139155 AddChild ( _windowsAlphaLabel ) ;
156+ AddChild ( _taskbarAlphaLabel ) ;
140157
141158 AddChild ( _dialog ) ;
142159
@@ -164,6 +181,7 @@ public override void Update()
164181 _themeBmpPath . Update ( ) ;
165182 _themeXmlPath . Update ( ) ;
166183 _windowsAlpha . Update ( ) ;
184+ _taskbarAlpha . Update ( ) ;
167185
168186 if ( Kernel . Installed )
169187 {
@@ -196,6 +214,8 @@ public override void Draw()
196214 _themeXmlPath . DrawInParent ( ) ;
197215 _windowsAlpha . Update ( ) ;
198216 _windowsAlpha . DrawInParent ( ) ;
217+ _taskbarAlpha . Update ( ) ;
218+ _taskbarAlpha . DrawInParent ( ) ;
199219
200220 _usernameLabel . Draw ( ) ;
201221 _usernameLabel . DrawInParent ( ) ;
@@ -209,6 +229,8 @@ public override void Draw()
209229 _themeXmlPathLabel . DrawInParent ( ) ;
210230 _windowsAlphaLabel . Update ( ) ;
211231 _windowsAlphaLabel . DrawInParent ( ) ;
232+ _taskbarAlphaLabel . Update ( ) ;
233+ _taskbarAlphaLabel . DrawInParent ( ) ;
212234
213235 if ( Kernel . Installed )
214236 {
0 commit comments