Example #1
0
        public WindowMenu(SinglePet singlePet, int coins, int freeHours, int currentDay, bool dailySpeciale)
        {
            InitializeComponent();

            mSinglePet = singlePet;

            mCoins      = coins;
            mFreeHours  = freeHours;
            mCurrentDay = currentDay;

            mDailySpeciale = dailySpeciale;
        }
Example #2
0
        public UserControlGame(SinglePet singlePet, int coins = 1, int freeHours = 1, int currentDay = 1, bool dailySpeciale = false)
        {
            InitializeComponent();

            mSinglePet = singlePet;

            ImageSourceConverter imgs = new ImageSourceConverter();

            imgPet.SetValue(Image.SourceProperty, imgs.ConvertFromString(string.Format("pack://application:,,,/Images/{0}.png", mSinglePet.petType)));

            txt_typePet.Text    = mSinglePet.petType;
            txt_effectsPet.Text = mSinglePet.descriptionPet;

            txt_age.Text        = mSinglePet.age;
            txt_ageEffects.Text = mSinglePet.descriptionAge;



            rbtnBone.Checked   += PriceEffects_CheckedChanged;
            rbtnToy.Checked    += PriceEffects_CheckedChanged;
            rbtnFruits.Checked += PriceEffects_CheckedChanged;
            rbtnForage.Checked += PriceEffects_CheckedChanged;

            DataContext = this;

            mMoney      = coins;
            mFreeHour   = freeHours;
            mCurrentDay = currentDay;
            dailyChoiceSpecialAvailable = dailySpeciale;

            if (dailyChoiceSpecialAvailable == true)
            {
                dailyChoiceSpecial.Visibility = Visibility.Visible;
            }

            pbar_days.Value = ((double)mCurrentDay / mSinglePet.totalDays) * 100;
        }