Exemple #1
0
        // From hitting the SPP Browse button in settings tab
        public void ScriptFolderBrowse()
        {
            // Start in our current user\AppData\Local folder
            string baseFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

            baseFolder += "\\Funcom\\Anarchy Online";

            // See if we can find a single scripts folder, but if there are multiple installations
            // then the user will need to choose which to manage
            string[] d = Directory.GetDirectories(baseFolder, "scripts", SearchOption.AllDirectories);

            // means we found only 1 match, otherwise it will default to AppData\Local\Funcom\Anarchy Online
            // to choose a specific folder
            if (d.Length == 1)
            {
                baseFolder = d[0];
            }

            // If it's empty, then it was cancelled and we keep the old setting
            string tmp = BrowseFolder(baseFolder);

            if (tmp != string.Empty)
            {
                ScriptFolderLocation = tmp;
                GeneralSettingsManager.SaveSettings(GeneralSettingsManager.SettingsPath, GeneralSettingsManager.GeneralSettings);
            }
        }
Exemple #2
0
        // From hitting the SPP Browse button in settings tab
        public void GameFolderBrowse()
        {
            // If it's empty, then it was cancelled and we keep the old setting
            string tmp = BrowseFolder(@"C:\");

            if (tmp != string.Empty)
            {
                GameFolderLocation = tmp;
                GeneralSettingsManager.SaveSettings(GeneralSettingsManager.SettingsPath, GeneralSettingsManager.GeneralSettings);
            }
        }
Exemple #3
0
 private void MetroWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     GeneralSettingsManager.SaveSettings(GeneralSettingsManager.SettingsPath, GeneralSettingsManager.GeneralSettings);
 }
 public ShellViewModel()
 {
     GeneralSettingsManager.LoadGeneralSettings();
     GeneralSettingsManager.MoveIntoView();
     LoadPageScripts();
 }