Ejemplo n.º 1
0
        public static SystemSettings Load()
        {
            var systemSettings = new SystemSettings();
            var key = Registry.CurrentUser.OpenSubKey(Key);
            if (key != null)
            {
                string files = (string)key.GetValue("OpenFiles");
                systemSettings.OpenFiles = files.Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList();
                systemSettings.ActiveTabIndex = (int)key.GetValue("ActiveTabIndex");
                systemSettings.WindowState = (WindowState)(int)key.GetValue("WindowState");
            }

            return systemSettings;
        }
Ejemplo n.º 2
0
 protected override void OnExit(object sender, EventArgs e)
 {
     SystemSettings.Save();
     base.OnExit(sender, e);
 }