@@ -27,7 +27,8 @@ public partial class ThemePacker : Form
2727 private Dictionary < string , bool > _shownImages ;
2828 private string _path ;
2929 private int _currentPic ;
30-
30+ private bool _isFolderBased ;
31+ private OptionDialogBox _opb ;
3132 private CustomProgressBar _pbProgression ;
3233
3334 private EventHandler _btnNextClick ;
@@ -235,10 +236,11 @@ private void BtnLike_Click(object sender, EventArgs e)
235236
236237 private void BtnGenerate_Click ( object sender , EventArgs e )
237238 {
238- OptionDialogBox opb = new OptionDialogBox ( ) ;
239- opb . ShowDialog ( ) ;
240- opb . Focus ( ) ;
241- Generate ( ) ;
239+ _opb = new OptionDialogBox ( ) ;
240+ if ( _opb . ShowDialog ( ) == DialogResult . OK )
241+ {
242+ Generate ( ) ;
243+ }
242244 }
243245
244246 public void Generate ( )
@@ -267,6 +269,13 @@ public void Generate()
267269 theme [ "Control Panel_Desktop" ] [ "WallpaperStyle" ] = "2" ;
268270 theme [ "Slideshow" ] [ "Interval" ] = "60000" ;
269271
272+ //read and replace
273+ string text = File . ReadAllText ( "temp\\ super.theme" ) ;
274+ text = text . Replace ( "DisplayName=Tinderspirobot" , "DisplayName=" + fileName ) ;
275+ text = text . Replace ( "Interval=1000" , "Interval=" + _opb . TimeChange ) ;
276+ text = text . Replace ( "TileWallpaper=1" , "TileWallpaper=" + _opb . TileWallpaper ) ;
277+ text = text . Replace ( "WallpaperStyle=0" , "WallpaperStyle=" + _opb . WallPaperStyle ) ;
278+ File . WriteAllText ( "temp\\ super.theme" , text ) ;
270279 tfs . JSON = theme ;
271280 tfs . JsonSerialize ( $ "temp\\ themepack\\ { fileName } .theme") ;
272281
0 commit comments