예제 #1
0
 protected virtual void setProfileContext(LabeledTextBoxContext num)
 {
     num.LabelWidth    = 110;
     num.LabelHeight   = 22;
     num.TextBoxWidth  = 110;
     num.TextBoxHeight = 22;
 }
예제 #2
0
 protected virtual void setAttributeContext(LabeledTextBoxContext num)
 {
     num.LabelWidth       = 100;
     num.LabelHeight      = 19;
     num.TextBoxWidth     = 38;
     num.TextBoxHeight    = 19;
     num.TextBoxAlignment = HorizontalAlignment.Center;
 }
예제 #3
0
 protected void setProfileContext3(LabeledTextBoxContext num)
 {
     num.LabelWidth       = 120;
     num.LabelHeight      = 19;
     num.TextBoxWidth     = 60;
     num.TextBoxHeight    = 19;
     num.TextBoxAlignment = HorizontalAlignment.Center;
 }
예제 #4
0
 protected override void setProfileContext(LabeledTextBoxContext num)
 {
     num.LabelWidth       = 110;
     num.LabelHeight      = 19;
     num.TextBoxWidth     = 80;
     num.TextBoxHeight    = 19;
     num.TextBoxAlignment = HorizontalAlignment.Center;
 }
예제 #5
0
 protected override void setAttributeContext(ref LabeledTextBoxContext num)
 {
     num.LabelWidth       = 130;
     num.LabelHeight      = 19;
     num.TextBoxWidth     = 38;
     num.TextBoxHeight    = 19;
     num.TextBoxAlignment = HorizontalAlignment.Center;
 }
예제 #6
0
        public void setProfileViewModel(ref Staff staff, ref StaffGridViewModel r)
        {
            settings    = GlobalSettings.getSettings();
            context     = ScoutContext.getScoutContext();
            globalFuncs = Globals.getGlobalFuncs();

            this.SelectionButton           = new CheckBoxContext();
            this.SelectionButton.IsChecked = true;

            int index = ScoutLocalization.SR_STAFFCOLUMNDEPTH;

            contexts = new List <LabeledTextBoxContext>();
            for (int i = index; i < globalFuncs.localization.staffColumns.Count; ++i)
            {
                LabeledTextBoxContext _context = new LabeledTextBoxContext();
                setAttributeContext(ref _context);
                contexts.Add(_context);
            }

            contextsratings = new List <LabeledImageContext>();
            for (int i = 1; i < globalFuncs.localization.bestcrs.Count; ++i)
            {
                LabeledImageContext _context = new LabeledImageContext();
                contextsratings.Add(_context);
            }

            contractstarted  = new LabeledTextBoxContext();
            contractexpiring = new LabeledTextBoxContext();
            wage             = new LabeledTextBoxContext();

            this.tacticalattributes    = new LabeledHeaderContext();
            this.mentalattributes      = new LabeledHeaderContext();
            this.coachingattributes    = new LabeledHeaderContext();
            this.nontacticalattributes = new LabeledHeaderContext();
            this.chairmanattributes    = new LabeledHeaderContext();
            this.personaldetails       = new LabeledHeaderContext();
            this.contractdetails       = new LabeledHeaderContext();
            this.ratings = new LabeledHeaderContext();

            setProfileContext(contractstarted);
            setProfileContext(contractexpiring);
            setProfileContext(wage);

            setControlValues(ref staff, ref r);
            setLocalization();
        }
예제 #7
0
        public void setProfileViewModel(ref Team team, ref TeamGridViewModel r)
        {
            settings    = GlobalSettings.getSettings();
            context     = ScoutContext.getScoutContext();
            globalFuncs = Globals.getGlobalFuncs();

            this.SelectionButton           = new CheckBoxContext();
            this.SelectionButton.IsChecked = true;

            yearfounded        = new LabeledTextBoxContext();
            national           = new LabeledTextBoxContext();
            status             = new LabeledTextBoxContext();
            maxafclubs         = new LabeledTextBoxContext();
            afclubs            = new LabeledTextBoxContext();
            trainingfacilities = new LabeledTextBoxContext();
            youthfacilities    = new LabeledTextBoxContext();
            youthacademy       = new LabeledTextBoxContext();
            maxattendance      = new LabeledTextBoxContext();
            averageattendance  = new LabeledTextBoxContext();
            minattendance      = new LabeledTextBoxContext();
            reputation         = new LabeledTextBoxContext();

            totaltransfer    = new LabeledTextBoxContext();
            remtransfer      = new LabeledTextBoxContext();
            balance          = new LabeledTextBoxContext();
            totalwage        = new LabeledTextBoxContext();
            usedwage         = new LabeledTextBoxContext();
            revenueavailable = new LabeledTextBoxContext();

            decay        = new LabeledTextBoxContext();
            fieldwidth   = new LabeledTextBoxContext();
            fieldlength  = new LabeledTextBoxContext();
            curcapacity  = new LabeledTextBoxContext();
            seatcapacity = new LabeledTextBoxContext();
            expcapacity  = new LabeledTextBoxContext();
            usedcapacity = new LabeledTextBoxContext();

            this.generaldetails = new LabeledHeaderContext();
            this.financedetails = new LabeledHeaderContext();
            this.stadiumdetails = new LabeledHeaderContext();

            setProfileContext(yearfounded);
            setProfileContext(national);
            setProfileContext(status);
            setProfileContext(maxafclubs);
            setProfileContext(afclubs);
            setProfileContext(trainingfacilities);
            setProfileContext(youthfacilities);
            setProfileContext(youthacademy);
            setProfileContext(maxattendance);
            setProfileContext(averageattendance);
            setProfileContext(minattendance);
            setProfileContext(reputation);

            setProfileContext2(totaltransfer);
            setProfileContext2(remtransfer);
            setProfileContext2(balance);
            setProfileContext2(totalwage);
            setProfileContext2(usedwage);
            setProfileContext2(revenueavailable);

            setProfileContext3(decay);
            setProfileContext3(fieldwidth);
            setProfileContext3(fieldlength);
            setProfileContext3(curcapacity);
            setProfileContext3(seatcapacity);
            setProfileContext3(expcapacity);
            setProfileContext3(usedcapacity);

            setControlValues(ref team, ref r);
            setLocalization();
        }
        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;
        }