Skip to content

Commit e81851d

Browse files
authored
Fixed duplicate options changes
1 parent e95ec97 commit e81851d

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

ThemePacker/MainForm.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,9 @@ public void Generate()
265265
tfs.Deserialize();
266266
JObject theme = tfs.JSON;
267267
theme["Theme"]["DisplayName"] = fileName;
268-
theme["Control Panel_Desktop"]["TileWallpaper"] = "0";
269-
theme["Control Panel_Desktop"]["WallpaperStyle"] = "2";
270-
theme["Slideshow"]["Interval"] = "60000";
271-
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);
268+
theme["Control Panel_Desktop"]["TileWallpaper"] = _opb.TileWallpaper;
269+
theme["Control Panel_Desktop"]["WallpaperStyle"] = _opb.WallPaperStyle;
270+
theme["Slideshow"]["Interval"] = _opb.TimeChange;
279271
tfs.JSON = theme;
280272
tfs.JsonSerialize($"temp\\themepack\\{fileName}.theme");
281273

0 commit comments

Comments
 (0)