public void setDataContext() { int index = ScoutLocalization.SR_STAFFCOLUMNDEPTH; contexts = new List <LabeledNumericMinMaxContext>(); for (int i = index; i < globalFuncs.localization.staffColumns.Count; ++i) { LabeledNumericMinMaxContext context = new LabeledNumericMinMaxContext(); setNumericMinMaxContext(ref context, globalFuncs.localization.staffColumns[i]); contexts.Add(context); } vm = new StaffSearchAttributesViewModel(); vm.tacticalattributes = new LabeledHeaderContext(); vm.mentalattributes = new LabeledHeaderContext(); vm.coachingattributes = new LabeledHeaderContext(); vm.nontacticalattributes = new LabeledHeaderContext(); vm.chairmanattributes = new LabeledHeaderContext(); setControlValues(); setLocalization(); this.DataContext = vm; }
public void setDataContext() { int index = ScoutLocalization.SR_PLAYERCOLUMNSCORNER; contexts = new List <LabeledNumericMinMaxContext>(); for (int i = index; i < globalFuncs.localization.playerColumns.Count; ++i) { LabeledNumericMinMaxContext context = new LabeledNumericMinMaxContext(); setNumericMinMaxContext(ref context); contexts.Add(context); } vm = new PlayerSearchAttributesViewModel(); vm.technicalattributes = new LabeledHeaderContext(); vm.physicalattributes = new LabeledHeaderContext(); vm.mentalattributes = new LabeledHeaderContext(); vm.hiddenattributes = new LabeledHeaderContext(); vm.goalkeepingattributes = new LabeledHeaderContext(); vm.mentaltraitsattributes = new LabeledHeaderContext(); setControlValues(); setLocalization(); this.DataContext = vm; }
private void setNumericMinMaxContext(ref LabeledNumericMinMaxContext num) { num.LabelWidth = 110; num.LabelHeight = 20; num.Minimum = 0; num.Maximum = 20; num.NumericUpDownMinMaxHeight = 16; num.NumericUpDownMinMaxWidth = 50; }
public void setControlValues() { for (int i = 0; i < contexts.Count; ++i) { LabeledNumericMinMaxContext context = contexts[i]; setNumericMinMaxControlValue(ref context); } setNumericUpDownMixMaxControlValue(ref this.corners); setNumericUpDownMixMaxControlValue(ref this.crossing); setNumericUpDownMixMaxControlValue(ref this.dribbling); setNumericUpDownMixMaxControlValue(ref this.finishing); setNumericUpDownMixMaxControlValue(ref this.firsttouch); setNumericUpDownMixMaxControlValue(ref this.freekicks); setNumericUpDownMixMaxControlValue(ref this.heading); setNumericUpDownMixMaxControlValue(ref this.longshots); setNumericUpDownMixMaxControlValue(ref this.longthrows); setNumericUpDownMixMaxControlValue(ref this.marking); setNumericUpDownMixMaxControlValue(ref this.passing); setNumericUpDownMixMaxControlValue(ref this.penaltytaking); setNumericUpDownMixMaxControlValue(ref this.tackling); setNumericUpDownMixMaxControlValue(ref this.technique); setNumericUpDownMixMaxControlValue(ref this.acceleration); setNumericUpDownMixMaxControlValue(ref this.agility); setNumericUpDownMixMaxControlValue(ref this.balance); setNumericUpDownMixMaxControlValue(ref this.jumping); setNumericUpDownMixMaxControlValue(ref this.naturalfitness); setNumericUpDownMixMaxControlValue(ref this.pace); setNumericUpDownMixMaxControlValue(ref this.stamina); setNumericUpDownMixMaxControlValue(ref this.strength); setNumericUpDownMixMaxControlValue(ref this.leftfoot); setNumericUpDownMixMaxControlValue(ref this.rightfoot); setNumericUpDownMixMaxControlValue(ref this.aggression); setNumericUpDownMixMaxControlValue(ref this.anticipation); setNumericUpDownMixMaxControlValue(ref this.bravery); setNumericUpDownMixMaxControlValue(ref this.composure); setNumericUpDownMixMaxControlValue(ref this.concentration); setNumericUpDownMixMaxControlValue(ref this.creativity); setNumericUpDownMixMaxControlValue(ref this.decisions); setNumericUpDownMixMaxControlValue(ref this.determination); setNumericUpDownMixMaxControlValue(ref this.flair); setNumericUpDownMixMaxControlValue(ref this.influence); setNumericUpDownMixMaxControlValue(ref this.offtheball); setNumericUpDownMixMaxControlValue(ref this.positioning); setNumericUpDownMixMaxControlValue(ref this.teamwork); setNumericUpDownMixMaxControlValue(ref this.workrate); setNumericUpDownMixMaxControlValue(ref this.consistency); setNumericUpDownMixMaxControlValue(ref this.dirtyness); setNumericUpDownMixMaxControlValue(ref this.importantmatches); setNumericUpDownMixMaxControlValue(ref this.injuryproneness); setNumericUpDownMixMaxControlValue(ref this.versatility); setNumericUpDownMixMaxControlValue(ref this.aerialability); setNumericUpDownMixMaxControlValue(ref this.commandofarea); setNumericUpDownMixMaxControlValue(ref this.communication); setNumericUpDownMixMaxControlValue(ref this.eccentricity); setNumericUpDownMixMaxControlValue(ref this.handling); setNumericUpDownMixMaxControlValue(ref this.kicking); setNumericUpDownMixMaxControlValue(ref this.oneonones); setNumericUpDownMixMaxControlValue(ref this.reflexes); setNumericUpDownMixMaxControlValue(ref this.rushingout); setNumericUpDownMixMaxControlValue(ref this.tendencytopunch); setNumericUpDownMixMaxControlValue(ref this.throwing); setNumericUpDownMixMaxControlValue(ref this.adaptability); setNumericUpDownMixMaxControlValue(ref this.ambition); setNumericUpDownMixMaxControlValue(ref this.controversy); setNumericUpDownMixMaxControlValue(ref this.loyalty); setNumericUpDownMixMaxControlValue(ref this.pressure); setNumericUpDownMixMaxControlValue(ref this.professionalism); setNumericUpDownMixMaxControlValue(ref this.sportsmanship); setNumericUpDownMixMaxControlValue(ref this.temperament); int index = -1; vm.corners = contexts[++index]; vm.crossing = contexts[++index]; vm.dribbling = contexts[++index]; vm.finishing = contexts[++index]; vm.firsttouch = contexts[++index]; vm.freekicks = contexts[++index]; vm.heading = contexts[++index]; vm.longshots = contexts[++index]; vm.longthrows = contexts[++index]; vm.marking = contexts[++index]; vm.passing = contexts[++index]; vm.penaltytaking = contexts[++index]; vm.tackling = contexts[++index]; vm.technique = contexts[++index]; vm.acceleration = contexts[++index]; vm.agility = contexts[++index]; vm.balance = contexts[++index]; vm.jumping = contexts[++index]; vm.naturalfitness = contexts[++index]; vm.pace = contexts[++index]; vm.stamina = contexts[++index]; vm.strength = contexts[++index]; vm.leftfoot = contexts[++index]; vm.rightfoot = contexts[++index]; vm.aggression = contexts[++index]; vm.anticipation = contexts[++index]; vm.bravery = contexts[++index]; vm.composure = contexts[++index]; vm.concentration = contexts[++index]; vm.creativity = contexts[++index]; vm.decisions = contexts[++index]; vm.determination = contexts[++index]; vm.flair = contexts[++index]; vm.influence = contexts[++index]; vm.offtheball = contexts[++index]; vm.positioning = contexts[++index]; vm.teamwork = contexts[++index]; vm.workrate = contexts[++index]; vm.consistency = contexts[++index]; vm.dirtyness = contexts[++index]; vm.importantmatches = contexts[++index]; vm.injuryproneness = contexts[++index]; vm.versatility = contexts[++index]; vm.aerialability = contexts[++index]; vm.commandofarea = contexts[++index]; vm.communication = contexts[++index]; vm.eccentricity = contexts[++index]; vm.handling = contexts[++index]; vm.kicking = contexts[++index]; vm.oneonones = contexts[++index]; vm.reflexes = contexts[++index]; vm.rushingout = contexts[++index]; vm.tendencytopunch = contexts[++index]; vm.throwing = contexts[++index]; vm.adaptability = contexts[++index]; vm.ambition = contexts[++index]; vm.controversy = contexts[++index]; vm.loyalty = contexts[++index]; vm.pressure = contexts[++index]; vm.professionalism = contexts[++index]; vm.sportsmanship = contexts[++index]; vm.temperament = contexts[++index]; }
private void setNumericMinMaxControlValue(ref LabeledNumericMinMaxContext num) { num.ValueMin = 0; num.ValueMax = 20; }
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; }
public void setDataContext() { TeamSearchTabItemViewModel vm = new TeamSearchTabItemViewModel(); LabeledTextBoxContext name = new LabeledTextBoxContext(); name.LabelContent = "Name"; name.LabelWidth = 70; name.TextBoxText = "name"; name.TextBoxWidth = 110; LabeledTextBoxContext nation = new LabeledTextBoxContext(); nation.LabelContent = "Nation"; nation.LabelWidth = 70; nation.TextBoxText = "nation"; nation.TextBoxWidth = 110; LabeledTextBoxContext stadium = new LabeledTextBoxContext(); stadium.LabelContent = "Stadium"; stadium.LabelWidth = 70; stadium.TextBoxText = "stadium"; stadium.TextBoxWidth = 110; LabeledComboBoxContext teamType = new LabeledComboBoxContext(); teamType.LabelContent = "Team Type"; teamType.LabelWidth = 70; teamType.ComboBoxWidth = 100; teamType.ComboBoxItems = Globals.teamTypes; LabeledComboBoxContext reputation = new LabeledComboBoxContext(); reputation.LabelContent = "Reputation"; reputation.LabelWidth = 70; reputation.ComboBoxWidth = 100; reputation.ComboBoxItems = Globals.reputations; LabeledComboBoxContext region = new LabeledComboBoxContext(); region.LabelContent = "Region"; region.LabelWidth = 70; region.ComboBoxWidth = 100; region.ComboBoxItems = Globals.regions; LabeledNumericMinMaxContext transferBudget = new LabeledNumericMinMaxContext(); transferBudget.LabelContent = "Transfer Budget"; transferBudget.LabelWidth = 100; transferBudget.ValueMax = 200000000; transferBudget.Maximum = 200000000; transferBudget.NumericUpDownMinMaxWidth = 86; LabeledNumericMinMaxContext wageBudget = new LabeledNumericMinMaxContext(); wageBudget.LabelContent = "Wage Budget"; wageBudget.LabelWidth = 100; wageBudget.ValueMax = 200000000; wageBudget.Maximum = 200000000; wageBudget.NumericUpDownMinMaxWidth = 86; vm.name = name; vm.nation = nation; vm.stadium = stadium; vm.teamType = teamType; vm.reputation = reputation; vm.region = region; vm.transferBudget = transferBudget; vm.wageBudget = wageBudget; this.DataContext = vm; }
public void setControlValues() { for (int i = 0; i < contexts.Count; ++i) { LabeledNumericMinMaxContext context = contexts[i]; setNumericMinMaxControlValue(ref context); } setNumericUpDownMixMaxControlValue(ref this.depth); setNumericUpDownMixMaxControlValue(ref this.directness); setNumericUpDownMixMaxControlValue(ref this.flamboyancy); setNumericUpDownMixMaxControlValue(ref this.flexibility); setNumericUpDownMixMaxControlValue(ref this.freeroles); setNumericUpDownMixMaxControlValue(ref this.marking); setNumericUpDownMixMaxControlValue(ref this.offside); setNumericUpDownMixMaxControlValue(ref this.pressing); setNumericUpDownMixMaxControlValue(ref this.sittingback); setNumericUpDownMixMaxControlValue(ref this.tempo); setNumericUpDownMixMaxControlValue(ref this.useofplaymaker); setNumericUpDownMixMaxControlValue(ref this.useofsubstitutions); setNumericUpDownMixMaxControlValue(ref this.width); setNumericUpDownMixMaxControlValue(ref this.adaptability); setNumericUpDownMixMaxControlValue(ref this.ambition); setNumericUpDownMixMaxControlValue(ref this.controversy); setNumericUpDownMixMaxControlValue(ref this.determination); setNumericUpDownMixMaxControlValue(ref this.loyalty); setNumericUpDownMixMaxControlValue(ref this.pressure); setNumericUpDownMixMaxControlValue(ref this.professionalism); setNumericUpDownMixMaxControlValue(ref this.sportsmanship); //setNumericUpDownMixMaxControlValue(ref this.temperament); setNumericUpDownMixMaxControlValue(ref this.judgingplayerability); setNumericUpDownMixMaxControlValue(ref this.judgingplayerpotential); setNumericUpDownMixMaxControlValue(ref this.levelofdiscipline); setNumericUpDownMixMaxControlValue(ref this.motivating); setNumericUpDownMixMaxControlValue(ref this.physiotherapy); setNumericUpDownMixMaxControlValue(ref this.tacticalknowledge); setNumericUpDownMixMaxControlValue(ref this.attacking); setNumericUpDownMixMaxControlValue(ref this.defending); setNumericUpDownMixMaxControlValue(ref this.fitness); setNumericUpDownMixMaxControlValue(ref this.goalkeepers); setNumericUpDownMixMaxControlValue(ref this.mental); setNumericUpDownMixMaxControlValue(ref this.player); setNumericUpDownMixMaxControlValue(ref this.tactical); setNumericUpDownMixMaxControlValue(ref this.technical); setNumericUpDownMixMaxControlValue(ref this.manmanagement); setNumericUpDownMixMaxControlValue(ref this.workingwithyoungsters); setNumericUpDownMixMaxControlValue(ref this.buyingplayers); setNumericUpDownMixMaxControlValue(ref this.hardnessoftraining); setNumericUpDownMixMaxControlValue(ref this.mindgames); setNumericUpDownMixMaxControlValue(ref this.squadrotation); setNumericUpDownMixMaxControlValue(ref this.business); setNumericUpDownMixMaxControlValue(ref this.intereference); setNumericUpDownMixMaxControlValue(ref this.patience); setNumericUpDownMixMaxControlValue(ref this.resources); int index = -1; vm.depth = contexts[++index]; vm.directness = contexts[++index]; vm.flamboyancy = contexts[++index]; vm.flexibility = contexts[++index]; vm.freeroles = contexts[++index]; vm.marking = contexts[++index]; vm.offside = contexts[++index]; vm.pressing = contexts[++index]; vm.sittingback = contexts[++index]; vm.tempo = contexts[++index]; vm.useofplaymaker = contexts[++index]; vm.useofsubstitutions = contexts[++index]; vm.width = contexts[++index]; vm.adaptability = contexts[++index]; vm.ambition = contexts[++index]; vm.controversy = contexts[++index]; vm.determination = contexts[++index]; vm.loyalty = contexts[++index]; vm.pressure = contexts[++index]; vm.professionalism = contexts[++index]; vm.sportsmanship = contexts[++index]; //vm.temperament = contexts[++index]; vm.judgingplayerability = contexts[++index]; vm.judgingplayerpotential = contexts[++index]; vm.levelofdiscipline = contexts[++index]; vm.motivating = contexts[++index]; vm.physiotherapy = contexts[++index]; vm.tacticalknowledge = contexts[++index]; vm.attacking = contexts[++index]; vm.defending = contexts[++index]; vm.fitness = contexts[++index]; vm.goalkeepers = contexts[++index]; vm.mental = contexts[++index]; vm.player = contexts[++index]; vm.tactical = contexts[++index]; vm.technical = contexts[++index]; vm.manmanagement = contexts[++index]; vm.workingwithyoungsters = contexts[++index]; vm.buyingplayers = contexts[++index]; vm.hardnessoftraining = contexts[++index]; vm.mindgames = contexts[++index]; vm.squadrotation = contexts[++index]; vm.business = contexts[++index]; vm.intereference = contexts[++index]; vm.patience = contexts[++index]; vm.resources = contexts[++index]; }