Exemplo n.º 1
0
        public static void OnOpacitySliderChange(WindowBase sender, UIValueChangedEventArgs args)
        {
            try
            {
                CASMakeup ths = CASMakeup.gSingleton;
                if (ths == null) return;

                Slider slider = sender as Slider;
                if (slider != null)
                {
                    CASPart part = (CASPart)ths.mGridMakeupParts.SelectedTag;

                    ths.SetMakeupOpacity(part, ((float)slider.Value) / ((float)slider.MaxValue), true);
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnOpacitySliderChange", e);
            }
        }
Exemplo n.º 2
0
        private void OnCourseLoadSliderChangedEx(WindowBase sender, UIValueChangedEventArgs eventArgs)
        {
            try
            {
                Slider slider = sender as Slider;
                if (slider != null)
                {
                    EnrollmentDialogRowController controller;
                    mCourseLoad = (uint)slider.Value;
                    EnrollmentData enrollmentDataForSim = GetEnrollmentDataForSim(mSelectedSimDesc, out controller);
                    if (enrollmentDataForSim != null)
                    {
                        int num;
                        int num2;
                        FinancialAidtype aidtype;
                        CreditAwardtype  awardtype;
                        mHouseholdFunds -= enrollmentDataForSim.CostPerSim;
                        mHouseholdFunds -= enrollmentDataForSim.ScholarshipAmountPerSim;
                        enrollmentDataForSim.CostPerSim              = UpdateFunds(enrollmentDataForSim.AcademicDegreeName, mSelectedSimDesc as SimDescription, out num2, out aidtype, out num, out awardtype);
                        enrollmentDataForSim.FinancialAidType        = aidtype;
                        enrollmentDataForSim.ScholarshipAmountPerSim = num2;
                        enrollmentDataForSim.CreditsAwardedPerSim    = num;
                        enrollmentDataForSim.CourseLoad              = mCourseLoad;
                        enrollmentDataForSim.CreditAwardType         = awardtype;
                        controller.mTextControlCost.Color            = (enrollmentDataForSim.CostPerSim < 0x0) ? RED : BLUE;
                        controller.Cost        = UIUtils.FormatMoney(Math.Abs(enrollmentDataForSim.CostPerSim));
                        controller.Scholarship = enrollmentDataForSim.ScholarshipAmountPerSim;
                        controller.AidType     = enrollmentDataForSim.FinancialAidType;

                        // Custom
                        UpdateCreditIconEx(enrollmentDataForSim.CreditsAwardedPerSim, enrollmentDataForSim.CreditAwardType, (AcademicDegreeNames)enrollmentDataForSim.AcademicDegreeName);

                        UpdateDegreeProgressBar(mSelectedSimDesc, enrollmentDataForSim.AcademicDegreeName);
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnCourseLoadSliderChangedEx", e);
            }
        }
Exemplo n.º 3
0
        public void OnSliderChanged(WindowBase sender, UIValueChangedEventArgs eventArgs)
        {
            try
            {
                GetPanel().OnSliderChanged(sender, eventArgs);

                Slider slider = sender as Slider;
                if (slider != null)
                {
                    Pair <Text, string> caption;
                    if (mSlidersToText.TryGetValue(slider, out caption))
                    {
                        caption.First.Caption = GetTitle(caption.Second, slider.Value);
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnSliderChanged", e);
            }
        }
Exemplo n.º 4
0
        public static void OnOpacitySliderChange(WindowBase sender, UIValueChangedEventArgs args)
        {
            try
            {
                CASMakeup ths = CASMakeup.gSingleton;
                if (ths == null)
                {
                    return;
                }

                Slider slider = sender as Slider;
                if (slider != null)
                {
                    CASPart part = (CASPart)ths.mGridMakeupParts.SelectedTag;

                    ths.SetMakeupOpacity(part, ((float)slider.Value) / ((float)slider.MaxValue), true);
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnOpacitySliderChange", e);
            }
        }
Exemplo n.º 5
0
 private void OnScaleSliderChanged(WindowBase sender, UIValueChangedEventArgs eventArgs)
 {
     this.UpdateScaleFromSlider();
     this.UpdateModel(false);
 }
Exemplo n.º 6
0
 private void OnOpacitySliderChanged(WindowBase sender, UIValueChangedEventArgs eventArgs)
 {
     if (this.ActiveTattooPartInUse())
     {
         this.UpdateModel(false);
     }
 }
Exemplo n.º 7
0
        private void OnCourseLoadSliderChangedEx(WindowBase sender, UIValueChangedEventArgs eventArgs)
        {
            try
            {
                Slider slider = sender as Slider;
                if (slider != null)
                {
                    EnrollmentDialogRowController controller;
                    mCourseLoad = (uint)slider.Value;
                    EnrollmentData enrollmentDataForSim = GetEnrollmentDataForSim(mSelectedSimDesc, out controller);
                    if (enrollmentDataForSim != null)
                    {
                        int num;
                        int num2;
                        FinancialAidtype aidtype;
                        CreditAwardtype awardtype;
                        mHouseholdFunds -= enrollmentDataForSim.CostPerSim;
                        mHouseholdFunds -= enrollmentDataForSim.ScholarshipAmountPerSim;
                        enrollmentDataForSim.CostPerSim = UpdateFunds(enrollmentDataForSim.AcademicDegreeName, mSelectedSimDesc as SimDescription, out num2, out aidtype, out num, out awardtype);
                        enrollmentDataForSim.FinancialAidType = aidtype;
                        enrollmentDataForSim.ScholarshipAmountPerSim = num2;
                        enrollmentDataForSim.CreditsAwardedPerSim = num;
                        enrollmentDataForSim.CourseLoad = mCourseLoad;
                        enrollmentDataForSim.CreditAwardType = awardtype;
                        controller.mTextControlCost.Color = (enrollmentDataForSim.CostPerSim < 0x0) ? RED : BLUE;
                        controller.Cost = UIUtils.FormatMoney(Math.Abs(enrollmentDataForSim.CostPerSim));
                        controller.Scholarship = enrollmentDataForSim.ScholarshipAmountPerSim;
                        controller.AidType = enrollmentDataForSim.FinancialAidType;

                        // Custom
                        UpdateCreditIconEx(enrollmentDataForSim.CreditsAwardedPerSim, enrollmentDataForSim.CreditAwardType, (AcademicDegreeNames)enrollmentDataForSim.AcademicDegreeName);

                        UpdateDegreeProgressBar(mSelectedSimDesc, enrollmentDataForSim.AcademicDegreeName);
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnCourseLoadSliderChangedEx", e);
            }
        }