Beispiel #1
0
        public void WhenIFillAccountSettingsFormWithData()
        {
            ProfileSettings     settings        = sharedStorage.GetSharedInfo <ProfileSettings>(ContextTag.SettingData);
            AccountSettingsPage accountSettings = new AccountSettingsPage(Driver, _appSettings, sharedStorage);

            accountSettings.FillSettingsForm(settings);
        }
Beispiel #2
0
    static public void SetupScenarioFromJSON(string scenarioID, JSONObject json, ProfileSettings profileSettings)
    {
        if (!scenarioExists)
        {
            JSONObject scenario             = json[scenarioID];
            JSONObject settings_buildings   = scenario.GetField("building");
            JSONObject settings_player      = scenario.GetField("player");
            JSONObject settings_shopkeepers = scenario.GetField("shopkeeper");
            JSONObject settings_officers    = scenario.GetField("officer");

            List <string> existingBuildingResources = new List <string>();
            existingBuildingResources = GenerateBuildingResources(scenarioID, settings_buildings);

            List <string> occupiedBuildingResources = new List <string>();
            occupiedBuildingResources = GeneratePlayerResource(occupiedBuildingResources, scenarioID, settings_player, profileSettings);
            occupiedBuildingResources = GenerateShopkeeperResources(occupiedBuildingResources, scenarioID, settings_shopkeepers);
            occupiedBuildingResources = GenerateOfficerResources(occupiedBuildingResources, scenarioID, settings_officers);

            HarmonizeBuildingResourcesToDesignWorld(existingBuildingResources, occupiedBuildingResources);
            HarmonizePlayerResourcesToDesignWorld();
            HarmonizeOfficerResourcesToDesignWorld();
            scenarioExists = true;
        }
        else
        {
            Debug.LogError("You really shoulnd't be loading a new scenario when you've already got one there, buddy. Call 'ClearScenario()' first. -Scott");
        }
    }
        public MainWindowViewModel()
        {
            // Read the settings file to get the available profiles
            List <Profile> profiles = ProfileSettings.getProfiles();

            _profilesView = new ProfilesViewModel(profiles);

            _comparisonView = new DbComparisonViewModel();
            _comparisonView.OnComparisonComplete += new EventHandler <DatabaseComparisonEventArgs>((sender, args) => {
                StatusText = "";
                foreach (TableComparison tableComp in args.Tables)
                {
                    if (tableComp.LeftTable != null && tableComp.RightTable == null && tableComp.LeftTable.CreateStatement != null)
                    {
                        StatusText = StatusText + tableComp.LeftTable.CreateStatement + _sqlStatementDivider;
                    }
                    else if (tableComp.LeftTable != null)
                    {
                        StatusText = StatusText + tableComp.LeftTable.ToString() + _sqlStatementDivider;
                    }
                }
            });

            CopySqlToClipboardCommand = new AppCommand((sender) => CopySqlToClipboard(sender), (sender) => CanCopySqlToClipboard(sender));
        }
    public static void SetupScenarioFromJSON(string scenarioID, JSONObject json, ProfileSettings profileSettings)
    {
        if(!scenarioExists)
        {
            JSONObject scenario = json[scenarioID];
            JSONObject settings_buildings = scenario.GetField ("building");
            JSONObject settings_player = scenario.GetField ("player");
            JSONObject settings_shopkeepers = scenario.GetField ("shopkeeper");
            JSONObject settings_officers = scenario.GetField ("officer");

            List<string> existingBuildingResources = new List<string>();
            existingBuildingResources = GenerateBuildingResources (scenarioID, settings_buildings);

            List<string> occupiedBuildingResources = new List<string>();
            occupiedBuildingResources	= GeneratePlayerResource (occupiedBuildingResources, scenarioID, settings_player, profileSettings);
            occupiedBuildingResources	= GenerateShopkeeperResources (occupiedBuildingResources, scenarioID, settings_shopkeepers);
            occupiedBuildingResources	= GenerateOfficerResources (occupiedBuildingResources, scenarioID, settings_officers);

            HarmonizeBuildingResourcesToDesignWorld(existingBuildingResources, occupiedBuildingResources);
            HarmonizePlayerResourcesToDesignWorld();
            HarmonizeOfficerResourcesToDesignWorld();
            scenarioExists = true;
        } else {
            Debug.LogError ("You really shoulnd't be loading a new scenario when you've already got one there, buddy. Call 'ClearScenario()' first. -Scott");
        }
    }
Beispiel #5
0
        public void GivenIGetPickupDataFromFile(string file)
        {
            string          data     = DataFiles.ReadJsonDataFile(file);
            ProfileSettings settings = ObjectSerializer.DeserializeToObject <ProfileSettings>(data);

            sharedStorage.SetSharedInfo(ContextTag.SettingData, settings);
        }
        //
        // GET: /ProfileSettings/
        public ActionResult Settings(string message = null)
        {
            ViewBag.Message  = null;
            ViewBag.MsgColor = "red";
            var             loggedInUser = (User)Session["User"];
            ProfileSettings settingsUser = new ProfileSettings();

            settingsUser.Id        = loggedInUser.Id;
            settingsUser.FirstName = loggedInUser.FirstName;
            settingsUser.LastName  = loggedInUser.LastName;
            settingsUser.Username  = loggedInUser.Username;
            settingsUser.Email     = loggedInUser.Email;

            if (message != null)
            {
                if (message == "Current Password Incorrect")
                {
                    ViewBag.Message = "Current Password Incorrect";
                    return(View(settingsUser));
                }
                if (message == "Paswords do not macht")
                {
                    ViewBag.Message = "New Password and Confirm Password do not match";
                    return(View(settingsUser));
                }
                else
                {
                    ViewBag.MsgColor = "green";
                    ViewBag.Message  = "Change Confirmed";
                    return(View(settingsUser));
                }
            }
            return(View(settingsUser));
        }
        private static void CancelChanges(object e)
        {
            if (CtrEnable == Boolean.TrueString)
            {
                CtrEnable       = Boolean.FalseString;
                BtnModifyEnable = Boolean.TrueString;

                //    PopulateIpEnvironment();

                SettingScreenLoaded_Load(e);
                //    PopulateIpEnvironment();
            }

            else
            {
                CtrEnable       = Boolean.FalseString;
                BtnModifyEnable = Boolean.TrueString;

                //  PopulateIpEnvironment();
                SettingScreenLoaded_Load(e);
                //  PopulateIpEnvironment();
            }
            ProfileSettings oBolt = System.Windows.Application.Current.Windows.OfType <ProfileSettings>().FirstOrDefault();

            if (oBolt != null)
            {
                oBolt.Close();
            }
        }
        public string[] AskLoginAndPass(string pwTitle, string config)
        {
            // set labels
            lblAsk.Text  = pwTitle;
            lblName.Text = config;

            ProfileSettings settings = Settings.current.getProfile(config);

            chkRememberName.Checked = settings.storeUserName;
            txtUsername.Text        = settings.userName;
            // show form, return
            Console.WriteLine("Oups I did it again ;)");
            //if (this.ShowDialog() != DialogResult.OK)
            //    return null;
            //else
            //{
            settings.storeUserName = chkRememberName.Checked;
            if (settings.storeUserName)
            {
                settings.userName = txtUsername.Text;
            }
            Settings.current.Save();
            return(new string[] { txtUsername.Text, txtPasswd.Text });
            //}
        }
Beispiel #9
0
        public Profil()
        {
            InitializeComponent();
            var kroki = new List <string>();
            int x     = 0;

            while (x <= 30000)
            {
                kroki.Add(x.ToString());
                x += 500;
            }
            CelKroki.ItemsSource = kroki;
            ProfileSettings settings = UtilityMethods.ReadSettings();

            for (int i = 0; i < kroki.Count; i++)
            {
                if (kroki[i] == settings.CelKroki)
                {
                    CelKroki.SelectedIndex = i;
                    settings.CelKrokiId    = i;
                    UtilityMethods.SaveFile(settings, App.FolderPath, "settings.json");
                    break;
                }
            }
            CheckPerm();
        }
Beispiel #10
0
 public CharacterProfile()
 {
     Settings    = new ProfileSettings();
     Tasks       = new ObservableCollection <BMTask>();
     TaskManager = new TaskManager(this);
     ShoudPause  = false;
 }
        //Karakter és játék adatok elmentése
        public void SaveProfile()
        {
            FileStream   stream = OpenFile(FileMode.Create);
            Profile_Data data   = playerProfile.GetData();

            try
            {
                formatter.Serialize(stream, data);
            }

            catch (SerializationException e)
            {
                Debug.Log(e);
                throw;
            }

            stream.Close();

            if (settingsState == ProfileSettings.NewProfile)
            {
                Notification_Controller.DisplayNotification("Az új profil létrehozva!");
            }

            else if (settingsState == ProfileSettings.Default)
            {
                Notification_Controller.DisplayNotification("A változtatások sikeresen elmentve!");
            }

            else if (settingsState == ProfileSettings.Silent)
            {
                settingsState = ProfileSettings.Default;
            }
        }
Beispiel #12
0
        public ProfileSettings ReadProfiles(string devices)
        {
            // Validate
            ServerRuntime.TestAdminAccess();

            // Helper
            string defaultName;

            // Create response
            var settings =
                new ProfileSettings
            {
                SystemProfiles =
                    ServerRuntime
                    .VCRServer
                    .GetProfiles(ConfigurationProfile.Create, out defaultName)
                    .OrderBy(profile => profile.Name, ProfileManager.ProfileNameComparer)
                    .ToArray()
            };

            // Merge default
            settings.DefaultProfile = defaultName;

            // Report
            return(settings);
        }
Beispiel #13
0
        public bool?WriteProfiles(string devices, [FromBody] ProfileSettings settings)
        {
            // Validate
            ServerRuntime.TestAdminAccess();

            // List of profiles to use
            var profiles = settings.SystemProfiles.Where(profile => profile.UsedForRecording).Select(profile => profile.Name).ToList();

            // Move default to the front
            var defaultIndex = profiles.IndexOf(settings.DefaultProfile);

            if (defaultIndex >= 0)
            {
                // Insert at the very beginning
                profiles.Insert(0, profiles[defaultIndex]);
                profiles.RemoveAt(defaultIndex + 1);
            }

            // Prepare
            var update = VCRConfiguration.Current.BeginUpdate(SettingNames.Profiles);

            // Fill
            update[SettingNames.Profiles].NewValue = string.Join("|", profiles);

            // Process
            return(ServerRuntime.Update(update.Values, ServerRuntime.VCRServer.UpdateProfiles(settings.SystemProfiles, profile => profile.Name, (profile, device) => profile.WriteBack(device))));
        }
    public Resources_Player(ProfileSettings profile,
	                         Resources_Building home,
	                         int money,
	                         int income,
	                         int expenses,
	                         int strength,
	                         int presence,
	                         int opinion,
	                         Resources_Inventory inventory)
        : base(profile.id,
		        profile.name,
		        profile.image,
		        profile.gender,
		        home,
		        money,
		        income,
		        expenses,
		        strength,
		        inventory)
    {
        _presence = presence;
        _opinion = opinion;
        instance = this;

        Manager_Resources.NewPlayer(this);
    }
Beispiel #15
0
    public Resources_Player(ProfileSettings profile,
                            Resources_Building home,
                            int money,
                            int income,
                            int expenses,
                            int strength,
                            int presence,
                            int opinion,
                            Resources_Inventory inventory)
        : base(profile.id,
               profile.name,
               profile.image,
               profile.gender,
               home,
               money,
               income,
               expenses,
               strength,
               inventory)
    {
        _presence = presence;
        _opinion  = opinion;
        instance  = this;

        Manager_Resources.NewPlayer(this);
    }
Beispiel #16
0
        public void ThenVerifyAccountSettingsPageContainsCorrectData()
        {
            ProfileSettings     settings        = sharedStorage.GetSharedInfo <ProfileSettings>(resourceTag);
            AccountSettingsPage accountSettings = new AccountSettingsPage(Driver, _appSettings, sharedStorage);

            accountSettings.AssertSettingDetailsData(settings);
        }
Beispiel #17
0
 void ChangeTheme(object sender, EventArgs e)
 {
     try
     {
         ProfileSettings settings = (ProfileSettings)BindingContext;
         UtilityMethods.SaveFile(settings, App.FolderPath, "settings.json");
         if (settings.UseSystemTheme)
         {
             Application.Current.UserAppTheme = OSAppTheme.Unspecified;
         }
         else
         {
             if (settings.DarkMode)
             {
                 Application.Current.UserAppTheme = OSAppTheme.Dark;
             }
             else
             {
                 Application.Current.UserAppTheme = OSAppTheme.Light;
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Beispiel #18
0
        private void Element_Unfocused(object sender, FocusEventArgs e)
        {
            ProfileSettings saveSettings = (ProfileSettings)BindingContext;

            saveSettings.CzasTreninguCel = TimeSpan.FromHours(Convert.ToDouble(CzasTreningu.Text));
            Console.WriteLine(saveSettings.ToString());
            UtilityMethods.SaveFile(saveSettings, App.FolderPath, "settings.json");
        }
Beispiel #19
0
 private void LoadAllSettings()
 {
     laucherSettings      = new LauncherSettings();
     serverSettings       = new ServerSettings(System.IO.Path.Combine(laucherSettings.GetServerLocation(), "data"));
     ProfileSettings      = new ProfileSettings(Path.Combine(laucherSettings.GetServerLocation(), "data/profiles"));
     LoginBackendURL.Text = laucherSettings.GetBackendURL();
     Port.Text            = serverSettings.GetServerPort();
 }
Beispiel #20
0
 public UserDataManager()
 {
     currentPlayData = new UserData(true);
     recordedData    = new HighScoreData();
     profileSettings = new ProfileSettings();
     CheckSaveDataDirectory();
     LoadData();
 }
Beispiel #21
0
 public void EditAccount(ProfileSettings settings)
 {
     PasswordText.Password    = settings.WowSettings.Password;
     WoWFileInput.FileName    = settings.WowSettings.WowPath;
     HBProfileInput.FileName  = settings.HonorbuddySettings.HonorbuddyProfile;
     HBPathInput.FileName     = settings.HonorbuddySettings.HonorbuddyPath;
     RegionCombo.SelectedItem = settings.WowSettings.Region;
     IsEditing = true;
 }
Beispiel #22
0
        public void ShouldChangeProfileSettings()
        {
            Profile         profile  = GetNewProfile();
            ProfileSettings settings = new ProfileSettings(PrivacyType.Public);

            profile.ChangeSettings(settings);

            Assert.IsNotNull(profile.Settings);
            Assert.AreEqual(PrivacyType.Public, profile.Settings.PrivacyType);
        }
        private void BoltSetting_Closing(object e)
        {
            Windows_BoltSettingsLocationChanged(e);
            ProfileSettings oBolt = System.Windows.Application.Current.Windows.OfType <ProfileSettings>().FirstOrDefault();

            if (oBolt != null)
            {
                oBolt.Close();
            }
        }
Beispiel #24
0
        /// <summary>
        /// Parametres d'un utilisateur
        /// </summary>
        /// <returns></returns>
        public string GetSetting(ProfileSettings profileSetting, string userName = null)
        {
            if (userName == null)
            {
                userName = Membership.GetUser()?.UserName;
            }

            var profile = ProfileBase.Create(userName);

            return(profile.GetPropertyValue(profileSetting.ToString()).ToString());
        }
 public DataPagesViewModel(string fileName)
 {
     _fileName               = fileName;
     _profileSettings        = GpfTools.GpfUtil.ProfilesList().First(p => p.Item1.Contains(_fileName)).Item2.Items[0] as ProfileSettings;
     _selectedDataPagesItems = new ObservableCollection <ProfileSettingsNavDataPage>();
     foreach (var item in _profileSettings.NavDataPage)
     {
         _selectedDataPagesItems.Add(item);
     }
     _selectedDataPagesItems.CollectionChanged += SelectedDataPagesItemsCollectionChanged;
     AddCommand = new RelayCommand(g => _selectedDataPagesItems.Add(new ProfileSettingsNavDataPage()
     {
         DataPageCustomIdx = "0",
         DataPageField1    =
             new DataPageField1[]
         {
             new DataPageField1()
             {
                 DataPageField
                     = "83",
                 DataPageFieldLabel
                     = "0"
             }
         },
         DataPageField2 =
             new DataPageField2[]
         {
             new DataPageField2()
             {
                 DataPageField
                     = "83",
                 DataPageFieldLabel
                     = "0"
             }
         },
         DataPageField3 =
             new DataPageField3[]
         {
             new DataPageField3()
             {
                 DataPageField
                     = "83",
                 DataPageFieldLabel
                     = "0"
             }
         },
         DataPageIdx  = "0",
         DataPageName =
             "5",
         DataPageType =
             "3"
     }));
     DeleteCommand = new RelayCommand(g => _selectedDataPagesItems.Remove(SelectedDataPage));
 }
        private void SetSettings(ProfileSettingsTypeEnum profileType, int profileIdValue)
        {
            List <IPolyline> profileLines = new List <IPolyline>();

            var profileSetting = profileSettings[profileType];

            if (profileSetting == null)
            {
                profileSetting = new ProfileSettings();
            }


            //Check if the View.DemLayerName if Layer name
            profileSetting.DemLayerName = View.DemLayerName;


            if (profileType == ProfileSettingsTypeEnum.Points)
            {
                var line = EsriTools.CreatePolylineFromPoints(pointsToShow[ProfileSettingsPointButtonEnum.PointsFist], pointsToShow[ProfileSettingsPointButtonEnum.PointsSecond]);
                if (line != null)
                {
                    profileLines.Add(line);
                }
            }

            if (View.SelectedProfileSettingsType == ProfileSettingsTypeEnum.Fun)
            {
                try
                {
                    var lines = EsriTools.CreatePolylinesFromPointAndAzimuths(pointsToShow[ProfileSettingsPointButtonEnum.CenterFun], View.FunLength, View.FunLinesCount, View.FunAzimuth1, View.FunAzimuth2);
                    if (lines != null)
                    {
                        profileLines.AddRange(lines);
                    }
                }
                catch (MilSpaceProfileLackOfParameterException ex)
                {
                    //TODO: Wtite log
                    MessageBox.Show(ex.Message, "MilSpace", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                catch (Exception ex)
                {
                    //TODO: Wtite log
                }
            }

            profileSetting.ProfileLines = profileLines.ToArray();

            profileSettings[profileType] = profileSetting;

            InvokeOnProfileSettingsChanged();

            GraphicsLayerManager.UpdateCalculatingGraphic(profileSetting.ProfileLines, profileIdValue, (int)profileType);
        }
    private void LoadScenario()
    {
        // TODO: Implement Player Profile Settings
        ProfileSettings profile = new ProfileSettings();

        profile.gender = Enums.Gender.female;
        profile.image  = "DefaultFace";
        profile.name   = "ProfileName";

        // Hard coded to load scenario_01;
        Scenario_Script.SetupScenarioFromJSON("scenario_01", _scenarioData, profile);
    }
 private void EditAccount(ProfileSettings charSettings)
 {
     if (charSettings != null)
     {
         var ani = new DoubleAnimation(255, new Duration(TimeSpan.Parse("0:0:0.4")))
         {
             DecelerationRatio = 0.7
         };
         AccountConfigGrid.BeginAnimation(WidthProperty, ani);
         AccountConfig.EditAccount(charSettings);
     }
 }
        public void LoadProfile()
        {
            string path = Path.Combine(Application.persistentDataPath, fileName);

            mainMenuController = GameObject.Find("Menu_Controller").GetComponent <Main_Menu_Controller>();

            //Ellenőrzi, hogy van-e már mentésünk
            if (File.Exists(path))
            {
                FileStream   stream = OpenFile(FileMode.Open);
                Profile_Data data   = null;
                try
                {
                    data = formatter.Deserialize(stream) as Profile_Data;
                }

                catch (SerializationException e)
                {
                    Debug.Log(e);
                    throw;
                }

                stream.Close();

                //Megnézzük, hogy a betöltött adatok érvényesek-e
                if (data != default(Profile_Data))
                {
                    //Amennyiben igen, úgy betöltjük őket a profilba
                    Deck active    = factory.GetDeckFromList(data.activeDeck);
                    Deck secondary = factory.GetDeckFromList(data.secondaryDeck);
                    playerProfile = new Player(data, active, secondary);

                    //Jelezzük, hogy megtörtént a belépés.
                    mainMenuController.PlayerLoginStatus(true);
                }

                else
                {
                    Notification_Controller.DisplayNotification("A betöltés sikertelen!");
                    settingsState = ProfileSettings.NewProfile;
                    AskForName();
                    NewProfile();
                }
            }

            //Ha nincs még mentés file
            else
            {
                Notification_Controller.DisplayNotification("A mentést tároló fájl nincs létrehozva!");
                settingsState = ProfileSettings.NewProfile;
                AskForName();
            }
        }
Beispiel #30
0
    public static void CreateProfileSettingsHolder()
    {
        ProfileSettings profileSettingsHolder =
            ScriptableObject.CreateInstance <ProfileSettings>();

        AssetDatabase.CreateAsset(profileSettingsHolder,
                                  "Assets/Resources/ScriptableObjects/ProfileSettings.asset");
        AssetDatabase.SaveAssets();

        EditorUtility.FocusProjectWindow();
        Selection.activeObject = profileSettingsHolder;
    }
Beispiel #31
0
        public IActionResult UpdateDetails([FromBody] ProfileSettings profile)
        {
            try
            {
                AppUser user = _appDbContext.Set <AppUser>().FirstOrDefault(u => u.Id == _clientData.Id);

                if (user != null)
                {
                    _appDbContext.Attach(user);

                    if (profile.FirstName != user.FirstName)
                    {
                        user.FirstName = profile.FirstName;
                    }
                    if (profile.LastName != user.LastName)
                    {
                        user.LastName = profile.LastName;
                    }

                    if (_clientData.UserType == (int)UserType.Candidate)
                    {
                        if (profile.AllowSendResume != null)
                        {
                            CandidateUser candidate = _appDbContext.Set <CandidateUser>().FirstOrDefault(u => u.Id == _clientData.ChildId);
                            _appDbContext.Attach(candidate);
                            candidate.AllowSendResume = (bool)profile.AllowSendResume;
                        }
                    }

                    else if (_clientData.UserType == (int)UserType.Recruiter)
                    {
                        if (profile.ReceiveNotifications != null)
                        {
                            RecruiterUser recruiter = _appDbContext.Set <RecruiterUser>().FirstOrDefault(u => u.Id == _clientData.ChildId);
                            _appDbContext.Attach(recruiter);
                            recruiter.ReceiveNotifications = (bool)profile.ReceiveNotifications;
                        }
                    }

                    _appDbContext.SaveChanges();

                    return(Ok());
                }

                return(BadRequest("There was a problem updating details"));
            }
            catch (Exception e)
            {
                _log.LogError(e, "Update Details failed");
                return(BadRequest(e));
            }
        }
Beispiel #32
0
 public MarketService(
     ILogger <MarketService> logger,
     WebRequestService requestService,
     SteamUrlService steamUrlService,
     ProfileSettings profileSettings,
     LocalCacheService localCacheService)
 {
     _logger            = logger;
     _requestService    = requestService;
     _steamUrlService   = steamUrlService;
     _profileSettings   = profileSettings;
     _localCacheService = localCacheService;
 }
Beispiel #33
0
        public ProfileSettings GetProfileSettings()
        {
            var baseName = "Asuna";

            ProfileSettings p = new ProfileSettings
            {
                ProfileName = baseName,
                ProfileDescription = "Asuna's profile. This profile contains the settings the developer of VHR uses in game.",
                IsDefault = true,
                Options = GetOptions()
            };
            return p;
        }
Beispiel #34
0
        public ProfileSettings GetProfileSettings()
        {
            var baseName = "Eirik";

            ProfileSettings p = new ProfileSettings
            {
                ProfileName = baseName,
                ProfileDescription = "Eirik's Profile. A Diamond Vayne Main's settings.",
                IsDefault = true,
                Options = GetOptions()
            };
            return p;
        }
    private void LoadScenario()
    {
        // TODO: Implement Player Profile Settings
        ProfileSettings profile = new ProfileSettings();
        profile.gender = Enums.Gender.female;
        profile.image = "DefaultFace";
        profile.name = "ProfileName";

        // Hard coded to load scenario_01;
        Scenario_Script.SetupScenarioFromJSON("scenario_01",_scenarioData, profile);
    }
    protected static List<string> GeneratePlayerResource(List<string> occupiedBuildingResources, string scenarioID, JSONObject json, ProfileSettings profileSettings)
    {
        for (int i = 0; i < json.Count; i++)
        {
            JSONObject player = json[i];

            new Resources_Player(
                // profile settings, home, money, income, expenses, strength, presence, opinion, inventory
                profileSettings,
                Manager_Resources.GetBuildingByID(player.GetField ("home").str),
                Mathf.Clamp (int.Parse (player.GetField ("money").str), moneyMin, moneyMax),
                Mathf.Clamp (int.Parse (player.GetField ("income").str), moneyMin, moneyMax),
                Mathf.Clamp (int.Parse (player.GetField ("expenses").str), moneyMin, moneyMax),
                Mathf.Clamp (int.Parse (player.GetField ("strength").str), statMin, statMax),
                Mathf.Clamp (int.Parse (player.GetField ("presence").str), statMin, statMax),
                Mathf.Clamp (int.Parse (player.GetField ("opinion").str), statMin, statMax),
                Resources_Inventory.GetInventoryByID(player.GetField ("inventory").str)
            );

            if(occupiedBuildingResources.Contains(player.GetField("home").str)) {
                Debug.LogError ("Easy, Nelly. Someone messed up. Go tell whoever was messing with the static data that the player's safehouse can't be in " + player.GetField("home").str + ". Someone else is already in there! -Scott");
            } else {
                occupiedBuildingResources.Add (player.GetField("home").str);
            }
        }
        return occupiedBuildingResources;
    }
	public void Insert(int index, ProfileSettings authorizationSettings) {}
	// Methods
	public void Add(ProfileSettings profilesSettings) {}
        public ProfileSettings ReadProfiles( string devices )
        {
            // Validate
            ServerRuntime.TestAdminAccess();

            // Helper
            string defaultName;

            // Create response
            var settings =
                new ProfileSettings
                {
                    SystemProfiles =
                        ServerRuntime
                            .VCRServer
                            .GetProfiles( ConfigurationProfile.Create, out defaultName )
                            .OrderBy( profile => profile.Name, ProfileManager.ProfileNameComparer )
                            .ToArray()
                };

            // Merge default
            settings.DefaultProfile = defaultName;

            // Report
            return settings;
        }
Beispiel #40
0
 public Settings()
 {
     ProfileSettings = new ProfileSettings();
     MembershipSettings = new MembershipSettings();
 }