private void LoadSettings() { DisplayButtons(); InfluenceModelOn.Checked = _mainOrganization.Models.Influence.On; InfluenceRateOfAgentsOn.Text = _mainOrganization.Models.Influence.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); BeliefsModelOn.Checked = _mainOrganization.Models.Beliefs.On; BeliefsRateOfAgentsOn.Text = _mainOrganization.Models.Beliefs.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); tbWorkers.Text = _mainOrganization.WorkersCount.ToString(CultureInfo.InvariantCulture); tbInfluencers.Text = _mainOrganization.InfluencersCount.ToString(CultureInfo.InvariantCulture); tbBeliefs.Text = _mainOrganization.BeliefCount.ToString(CultureInfo.InvariantCulture); HasBeliefs.Checked = _mainOrganization.Templates.Human.Cognitive.KnowledgeAndBeliefs.HasBelief; ThresholdForReacting.Text = _mainOrganization.Murphies.IncompleteBelief.ThresholdForReacting .ToString(CultureInfo.InvariantCulture); #region Influencer InfluencerBeliefLevel.Items.AddRange(BeliefLevelService.GetNames()); InfluencerBeliefLevel.SelectedItem = BeliefLevelService.GetName(_mainOrganization.InfluencerTemplate .Cognitive .KnowledgeAndBeliefs.DefaultBeliefLevel); MinimumBeliefToSendPerBit.Text = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent .MinimumBeliefToSendPerBit.ToString(CultureInfo.InvariantCulture); MinimumNumberOfBitsOfBeliefToSend.Text = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent .MinimumNumberOfBitsOfBeliefToSend.ToString(CultureInfo.InvariantCulture); MaximumNumberOfBitsOfBeliefToSend.Text = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent .MaximumNumberOfBitsOfBeliefToSend.ToString(CultureInfo.InvariantCulture); InfluentialnessMin.Text = _mainOrganization.InfluencerTemplate.Cognitive.InternalCharacteristics .InfluentialnessRateMin.ToString(CultureInfo.InvariantCulture); InfluentialnessMax.Text = _mainOrganization.InfluencerTemplate.Cognitive.InternalCharacteristics .InfluentialnessRateMax.ToString(CultureInfo.InvariantCulture); CanSendBeliefs.Checked = _mainOrganization.InfluencerTemplate.Cognitive.MessageContent.CanSendBeliefs; #endregion #region Worker MandatoryRatio.Text = _mainOrganization.Murphies.IncompleteBelief.MandatoryRatio.ToString(CultureInfo.InvariantCulture); RiskAversion.Items.AddRange(GenericLevelService.GetNames()); RiskAversion.SelectedItem = GenericLevelService.GetName(_mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics .RiskAversionLevel); BeliefWeight.Items.AddRange(BeliefWeightLevelService.GetNames()); BeliefWeight.SelectedItem = BeliefWeightLevelService.GetName(_mainOrganization.Models.BeliefWeightLevel); InfluenceabilityMin.Text = _mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics .InfluenceabilityRateMin.ToString(CultureInfo.InvariantCulture); InfluenceabilityMax.Text = _mainOrganization.WorkerTemplate.Cognitive.InternalCharacteristics .InfluenceabilityRateMax.ToString(CultureInfo.InvariantCulture); CanReceiveBeliefs.Checked = _mainOrganization.WorkerTemplate.Cognitive.MessageContent.CanReceiveBeliefs; HasInitialBeliefs.Checked = _mainOrganization.WorkerTemplate.Cognitive.KnowledgeAndBeliefs.HasInitialBelief; #endregion }
private void LoadSettings() { DisplayButtons(); tbWorkers.Text = _mainOrganization.WorkersCount.ToString(CultureInfo.InvariantCulture); tbKnowledge.Text = _mainOrganization.KnowledgeCount.ToString(CultureInfo.InvariantCulture); cbMultipleBlockers.Checked = _mainOrganization.Murphies.MultipleBlockers; KnowledgeLevel.Items.AddRange(KnowledgeLevelService.GetNames()); KnowledgeLevel.SelectedItem = KnowledgeLevelService.GetName(_mainOrganization.KnowledgeLevel); BeliefsLevel.Items.AddRange(BeliefLevelService.GetNames()); BeliefsLevel.SelectedItem = BeliefLevelService.GetName(_mainOrganization.Templates.Human.Cognitive .KnowledgeAndBeliefs.DefaultBeliefLevel); EmailComm.Checked = true; #region unavaibility tbUnavailabilityThreshold.Text = _mainOrganization.Murphies.UnAvailability.RateOfUnavailability.ToString(CultureInfo.InvariantCulture); UnavailabilityRate.Text = _mainOrganization.Murphies.UnAvailability.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); #endregion #region incomplete knowledge murphy tbKnowledgeThreshHoldForDoing.Text = _mainOrganization.Murphies.IncompleteKnowledge.ThresholdForReacting.ToString(CultureInfo .InvariantCulture); tbLackRateOfIncorrectGuess.Text = _mainOrganization.Murphies.IncompleteKnowledge.RateOfIncorrectGuess.ToString(CultureInfo .InvariantCulture); tbLackRateOfAnswers.Text = _mainOrganization.Murphies.IncompleteKnowledge.RateOfAnswers.ToString(CultureInfo.InvariantCulture); tbLackResponseTime.Text = _mainOrganization.Murphies.IncompleteKnowledge.ResponseTime.ToString(CultureInfo.InvariantCulture); cbLimitNumberOfTriesKnowledge.Checked = _mainOrganization.Murphies.IncompleteKnowledge.LimitNumberOfTries != -1; tbMaxNumberOfTriesKnowledge.Text = _mainOrganization.Murphies.IncompleteKnowledge.LimitNumberOfTries.ToString( CultureInfo.InvariantCulture); tbLackDelayBeforeSearchingExternally.Text = _mainOrganization.Murphies.IncompleteKnowledge .DelayBeforeSearchingExternally.ToString(CultureInfo.InvariantCulture); tbRequiredMandatoryRatio.Text = _mainOrganization.Murphies.IncompleteKnowledge.MandatoryRatio.ToString(CultureInfo.InvariantCulture); KnowledgeRate.Text = _mainOrganization.Murphies.IncompleteKnowledge.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); EmailSearching.Checked = _mainOrganization.Models.Learning.On; #endregion #region incomplete belief murphy BeliefsRate.Text = _mainOrganization.Murphies.IncompleteBelief.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); tbBeliefRateIncorrectGuess.Text = _mainOrganization.Murphies.IncompleteBelief.RateOfIncorrectGuess .ToString(CultureInfo.InvariantCulture); tbBeliefRateAnswers.Text = _mainOrganization.Murphies.IncompleteBelief.RateOfAnswers.ToString(CultureInfo.InvariantCulture); tbBeliefResponseTime.Text = _mainOrganization.Murphies.IncompleteBelief.ResponseTime.ToString(CultureInfo.InvariantCulture); cbLimitNumberOfTriesBelief.Checked = _mainOrganization.Murphies.IncompleteBelief.LimitNumberOfTries != -1; tbMaxNumberOfTriesBelief.Text = _mainOrganization.Murphies.IncompleteBelief.LimitNumberOfTries.ToString(CultureInfo.InvariantCulture); BeliefsRiskAversion.Text = _mainOrganization.Murphies.IncompleteBelief.ThresholdForReacting .ToString(CultureInfo.InvariantCulture); #endregion #region incomplete information murphy InformationRateAgentsOn.Text = _mainOrganization.Murphies.IncompleteInformation.RateOfAgentsOn.ToString(CultureInfo.InvariantCulture); InformationRateOfIncorrectGuess.Text = _mainOrganization.Murphies.IncompleteInformation.RateOfIncorrectGuess.ToString(CultureInfo .InvariantCulture); InformationRateOfAnswer.Text = _mainOrganization.Murphies.IncompleteInformation.RateOfAnswers.ToString(CultureInfo.InvariantCulture); InformationResponseTime.Text = _mainOrganization.Murphies.IncompleteInformation.ResponseTime.ToString(CultureInfo.InvariantCulture); InformationLimitOfTries.Checked = _mainOrganization.Murphies.IncompleteInformation.LimitNumberOfTries != -1; InformationMaxOfTries.Text = _mainOrganization.Murphies.IncompleteInformation.LimitNumberOfTries.ToString(CultureInfo .InvariantCulture); InformationThreshold.Text = _mainOrganization.Murphies.IncompleteInformation.ThresholdForReacting.ToString(CultureInfo .InvariantCulture); #endregion foreach (ListViewItem item in lvMurphies.Items) { switch (item.Text) { case "Incomplete information": gbInformation.Visible = _mainOrganization.Murphies.IncompleteInformation.On; item.Checked = _mainOrganization.Murphies.IncompleteInformation.On; break; case "Changing Information": //item.Checked = murphies.ChangingInformation.On; break; case "Incorrectness information": //item.Checked = murphies.IncorrectInformation.On; break; case "Communication breakdowns": //item.Checked = murphies.CommunicationBreakDown.On; break; case "Agent unavailability": gbBelief.Visible = _mainOrganization.Murphies.UnAvailability.On; item.Checked = _mainOrganization.Murphies.UnAvailability.On; break; case "Incomplete knowledge": gbUncompleteKnowledge.Visible = _mainOrganization.Murphies.IncompleteKnowledge.On; item.Checked = _mainOrganization.Murphies.IncompleteKnowledge.On; break; case "Incomplete belief": gbBelief.Visible = _mainOrganization.Murphies.IncompleteBelief.On; item.Checked = _mainOrganization.Murphies.IncompleteBelief.On; break; } } }