Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.ComponentModel;
- using Microsoft.Win32;
- using Rime.Properties;
- using DefaultSettings = Rime.Properties.Settings;
- namespace Rime.Core.Settings
- {
- public class RimeSettings
- {
- // Rime Specific
- private string m_CurrentDir = AppDomain.CurrentDomain.BaseDirectory;
- private static string CheckForBF3()
- {
- var s_Key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "");
- var s_SubKey = s_Key.OpenSubKey("Software\\EA Games\\Battlefield 3");
- return s_SubKey == null ? "" : s_SubKey.GetValue("Install Dir", "").ToString();
- }
- public RimeSettings()
- {
- }
- public void Save()
- {
- DefaultSettings.Default.Save();
- }
- #region Rime Application Settings
- [CategoryAttribute("Rime"),
- DefaultValueAttribute(true)]
- public bool SaveOnClose
- {
- get { return Properties.Settings.Default.SaveOnClose; }
- set { Properties.Settings.Default.SaveOnClose = value; }
- }
- [CategoryAttribute("Rime")]
- public string GreetingText
- {
- get { return Properties.Settings.Default.GreetingText; }
- set { Properties.Settings.Default.GreetingText = value; }
- }
- [CategoryAttribute("Rime"),
- DescriptionAttribute("Location of the dictionary database file.")]
- public string DictionaryDb
- {
- get { return DefaultSettings.Default.DictionaryDb; }
- set { DefaultSettings.Default.DictionaryDb = value; }
- }
- [CategoryAttribute("Rime"),
- DescriptionAttribute("Should the dictionary be auto-loaded on Rime startup.")]
- public bool DictionaryAutoLoad
- {
- get { return DefaultSettings.Default.DictionaryAutoLoad; }
- set { DefaultSettings.Default.DictionaryAutoLoad = value; }
- }
- [CategoryAttribute("Rime"),
- DescriptionAttribute("Should a check for a newer version be done on startup.")]
- public bool CheckForUpdates
- {
- get { return DefaultSettings.Default.CheckForUpdates; }
- set { DefaultSettings.Default.CheckForUpdates = value; }
- }
- [CategoryAttribute("Rime"),
- DescriptionAttribute("Should Rime connect to the site on startup.")]
- public bool AutoLogin
- {
- get { return DefaultSettings.Default.AutoLogin; }
- set { DefaultSettings.Default.AutoLogin = value; }
- }
- #endregion
- #region Reflection Settings
- [CategoryAttribute("Reflection")]
- public string ChunkDirectory
- {
- get { return Properties.Settings.Default.ChunkDirectory; }
- set { Properties.Settings.Default.ChunkDirectory = value; }
- }
- [CategoryAttribute("Reflection"),
- DescriptionAttribute("Directory where exported data from this application will go.")]
- public string ExportDirectory
- {
- get { return Properties.Settings.Default.ExportDirectory; }
- set { Properties.Settings.Default.ExportDirectory = value; }
- }
- #endregion
- #region Game Client Settings
- [CategoryAttribute("Game"),
- DescriptionAttribute("The install directory of Battlefield 3\x99.")]
- public string BattlefieldDirectory
- {
- get { return Properties.Settings.Default.BattlefieldRoot; }
- set { Properties.Settings.Default.BattlefieldRoot = value; }
- }
- #endregion
- #region Map Signing Settings
- [CategoryAttribute("Signing"),
- DescriptionAttribute("Location of current crypto message.")]
- public string CryptMessageLocation
- {
- get { return DefaultSettings.Default.CryptMessageLocation; }
- set { DefaultSettings.Default.CryptMessageLocation = value; }
- }
- [CategoryAttribute("Signing"),
- DescriptionAttribute("Location of crypto public key.")]
- public string CryptPublicKeyLocation
- {
- get { return DefaultSettings.Default.CryptPubKeyLocation; }
- set { DefaultSettings.Default.CryptPubKeyLocation = value; }
- }
- #endregion
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment