/// <summary> /// Set Active Width of Preset. /// </summary> /// <param name="newwidth">Preset Width</param> public void SetActiveWidth(string newwidth) { PresetInfo preset = GetPresetDetails; preset.ActiveWidth = newwidth; Globals.sysHst[ApplicationKeys.ActivePagePreset + "_" + GetPortalID] = preset; PresetHelper.UpdatePreset(preset, TemplateName); }
public static void DeletePreset(string TemplateName, string Preset) { string presetPath = Decide.IsTemplateDefault(TemplateName) ? Utils.GetPresetPath_DefaultTemplate(TemplateName) : Utils.GetPresetPath(TemplateName); string pagepreset = presetPath + "/" + TemplateConstants.PagePresetFile; string target_dir = Decide.IsTemplateDefault(TemplateName) ? Utils.GetTemplateInfoFilePath_Default(TemplateName) : Utils.GetTemplateInfoFilePath(TemplateName); string preset_dir = target_dir + "/presets/" + Preset; Utils.DeleteFile(preset_dir); PresetHelper.DeletePresetFromPresetPages(Preset, pagepreset); }
public static PresetInfo GetPresetDetails(string TemplateName, int PortalID) { string presetPath = Decide.IsTemplateDefault(TemplateName.Trim()) ? Utils.GetPresetPath_DefaultTemplate(TemplateName) : Utils.GetPresetPath(TemplateName); presetPath += "/" + "pagepreset.xml"; PresetInfo objPreset = new PresetInfo(); try { objPreset = PresetHelper.LoadPresetDetails(presetPath); PageController objPageController = new PageController(); List <PageEntity> lstMenu = objPageController.GetMenuFront(PortalID, false); foreach (PageEntity obj in lstMenu) { obj.ChildCount = lstMenu.Count( delegate(PageEntity objMenu) { return(objMenu.ParentID == obj.PageID); } ); } List <string> lstPages = new List <string>(); List <KeyValue> lstLayout = new List <KeyValue>(); foreach (KeyValue kvp in objPreset.lstLayouts) { string[] arrPage = kvp.Value.Split(','); List <string> lstNewPage = new List <string>(); foreach (string page in arrPage) { bool exists = lstMenu.Exists( delegate(PageEntity obj) { return(obj.PageName.TrimStart('-') == page); } ); if (exists || page.ToLower() == "all") { lstNewPage.Add(page); } } if (lstNewPage.Count > 0) { lstLayout.Add(new KeyValue(kvp.Key, string.Join(",", lstNewPage.ToArray()))); } } objPreset.lstLayouts = lstLayout; //PresetHelper.WritePreset(presetPath, objPreset); return(objPreset); } catch (Exception) { throw; } }
public PlatoHelper(StardewModdingAPI.IModHelper helper) { ModHelper = helper; SharedData = new SharedDataHelper(this); Harmony = new HarmonyHelper(this); Content = new ContentHelper(this); UI = new UIHelper(this); Lua = new LuaHelper(this); Presets = new PresetHelper(this); Utilities = new BasicUtils(this); }
private void DetailBtn_Click(object sender, RoutedEventArgs e) { var thisButton = sender as Button; Flipper thisFlipper = MainView.FindName(thisButton.Tag.ToString()) as Flipper; var CurrentPresets = PresetHelper.GetPresetFromJson(); PresetData preset = CurrentPresets.FirstOrDefault(p => p.PresetName == thisFlipper.Tag.ToString()); thisFlipper.BackContent = (CreateBackContent(preset, thisFlipper.Name)); Flipper.FlipCommand.Execute(null, null); }
private void FormClient_Load(object sender, EventArgs e) { notifyIconClient.BalloonTipText = "Window minimized." + Environment.NewLine + "Click here to restore window."; notifyIconClient.BalloonTipTitle = "Vistrol Client"; notifyIconClient.BalloonTipClicked += notifyIconClient_BalloonTipClicked; notifyIconClient.BalloonTipIcon = ToolTipIcon.Info; notifyIconClient.Text = "Vistrol Client"; notifyIconClient.Icon = Properties.Resources.client; notifyIconClient.Visible = false; notifyIconClient.DoubleClick += notifyIconClient_DoubleClick; this.IsMdiContainer = false; dockPanel.DocumentStyle = DocumentStyle.DockingSdi; // create the dock controls createControls(); deserializeDockContent = new DeserializeDockContent(getContentFromPersistString); string configFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.Create), CONFIG_FILE_NAME); if (File.Exists(configFile)) { dockPanel.LoadFromXml(configFile, deserializeDockContent); } else { loadNewLayout(); } // add the custom mimic windows holder holder = new CustomControlHolder(new Size(0, 0), 0, 0); formMimic.AddMimicHolder(holder); // register events from the holder holder.onDelegateClosedEvt += holder_onDelegateClosedEvt; holder.onDelegateMaximizedEvt += holder_onDelegateMaximizedEvt; holder.onDelegateMinimizedEvt += holder_onDelegateMinimizedEvt; holder.onDelegatePosChangedEvt += holder_onDelegatePosChangedEvt; holder.onDelegateRestoredEvt += holder_onDelegateRestoredEvt; holder.onDelegateSizeChangedEvt += holder_onDelegateSizeChangedEvt; // initialize helper classes mouseHook = new MouseHook(); mouseHook.HookInvoked += mouseHook_HookInvoked; keyboardHook = new KeyboardHook(); keyboardHook.HookInvoked += keyboardHook_HookInvoked; // preset helper class presetHelper = new PresetHelper(holder); // for events this.Resize += FormClient_Resize; }
/// <summary> /// 应用该预设 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ApplyPresetBtn_Click(object sender, RoutedEventArgs e) { try { if (String.IsNullOrWhiteSpace(SettingsData.TESVPath)) { SB_Message("Error_TESVPathUnset"); return; } var CurrentPresets = PresetHelper.GetPresetFromJson(); if (CurrentPresets == null) { return; } if (CurrentPresets.FirstOrDefault(p => p.isRunning == true) != null) { SB_Message("Error_ENBRunning"); return; } var thisButton = sender as Button; Flipper thisFlipper = MainView.FindName(thisButton.Tag.ToString()) as Flipper; PresetData preset = CurrentPresets.FirstOrDefault(p => p.PresetName == thisFlipper.Tag.ToString()); if (preset == null) { SB_Message("Error_PresetNotFound"); return; } CurrentPresets.Remove(preset); preset.isRunning = true; CurrentPresets.Add(preset); FileHelper.CP_Folder(SettingsData.StoragePath + ID.Dir_Preset + "\\" + preset.PresetName, SettingsData.TESVPath); PresetHelper.SavePrests(CurrentPresets); var newFlipper = CreateFlipper(preset); MainView.Children.Insert(0, newFlipper); MainView.RegisterName(newFlipper.Name, newFlipper); RemoveFromView(thisButton.Tag.ToString()); SB_Message("Success_PresetApplyed"); } catch (Exception exp) { Console.Write(exp); return; } }
public void BuildLayoutControl() { string layoutcontrol = string.Empty; SageFrameConfig sfConfig = new SageFrameConfig(); pageSEOName = pageSEOName.ToLower().Equals("default") ? sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage).Replace(" ", "-") : pageSEOName.Replace(" ", "-"); pageSEOName = Regex.Replace(pageSEOName, "--+", ""); layoutcontrol = ""; PageBase objPageBase = new PageBase(); string activeTemplate = objPageBase.GetActiveTemplate; layoutcontrol = PresetHelper.LoadActivePresetForPage(activeTemplate, pageSEOName); LoadControl(pchWhole, layoutcontrol, 3); }
public PresetInfo LoadActivePagePreset() { PresetInfo presetInfo = new PresetInfo(); if (Globals.sysHst[ApplicationKeys.ActivePagePreset + "_" + currentportalID] != null) { presetInfo = (PresetInfo)Globals.sysHst[ApplicationKeys.ActivePagePreset + "_" + currentportalID]; } else { presetInfo = PresetHelper.LoadActivePagePreset(activeTemplate, GetPageSEOName(Request.Url.ToString())); Globals.sysHst[ApplicationKeys.ActivePagePreset + "_" + currentportalID] = presetInfo; } return(presetInfo); }
public static List <PresetInfo> LoadActivePresets(string TemplateName) { string presetPath = Decide.IsTemplateDefault(TemplateName) ? Utils.GetPresetPath_DefaultTemplate(TemplateName) : Utils.GetPresetPath(TemplateName); List <PresetInfo> lstActivePresets = new List <PresetInfo>(); string pagepreset = presetPath + "/" + TemplateConstants.PagePresetFile; if (File.Exists(pagepreset)) { lstActivePresets = PresetHelper.ParsePreset(pagepreset, "pagepresets/page"); } else { lstActivePresets.Add(PresetInfo.GetPresetPages("default", "*")); } return(lstActivePresets); }
/// <summary> /// 添加Preset /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void AddBtn_Click(object sender, RoutedEventArgs e) { string ZipFile = FileHelper.OpenFileDialog("Zip Files (*.zip)|*.zip"); if (String.IsNullOrEmpty(ZipFile)) { return; } string ZipName = ZipFile.Substring(ZipFile.LastIndexOf("\\") + 1, ZipFile.LastIndexOf(".") - (ZipFile.LastIndexOf("\\") + 1)); await FileHelper.TempUnzip(ZipFile); GlobalVariables_Preset.Init_Variables(); GlobalVariables_Preset.ZipName = ZipName; var addPresetIntro = new InstallWin.PresetAdd.PresetInstall(); addPresetIntro.Owner = MainWindow.GlobalMainWindow; addPresetIntro.WindowStartupLocation = WindowStartupLocation.CenterOwner; addPresetIntro.ShowDialog(); if (GlobalVariables_Preset.AddComplete) { PresetData presetData = new PresetData() { PresetName = GlobalVariables_Preset.PresetName, Core = GlobalVariables_Preset.CoreVersion, InstallTime = DateTime.UtcNow, isRunning = false }; PresetHelper.AddPresetJson(presetData); var newFlipper = CreateFlipper(presetData); RemoveFromView(ID.Preset_ExpText); AddToView(newFlipper, newFlipper.Name); SB_Message("Preset_Added"); } }
private void BindVariables() { string referrerurl = string.Empty; if (Request.QueryString["pname"] != null) { pageSEOName = Request.QueryString["pname"].ToString(); foreach (ListItem l in ddlPages.Items) { if (l.Value.Replace("-", " ").Trim() == pageSEOName.Replace("-", " ")) { ddlPages.SelectedValue = l.Value; break; } } } PresetInfo preset = new PresetInfo(); preset = PresetHelper.LoadActivePagePreset(TemplateName, pageSEOName); ddlLayout.SelectedValue = preset.ActiveLayout; layoutName = ddlLayout.SelectedValue; }
/// <summary> /// 展示ENB预设 /// </summary> /// <returns></returns> private bool ShowPresets() { var Presets = PresetHelper.GetPresetFromJson(); if (Presets == null) { if (!CheckTESVFolerState()) { ShowExpectionText("Unmanaged_ENB"); return(false); } SB_Message("No_Preset_Managed"); return(false); } if (Presets.Count == 0) { SB_Message("No_Preset_Managed"); return(false); } var AllFlippers = CreateFlippers(Presets); var ApplyedPreset = Presets.FirstOrDefault(p => p.isRunning == true); if (ApplyedPreset != null) { var ApplyedFlipper = AllFlippers.FirstOrDefault(p => p.Tag.ToString() == ApplyedPreset.PresetName); AddToView(ApplyedFlipper, ApplyedFlipper.Name); AllFlippers.Remove(ApplyedFlipper); } foreach (var thisFlipper in AllFlippers) { AddToView(thisFlipper, thisFlipper.Name); } return(true); }
/// <summary> /// 删除该组件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DeleteBtn_Click(object sender, RoutedEventArgs e) { var thisButton = sender as Button; Flipper thisFlipper = MainView.FindName(thisButton.Tag.ToString()) as Flipper; var CurrentPresets = PresetHelper.GetPresetFromJson(); var thisPreset = CurrentPresets.FirstOrDefault(p => p.PresetName == thisFlipper.Tag.ToString()); if (thisPreset.isRunning) { SB_Message("Error_PresetRunning"); return; } FileHelper.RM_Folder(SettingsData.StoragePath + ID.Dir_Preset + "\\" + thisPreset.PresetName); CurrentPresets.Remove(thisPreset); PresetHelper.SavePrests(CurrentPresets); RemoveFromView(thisButton.Tag.ToString()); SB_Message("Success_PresetRemoved"); }
//private string GetUpgraderUrl() //{ // string upgradeLink = string.Empty; // if (GetPortalID > 1) // { // upgradeLink = "~/portal/" + GetPortalSEOName + "/Admin/sfUpgrader" + Extension; // } // else // { // upgradeLink = "~/Admin/sfUpgrader" + Extension; // } // return upgradeLink; //} private void SetPortalCofig() { Hashtable hstPortals = GetPortals(); SageUserControl suc = new SageUserControl(); suc.PagePath = PagePath; int portalID = 1; #region "Get Portal SEO Name and PortalID" if (string.IsNullOrEmpty(Request.QueryString["ptSEO"])) { if (string.IsNullOrEmpty(PortalSEOName)) { PortalSEOName = GetDefaultPortalName(hstPortals, 1); } else if (!hstPortals.ContainsKey(PortalSEOName.ToLower().Trim())) { PortalSEOName = GetDefaultPortalName(hstPortals, 1); } else { portalID = int.Parse(hstPortals[PortalSEOName.ToLower().Trim()].ToString()); } } else { PortalSEOName = Request.QueryString["ptSEO"].ToString().ToLower().Trim(); portalID = Int32.Parse(Request.QueryString["ptlid"].ToString()); } #endregion suc.SetPortalSEOName(PortalSEOName.ToLower().Trim()); Session[SessionKeys.SageFrame_PortalSEOName] = PortalSEOName.ToLower().Trim(); Session[SessionKeys.SageFrame_PortalID] = 1; Session[SessionKeys.SageFrame_AdminTheme] = ThemeHelper.GetAdminTheme(1, GetUsername); Globals.sysHst[ApplicationKeys.ActiveTemplate + "_" + 1] = TemplateController.GetActiveTemplate(1).TemplateSeoName; Globals.sysHst[ApplicationKeys.ActivePagePreset + "_" + 1] = PresetHelper.LoadActivePagePreset(GetActiveTemplate, GetPageSEOName(Request.Url.ToString())); suc.SetPortalID(1); SetPortalID(1); #region "Set user credentials for modules" //SecurityPolicy objSecurity = new SecurityPolicy(); //if (objSecurity.GetUser(1) != string.Empty) //{ // SettingProvider objSP = new SettingProvider(); // SageFrameConfig sfConfig = new SageFrameConfig(); // string strRoles = string.Empty; // List<SageUserRole> sageUserRolles = objSP.RoleListGetByUsername(objSecurity.GetUser(1), 1); // if (sageUserRolles != null) // { // foreach (SageUserRole userRole in sageUserRolles) // { // strRoles += userRole.RoleId + ","; // } // } // if (strRoles.Length > 1) // { // strRoles = strRoles.Substring(0, strRoles.Length - 1); // } // if (strRoles.Length > 0) // { // SetUserRoles(strRoles); // } //} #endregion }
protected void btnApply_Click(object sender, EventArgs e) { HttpRuntime.Cache.Remove(CacheKeys.SageFrameJs); HttpRuntime.Cache.Remove(CacheKeys.SageFrameCss); string optimized_path = Server.MapPath(SageFrameConstants.OptimizedResourcePath); IOHelper.DeleteDirectoryFiles(optimized_path, ".js,.css"); if (File.Exists(Server.MapPath(SageFrameConstants.OptimizedCssMap))) { XmlHelper.DeleteNodes(Server.MapPath(SageFrameConstants.OptimizedCssMap), "resourcemaps/resourcemap"); } if (File.Exists(Server.MapPath(SageFrameConstants.OptimizedJsMap))) { XmlHelper.DeleteNodes(Server.MapPath(SageFrameConstants.OptimizedJsMap), "resourcemap/resourcemap"); } PresetInfo preset = new PresetInfo(); preset = PresetHelper.LoadActivePagePreset(TemplateName, GetPageSEOName(Request.Url.ToString())); if (ddlScreen.SelectedItem.ToString() != string.Empty) { preset.ActiveWidth = ddlScreen.SelectedItem.ToString(); } if (ddlThemes.SelectedItem != null && ddlThemes.SelectedItem.ToString() != string.Empty) { preset.ActiveTheme = ddlThemes.SelectedItem.ToString(); } if (ddlLayout.SelectedItem != null && ddlLayout.SelectedItem.ToString() != string.Empty) { preset.ActiveLayout = Path.GetFileNameWithoutExtension(ddlLayout.SelectedItem.ToString()); } List <KeyValue> lstLayouts = preset.lstLayouts; string pageName = Request.Url.ToString(); SageFrameConfig sfConfig = new SageFrameConfig(); pageName = Path.GetFileNameWithoutExtension(pageName); pageName = pageName.ToLower().Equals("default") ? sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) : pageName; bool isNewLayout = false; int oldPageCount = 0; bool isNewPage = false; bool deleteRepeat = false; bool duplicateLayout = false; List <string> pageList = new List <string>(); foreach (KeyValue kvp in lstLayouts) { if (kvp.Key == preset.ActiveLayout) { duplicateLayout = true; } string[] pages = kvp.Value.Split(','); pageList.Add(string.Join(",", pages)); if (pages.Count() == 1 && pages.Contains(pageName)) // for single pagename and if page = currentpageName { kvp.Key = preset.ActiveLayout; } else if (pages.Count() > 1 && pages.Contains(pageName)) // for multiple pagename and if page = currentpageName { isNewLayout = true; //its because we have to insert another layout List <string> lstnewpage = new List <string>(); foreach (string page in pages) { if (page.ToLower() != pageName.ToLower()) { lstnewpage.Add(page); } } kvp.Value = string.Join(",", lstnewpage.ToArray()); pageList.Add(kvp.Value); } else { oldPageCount++; } if (kvp.Value == "All" && kvp.Key == preset.ActiveLayout) { deleteRepeat = true; } } if (lstLayouts.Count == oldPageCount) { isNewPage = true; } List <KeyValue> lstNewLayouts = new List <KeyValue>(); if (isNewPage) { bool isAppended = false; foreach (KeyValue kvp in lstLayouts) { if (kvp.Key == preset.ActiveLayout) { if (kvp.Value.ToLower() != "all") { kvp.Value += "," + pageName; } isAppended = true; } lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } if (!isAppended) { lstNewLayouts.Add(new KeyValue(preset.ActiveLayout, pageName)); } lstLayouts = lstNewLayouts; } else if (isNewLayout) { bool isAppended = false; bool isAll = false; foreach (KeyValue kvp in lstLayouts) { if (kvp.Key == preset.ActiveLayout) { if (kvp.Value.ToLower() != "all") { kvp.Value += "," + pageName; isAll = true; } isAppended = true; } lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } if (!isAppended && !isAll) { lstNewLayouts.Add(new KeyValue(preset.ActiveLayout, pageName)); } lstLayouts = lstNewLayouts; } else if (deleteRepeat) { foreach (KeyValue kvp in lstLayouts) { if (kvp.Value.ToLower() != pageName.ToLower()) { lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } } lstLayouts = lstNewLayouts; } else if (duplicateLayout) { string key = preset.ActiveLayout; List <string> pages = new List <string>(); foreach (KeyValue kvp in lstLayouts) { if (kvp.Key.ToLower() != preset.ActiveLayout.ToLower()) { lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } else { pages.Add(kvp.Value); } } lstNewLayouts.Add(new KeyValue(key, string.Join(",", pages.ToArray()))); lstLayouts = lstNewLayouts; } preset.lstLayouts = lstLayouts; string presetPath = Decide.IsTemplateDefault(TemplateName.Trim()) ? Utils.GetPresetPath_DefaultTemplate(TemplateName) : Utils.GetPresetPath(TemplateName); string pagepreset = presetPath + "/" + TemplateConstants.PagePresetFile; presetPath += "/" + "pagepreset.xml"; AppErazer.ClearSysHash(ApplicationKeys.ActivePagePreset + "_" + GetPortalID); PresetHelper.WritePreset(presetPath, preset); SageFrame.Common.CacheHelper.Clear("PresetList"); Response.Redirect(Request.Url.OriginalString); }
protected void ddlLayout_SelectedIndexChanged(object sender, EventArgs e) { PresetInfo preset = new PresetInfo(); string pageName = ddlPages.SelectedValue; pageName = Regex.Replace(pageName, "--+", ""); preset = PresetHelper.LoadActivePagePreset(TemplateName, GetPageSEOName(Request.Url.ToString())); List <KeyValue> lstLayouts = preset.lstLayouts; preset.ActiveLayout = ddlLayout.SelectedValue; bool isNewLayout = false; int oldPageCount = 0; bool isNewPage = false; bool deleteRepeat = false; bool duplicateLayout = false; List <string> pageList = new List <string>(); foreach (KeyValue kvp in lstLayouts) { if (kvp.Key == preset.ActiveLayout) { duplicateLayout = true; } string[] pages = kvp.Value.Split(','); pageList.Add(string.Join(",", pages)); if (pages.Count() == 1 && pages.Contains(pageName)) // for single pagename and if page = currentpageName { kvp.Key = preset.ActiveLayout; } else if (pages.Count() > 1 && pages.Contains(pageName)) // for multiple pagename and if page = currentpageName { isNewLayout = true; //its because we have to insert another layout List <string> lstnewpage = new List <string>(); foreach (string page in pages) { if (page.ToLower() != pageName.ToLower()) { lstnewpage.Add(page); } } kvp.Value = string.Join(",", lstnewpage.ToArray()); pageList.Add(kvp.Value); } else { oldPageCount++; } if (kvp.Value == "All" && kvp.Key == preset.ActiveLayout) { deleteRepeat = true; } } if (lstLayouts.Count == oldPageCount) { isNewPage = true; } List <KeyValue> lstNewLayouts = new List <KeyValue>(); if (isNewPage) { bool isAppended = false; foreach (KeyValue kvp in lstLayouts) { if (kvp.Key == preset.ActiveLayout) { if (kvp.Value.ToLower() != "all") { kvp.Value += "," + pageName; } isAppended = true; } lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } if (!isAppended) { lstNewLayouts.Add(new KeyValue(preset.ActiveLayout, pageName)); } lstLayouts = lstNewLayouts; } else if (isNewLayout) { bool isAppended = false; bool isAll = false; foreach (KeyValue kvp in lstLayouts) { if (kvp.Key == preset.ActiveLayout) { if (kvp.Value.ToLower() != "all") { kvp.Value += "," + pageName; isAll = true; } isAppended = true; } lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } if (!isAppended && !isAll) { lstNewLayouts.Add(new KeyValue(preset.ActiveLayout, pageName)); } lstLayouts = lstNewLayouts; } else if (deleteRepeat) { foreach (KeyValue kvp in lstLayouts) { if (kvp.Value.ToLower() != pageName.ToLower()) { lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } } lstLayouts = lstNewLayouts; } else if (duplicateLayout) { string key = preset.ActiveLayout; List <string> pages = new List <string>(); foreach (KeyValue kvp in lstLayouts) { if (kvp.Key.ToLower() != preset.ActiveLayout.ToLower()) { lstNewLayouts.Add(new KeyValue(kvp.Key, kvp.Value)); } else { pages.Add(kvp.Value); } } lstNewLayouts.Add(new KeyValue(key, string.Join(",", pages.ToArray()))); lstLayouts = lstNewLayouts; } preset.lstLayouts = lstLayouts; string presetPath = Decide.IsTemplateDefault(TemplateName.Trim()) ? Utils.GetPresetPath_DefaultTemplate(TemplateName) : Utils.GetPresetPath(TemplateName); string pagepreset = presetPath + "/" + TemplateConstants.PagePresetFile; presetPath += "/" + "pagepreset.xml"; AppErazer.ClearSysHash(ApplicationKeys.ActivePagePreset + "_" + GetPortalID); PresetHelper.WritePreset(presetPath, preset); HttpRuntime.Cache.Remove(CacheKeys.SageFrameJs); HttpRuntime.Cache.Remove(CacheKeys.SageFrameCss); SageFrame.Common.CacheHelper.Clear("PresetList"); pageSEOName = ddlPages.SelectedValue.TrimStart('-'); layoutName = ddlLayout.SelectedValue; //BuildLayoutControl(); //BindModuleControls(); string redirectUrl = BuidRedirectURL(pageSEOName); Response.Redirect(redirectUrl); }