/// <summary> /// 根据参数实例化 /// </summary> /// <param name="tagOpenMode">标签的开放模式</param> /// <param name="compressText">是否压缩文本</param> /// <param name="compatibleMode">是否采用兼容模式</param> public TemplateDocumentConfig(TagOpenMode tagOpenMode, bool compressText, bool compatibleMode) { this.TagOpenMode = tagOpenMode; this.CompressText = compressText; this.CompatibleMode = compatibleMode; }
/// <summary> /// 根据参数实例化 /// </summary> /// <param name="tagOpenMode">标签的开放模式</param> /// <param name="compressText">是否压缩文本</param> public TemplateDocumentConfig(TagOpenMode tagOpenMode, bool compressText) { this.TagOpenMode = tagOpenMode; this.CompressText = compressText; this.CompatibleMode = false; }
/// <summary> /// 根据参数实例化 /// </summary> /// <param name="tagOpenMode">标签的开放模式</param> public TemplateDocumentConfig(TagOpenMode tagOpenMode) { this.TagOpenMode = tagOpenMode; this.CompressText = false; this.CompatibleMode = false; }
public static void LoadSettings(bool applyThemeAswell = false) { // Declare Registry var keyApp = Registry.CurrentUser.CreateSubKey("Software\\Xeraxic\\Assembly\\ApplicationSettings\\"); // Create a JSON Seralizer var jss = new JavaScriptSerializer(); if (keyApp != null) { applicationAccent = (Accents)keyApp.GetValue("accent", 0); applicationEasterEggs = Convert.ToBoolean(keyApp.GetValue("easterEggs", true)); applicationUpdateOnStartup = Convert.ToBoolean(keyApp.GetValue("CheckUpdatesOnStartup", true)); if (applyThemeAswell) ApplyAccent(); applicationRecents = jss.Deserialize<List<RecentFileEntry>>(keyApp.GetValue("RecentFiles", "").ToString()); applicationSizeWidth = Convert.ToSingle(keyApp.GetValue("SizeWidth", 1100)); applicationSizeHeight = Convert.ToSingle(keyApp.GetValue("SizeHeight", 600)); applicationSizeMaximize = Convert.ToBoolean(keyApp.GetValue("SizeMaxamize", false)); XDKNameIP = keyApp.GetValue("XDKNameIP", "192.168.1.0").ToString(); if (xbdm != null) { xbdm.UpdateDeviceIdent(XDKNameIP); //try { xbdm.Connect(); } catch { } } XDKAutoSave = Convert.ToBoolean(keyApp.GetValue("XDKAutoSave", true)); XDKScreenshotPath = keyApp.GetValue("XDKScreenshotPath", VariousFunctions.GetApplicationLocation() + @"Saved Images\").ToString(); XDKResizeImages = Convert.ToBoolean(keyApp.GetValue("XDKScreenshotResize", true)); XDKResizeScreenshotHeight = Convert.ToInt16(keyApp.GetValue("XDKScreenshotHeight", 1080)); XDKResizeScreenshotWidth = Convert.ToInt16(keyApp.GetValue("XDKScreenshotWidth", 1920)); XDKScreenshotGammaCorrect = Convert.ToBoolean(keyApp.GetValue("XDKScreenGammaCorrect", true)); XDKScreenshotGammaModifier = Convert.ToDouble(keyApp.GetValue("XDKScreenModifier", 0.5)); XDKScreenshotFreeze = Convert.ToBoolean(keyApp.GetValue("XDKScreenFreeze", false)); startpageShowOnLoad = Convert.ToBoolean(keyApp.GetValue("ShowStartPageOnLoad", true)); startpageHideOnLaunch = Convert.ToBoolean(keyApp.GetValue("HideStartPageOnLaunch", false)); startpageShowRecentsMap = Convert.ToBoolean(keyApp.GetValue("ShowRecentsMap", true)); startpageShowRecentsBLF = Convert.ToBoolean(keyApp.GetValue("ShowRecentsBLF", true)); startpageShowRecentsMapInfo = Convert.ToBoolean(keyApp.GetValue("ShowRecentsMapInfo", true)); halomapTagSort = (TagSort)keyApp.GetValue("TagSorting", 0); halomapTagOpenMode = (TagOpenMode)keyApp.GetValue("TagOpeningMode", 0); halomapShowEmptyClasses = Convert.ToBoolean(keyApp.GetValue("ShowEmptyClasses", false)); halomapOnlyShowBookmarkedTags = Convert.ToBoolean(keyApp.GetValue("OnlyShowBookmarkedTags", false)); halomapLastSelectedMetaEditor = (LastMetaEditorType)keyApp.GetValue("LastSelectedMetaEditor", 0); halomapMapInfoDockSide = (MapInfoDockSide)keyApp.GetValue("MapInfoDockSide", 0); pluginsShowInvisibles = Convert.ToBoolean(keyApp.GetValue("ShowInvisibles", false)); pluginsShowComments = Convert.ToBoolean(keyApp.GetValue("ShowComments", true)); defaultMAP = Convert.ToBoolean(keyApp.GetValue("DefaultMAPEditor", true)); defaultBLF = Convert.ToBoolean(keyApp.GetValue("DefaultBLFEditor", false)); defaultMIF = Convert.ToBoolean(keyApp.GetValue("DefaultMIFEditor", false)); defaultAMP = Convert.ToBoolean(keyApp.GetValue("DefaultAMPEditor", true)); } OnSettingsChanged(); }