public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; ObservableCollection <String> GeneralSearchLabels = globalFuncs.localization.GeneralSearchLabels; int index = -1; vm.groupboxsearch.Header = GeneralSearchLabels[++index]; vm.groupboxresults.Header = GeneralSearchLabels[++index]; vm.customizecolumns.Header = GeneralSearchLabels[++index]; ObservableCollection <string> searchLabels = globalFuncs.localization.TeamSearchLabels; index = -1; vm.name.LabelContent = searchLabels[++index]; vm.name.TextBoxInfoText = searchLabels[++index]; vm.nation.LabelContent = searchLabels[++index]; vm.nation.TextBoxInfoText = searchLabels[++index]; vm.stadium.LabelContent = searchLabels[++index]; vm.stadium.TextBoxInfoText = searchLabels[++index]; vm.teamtype.LabelContent = searchLabels[++index]; vm.reputation.LabelContent = searchLabels[++index]; vm.region.LabelContent = searchLabels[++index]; vm.transferBudget.LabelContent = searchLabels[++index]; vm.wageBudget.LabelContent = searchLabels[++index]; vm.search.TextBlockText = globalFuncs.localization.SearchingResults[ScoutLocalization.SR_SEARCH]; vm.wonder.TextBlockText = globalFuncs.localization.SearchingResults[ScoutLocalization.SR_WONDERTEAMS]; for (int i = 0; i < this.dataGrid.Columns.Count; ++i) { this.dataGrid.Columns[i].Header = globalFuncs.localization.teamColumns[i]; } }
public void setSettings() { ScoutLocalization localization = globalFuncs.localization; PreferencesSettings curSettings = settings.curPreferencesSettings; settings.settingSettings = false; vm.setting.ComboBoxSelectedIndex = globalFuncs.getElementIndex(ref settings.settingNames, curSettings.name); generalTabItemViewModel.currency.ComboBoxSelectedIndex = globalFuncs.localization.currenciesNative.IndexOf(curSettings.currency); generalTabItemViewModel.wage.ComboBoxSelectedIndex = globalFuncs.localization.wagesNative.IndexOf(curSettings.wage); generalTabItemViewModel.height.ComboBoxSelectedIndex = globalFuncs.localization.heightsNative.IndexOf(curSettings.height); generalTabItemViewModel.weight.ComboBoxSelectedIndex = globalFuncs.localization.weightsNative.IndexOf(curSettings.weight); generalTabItemViewModel.allowEditing.ComboBoxSelectedIndex = globalFuncs.localization.editing.IndexOf(curSettings.editing); generalTabItemViewModel.language.ComboBoxSelectedIndex = globalFuncs.languages.IndexOf(curSettings.language); generalTabItemViewModel.theme.ComboBoxSelectedIndex = globalFuncs.themes.IndexOf(curSettings.theme); generalTabItemViewModel.wonderkidsMaxAge.NumericValue = curSettings.wonderkidsMaxAge; generalTabItemViewModel.wonderkidsMinPA.NumericValue = curSettings.wonderkidsMinPA; generalTabItemViewModel.wonderstaffMinPA.NumericValue = curSettings.wonderstaffMinPA; generalTabItemViewModel.wonderteamsMinRep.NumericValue = curSettings.wonderteamsMinRep; //this.GeneralTabItem.wonderkidsMaxAge.NumericUpDown.Value = curSettings.wonderkidsMaxAge; //this.GeneralTabItem.wonderkidsMinPA.NumericUpDown.Value = curSettings.wonderkidsMinPA; //this.GeneralTabItem.wonderstaffMinPA.NumericUpDown.Value = curSettings.wonderstaffMinPA; //this.GeneralTabItem.wonderteamsMinRep.NumericUpDown.Value = curSettings.wonderteamsMinRep; this.PlayerColumnsTabItem.ButtonColumnsDefault_Click(null, null); this.StaffColumnsTabItem.ButtonColumnsDefault_Click(null, null); this.TeamColumnsTabItem.ButtonColumnsDefault_Click(null, null); this.ShortlistColumnsTabItem.ButtonColumnsDefault_Click(null, null); settings.settingSettings = true; }
public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; ObservableCollection <String> WindowPreferencesLabels = globalFuncs.localization.WindowPreferencesLabels; int index = -1; vm.header.Header = WindowPreferencesLabels[++index]; vm.setting.LabelContent = WindowPreferencesLabels[++index]; vm.general.Header = WindowPreferencesLabels[++index]; vm.player.Header = WindowPreferencesLabels[++index]; vm.staff.Header = WindowPreferencesLabels[++index]; vm.team.Header = WindowPreferencesLabels[++index]; vm.shortlist.Header = WindowPreferencesLabels[++index]; vm.playercolumnsettings.Header = WindowPreferencesLabels[++index]; vm.staffcolumnsettings.Header = WindowPreferencesLabels[++index]; vm.teamcolumnsettings.Header = WindowPreferencesLabels[++index]; vm.shortlistcolumnsettings.Header = WindowPreferencesLabels[++index]; vm.selectedallcolumns.Header = WindowPreferencesLabels[++index]; vm.clearcolumns.Header = WindowPreferencesLabels[++index]; vm.defcolumns.Header = WindowPreferencesLabels[++index]; vm.ok.TextBlockText = WindowPreferencesLabels[++index]; vm.cancel.TextBlockText = WindowPreferencesLabels[++index]; vm.buttonWarningTooltip.Header = WindowPreferencesLabels[++index] + Environment.NewLine + WindowPreferencesLabels[++index]; vm.buttonSaveTooltip.Header = WindowPreferencesLabels[++index]; vm.buttonDeleteTooltip.Header = WindowPreferencesLabels[++index]; vm.buttonSetDefaultTooltip.Header = WindowPreferencesLabels[++index]; vm.buttonUseChangesTooltip.Header = WindowPreferencesLabels[++index]; vm.buttonCancelChangesTooltip.Header = WindowPreferencesLabels[++index]; }
public void setLocalization() { PreferencesSettings s = GlobalSettings.getSettings().curPreferencesSettings; ScoutLocalization localization = globalFuncs.localization; ObservableCollection <string> WindowInfoLabels = globalFuncs.localization.WindowInfoLabels; int index = -1; vm.header.Header = WindowInfoLabels[++index]; vm.gamesettings.Header = WindowInfoLabels[++index]; vm.gamestatus.Header = WindowInfoLabels[++index]; vm.gamestatusinfo.Header = WindowInfoLabels[++index]; vm.gameversion.Header = WindowInfoLabels[++index]; vm.players.Header = WindowInfoLabels[++index]; vm.staff.Header = WindowInfoLabels[++index]; vm.teams.Header = WindowInfoLabels[++index]; vm.scoutsettings.Header = WindowInfoLabels[++index]; vm.settings.Header = WindowInfoLabels[++index]; vm.settingsinfo.Header = s.name; vm.language.Header = WindowInfoLabels[++index]; vm.languageinfo.Header = s.language; vm.theme.Header = WindowInfoLabels[++index]; vm.themeinfo.Header = s.theme; vm.currency.Header = WindowInfoLabels[++index]; vm.currencyinfo.Header = localization.currencies[localization.currenciesNative.IndexOf(s.currency)]; vm.wage.Header = WindowInfoLabels[++index]; vm.wageinfo.Header = localization.wages[localization.wagesNative.IndexOf(s.wage)]; vm.heightdistance.Header = WindowInfoLabels[++index]; vm.heightdistanceinfo.Header = localization.heights[localization.heightsNative.IndexOf(s.height)]; vm.weight.Header = WindowInfoLabels[++index]; vm.weightinfo.Header = localization.weights[localization.weightsNative.IndexOf(s.weight)]; vm.editorsettings.Header = WindowInfoLabels[++index]; vm.editing.Header = WindowInfoLabels[++index]; vm.editinginfo.Header = localization.YesNo[localization.editing.IndexOf(s.editing)]; }
public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; int index = -1; vm.tacticalattributes.Header = localization.staffSearchAttributesGroupBoxes[++index]; vm.mentalattributes.Header = localization.staffSearchAttributesGroupBoxes[++index]; vm.coachingattributes.Header = localization.staffSearchAttributesGroupBoxes[++index]; vm.nontacticalattributes.Header = localization.staffSearchAttributesGroupBoxes[++index]; vm.chairmanattributes.Header = localization.staffSearchAttributesGroupBoxes[++index]; }
public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; ObservableCollection <String> GeneralSearchLabels = globalFuncs.localization.GeneralSearchLabels; int index = -1; vm.groupboxsearch.Header = GeneralSearchLabels[++index]; vm.groupboxresults.Header = GeneralSearchLabels[++index]; vm.customizecolumns.Header = GeneralSearchLabels[++index]; for (int i = 0; i < this.dataGrid.Columns.Count; ++i) { this.dataGrid.Columns[i].Header = globalFuncs.localization.shortlistColumns[i]; } }
public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; ObservableCollection <string> WindowGeneralLabels = localization.WindowGeneralLabels; int index = -1; vm.generalsettings.Header = WindowGeneralLabels[++index]; vm.currency.LabelContent = WindowGeneralLabels[++index]; vm.wage.LabelContent = WindowGeneralLabels[++index]; vm.height.LabelContent = WindowGeneralLabels[++index]; vm.weight.LabelContent = WindowGeneralLabels[++index]; vm.allowEditing.LabelContent = WindowGeneralLabels[++index]; vm.language.LabelContent = WindowGeneralLabels[++index]; vm.theme.LabelContent = WindowGeneralLabels[++index]; vm.wonderkidsMaxAge.LabelContent = WindowGeneralLabels[++index]; vm.wonderkidsMinPA.LabelContent = WindowGeneralLabels[++index]; vm.wonderstaffMinPA.LabelContent = WindowGeneralLabels[++index]; vm.wonderteamsMinRep.LabelContent = WindowGeneralLabels[++index]; }
public void setLocalization() { int index = ScoutLocalization.SR_PLAYERCOLUMNSCORNER; int counter = -1; for (int i = index; i < globalFuncs.localization.playerColumns.Count; ++i) { contexts[++counter].LabelContent = globalFuncs.localization.playerColumns[i]; } ScoutLocalization localization = globalFuncs.localization; ObservableCollection <String> playerSearchAttributesGroupBoxes = localization.playerSearchAttributesGroupBoxes; index = -1; vm.technicalattributes.Header = playerSearchAttributesGroupBoxes[++index]; vm.physicalattributes.Header = playerSearchAttributesGroupBoxes[++index]; vm.mentalattributes.Header = playerSearchAttributesGroupBoxes[++index]; vm.hiddenattributes.Header = playerSearchAttributesGroupBoxes[++index]; vm.goalkeepingattributes.Header = playerSearchAttributesGroupBoxes[++index]; vm.mentaltraitsattributes.Header = playerSearchAttributesGroupBoxes[++index]; }
public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; ObservableCollection <String> teamGroupBoxes = localization.teamGroupBoxes; int index = -1; this.generaldetails.Header = teamGroupBoxes[++index]; this.financedetails.Header = teamGroupBoxes[++index]; this.stadiumdetails.Header = teamGroupBoxes[++index]; ObservableCollection <String> TeamProfileLabels = localization.TeamProfileLabels; index = -1; this.yearfounded.LabelContent = TeamProfileLabels[++index]; this.national.LabelContent = TeamProfileLabels[++index]; this.status.LabelContent = TeamProfileLabels[++index]; this.maxafclubs.LabelContent = TeamProfileLabels[++index]; this.afclubs.LabelContent = TeamProfileLabels[++index]; this.trainingfacilities.LabelContent = TeamProfileLabels[++index]; this.youthfacilities.LabelContent = TeamProfileLabels[++index]; this.youthacademy.LabelContent = TeamProfileLabels[++index]; this.maxattendance.LabelContent = TeamProfileLabels[++index]; this.averageattendance.LabelContent = TeamProfileLabels[++index]; this.minattendance.LabelContent = TeamProfileLabels[++index]; this.reputation.LabelContent = TeamProfileLabels[++index]; this.totaltransfer.LabelContent = TeamProfileLabels[++index]; this.remtransfer.LabelContent = TeamProfileLabels[++index]; this.balance.LabelContent = TeamProfileLabels[++index]; this.totalwage.LabelContent = TeamProfileLabels[++index]; this.usedwage.LabelContent = TeamProfileLabels[++index]; this.revenueavailable.LabelContent = TeamProfileLabels[++index]; this.decay.LabelContent = TeamProfileLabels[++index]; this.fieldwidth.LabelContent = TeamProfileLabels[++index]; this.fieldlength.LabelContent = TeamProfileLabels[++index]; this.curcapacity.LabelContent = TeamProfileLabels[++index]; this.seatcapacity.LabelContent = TeamProfileLabels[++index]; this.expcapacity.LabelContent = TeamProfileLabels[++index]; this.usedcapacity.LabelContent = TeamProfileLabels[++index]; }
public void setLocalization() { ScoutLocalization localization = globalFuncs.localization; ObservableCollection <String> staffSearchAttributesGroupBoxes = localization.staffSearchAttributesGroupBoxes; int index = -1; this.tacticalattributes.Header = staffSearchAttributesGroupBoxes[++index]; this.mentalattributes.Header = staffSearchAttributesGroupBoxes[++index]; this.coachingattributes.Header = staffSearchAttributesGroupBoxes[++index]; this.nontacticalattributes.Header = staffSearchAttributesGroupBoxes[++index]; this.chairmanattributes.Header = staffSearchAttributesGroupBoxes[++index]; this.personaldetails.Header = staffSearchAttributesGroupBoxes[++index]; this.contractdetails.Header = staffSearchAttributesGroupBoxes[++index]; this.ratings.Header = staffSearchAttributesGroupBoxes[++index]; index = ScoutLocalization.SR_STAFFCOLUMNDEPTH; int counter = -1; for (int i = index; i < globalFuncs.localization.staffColumns.Count; ++i) { contexts[++counter].LabelContent = globalFuncs.localization.staffColumns[i]; } ObservableCollection <String> StaffProfileLabels = localization.StaffProfileLabels; index = -1; this.contractstarted.LabelContent = StaffProfileLabels[++index]; this.contractexpiring.LabelContent = StaffProfileLabels[++index]; this.wage.LabelContent = StaffProfileLabels[++index]; for (int i = 0; i < contextsratings.Count; ++i) { contextsratings[i].LabelContent = globalFuncs.localization.bestcrs[i + 1]; } }
public void setDataContext() { Settings s = GlobalSettings.getSettings(); LabeledComboBoxContext currency = new LabeledComboBoxContext(); setSettingsComboContext(ref currency); LabeledComboBoxContext wage = new LabeledComboBoxContext(); setSettingsComboContext(ref wage); LabeledComboBoxContext height = new LabeledComboBoxContext(); setSettingsComboContext(ref height); LabeledComboBoxContext weight = new LabeledComboBoxContext(); setSettingsComboContext(ref weight); LabeledComboBoxContext allowEditing = new LabeledComboBoxContext(); setSettingsComboContext(ref allowEditing); LabeledComboBoxContext language = new LabeledComboBoxContext(); setSettingsComboContext(ref language); LabeledComboBoxContext theme = new LabeledComboBoxContext(); setSettingsComboContext(ref theme); LabeledNumericContext wonderkidsMaxAge = new LabeledNumericContext(); setNumericsContext(ref wonderkidsMaxAge); wonderkidsMaxAge.Maximum = 200; LabeledNumericContext wonderkidsMinPA = new LabeledNumericContext(); setNumericsContext(ref wonderkidsMinPA); LabeledNumericContext wonderstaffMinPA = new LabeledNumericContext(); wonderkidsMinPA.Maximum = 200; setNumericsContext(ref wonderstaffMinPA); wonderstaffMinPA.Maximum = 200; LabeledNumericContext wonderteamsMinRep = new LabeledNumericContext(); setNumericsContext(ref wonderteamsMinRep); wonderteamsMinRep.Maximum = 10000; vm = new GeneralTabItemViewModel(); vm.generalsettings = new LabeledHeaderContext(); vm.currency = currency; vm.wage = wage; vm.height = height; vm.weight = weight; vm.allowEditing = allowEditing; vm.language = language; vm.theme = theme; vm.wonderkidsMaxAge = wonderkidsMaxAge; vm.wonderkidsMinPA = wonderkidsMinPA; vm.wonderstaffMinPA = wonderstaffMinPA; vm.wonderteamsMinRep = wonderteamsMinRep; ScoutLocalization localization = globalFuncs.localization; vm.currency.ComboBoxItems = localization.currencies; vm.wage.ComboBoxItems = localization.wages; vm.height.ComboBoxItems = localization.heights; vm.weight.ComboBoxItems = localization.weights; vm.allowEditing.ComboBoxItems = localization.YesNo; vm.language.ComboBoxItems = globalFuncs.languages; vm.theme.ComboBoxItems = globalFuncs.themes; setControlValues(); setLocalization(); this.DataContext = vm; }
public void setDataContext() { LabeledTextBoxContext name = new LabeledTextBoxContext(); LabeledTextBoxContext nation = new LabeledTextBoxContext(); LabeledTextBoxContext stadium = new LabeledTextBoxContext(); LabeledComboBoxContext teamtype = new LabeledComboBoxContext(); LabeledComboBoxContext reputation = new LabeledComboBoxContext(); LabeledComboBoxContext region = new LabeledComboBoxContext(); LabeledNumericMinMaxContext transferBudget = new LabeledNumericMinMaxContext(); LabeledNumericMinMaxContext wageBudget = new LabeledNumericMinMaxContext(); ImageTextButtonContext search = new ImageTextButtonContext(); ImageTextButtonContext wonder = new ImageTextButtonContext(); name.LabelWidth = 60; name.TextBoxWidth = 110; nation.LabelWidth = 60; nation.TextBoxWidth = 110; stadium.LabelWidth = 60; stadium.TextBoxWidth = 110; teamtype.LabelWidth = 70; teamtype.ComboBoxWidth = 100; reputation.LabelWidth = 70; reputation.ComboBoxWidth = 100; region.LabelWidth = 70; region.ComboBoxWidth = 100; transferBudget.LabelWidth = 100; transferBudget.NumericUpDownMinMaxWidth = 82; transferBudget.Maximum = 200000000; wageBudget.LabelWidth = 100; wageBudget.Maximum = 200000000; wageBudget.NumericUpDownMinMaxWidth = 82; search.ImageSource = TryFindResource("search") as ImageSource; search.ImageStretch = Stretch.Uniform; search.ImageHeight = 12; search.ImageWidth = 12; search.ImageMargin = new Thickness(0, 2, 0, 0); wonder.ImageSource = TryFindResource("awards") as ImageSource; wonder.ImageStretch = Stretch.Uniform; wonder.ImageHeight = 16; wonder.ImageWidth = 16; ScoutLocalization localization = globalFuncs.localization; teamtype.ComboBoxItems = localization.teamtypes; region.ComboBoxItems = localization.regions; reputation.ComboBoxItems = localization.reputations; vm = new TeamSearchTabItemViewModel(); vm.name = name; vm.nation = nation; vm.stadium = stadium; vm.teamtype = teamtype; vm.reputation = reputation; vm.region = region; vm.transferBudget = transferBudget; vm.wageBudget = wageBudget; vm.search = search; vm.wonder = wonder; vm.groupboxsearch = new LabeledHeaderContext(); vm.groupboxresults = new LabeledHeaderContext(); vm.customizecolumns = new LabeledHeaderContext(); vm.results = new TextBlockContext(); setControlValues(); setLocalization(); this.DataContext = vm; }