internal static void Apply(XuiFile xi, string newData) { ThemeLog tl = new ThemeLog(); tl.Date = DateTime.Now; tl.XiFile = xi; tl.NewText = newData; var currentDirectory = System.AppDomain.CurrentDomain.BaseDirectory; tl.DestinationPath = string.Empty; switch (xi) { case XuiFile.MainCss: tl.DestinationPath = Path.Combine(currentDirectory, MainCss_path); break; case XuiFile.CssResponsive: tl.DestinationPath = Path.Combine(currentDirectory, CssResponsive_path); break; case XuiFile.BgImage: break; case XuiFile.JqueryScript: tl.DestinationPath = Path.Combine(currentDirectory, JqueryScript_path); break; default: break; } tl.PrevText = File.ReadAllText(tl.DestinationPath); Perform(tl.DestinationPath, tl.NewText); DBController.DbLog.AddThemeLog(tl); }
internal static void ReverseStyle() { ThemeLog pl = DBController.DbLog.GetLastItem(); Perform(pl.DestinationPath, pl.PrevText); }