public void setNumericsContext(ref LabeledNumericContext numeric) { numeric.LabelWidth = 140; numeric.NumericValue = 0; numeric.Minimum = 0; numeric.NumericUpDownWidth = 56; }
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; }