コード例 #1
0
        public void SwitchSelectedItem(PartialType type)
        {
            ResetSelections();

            if (type == PartialType.Main)
            {
                selectorMain.Visibility = ViewStates.Visible;
                imageViewMain.SetColorFilter(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)), PorterDuff.Mode.SrcAtop);
                mainTitle.SetTextColor(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)));
            }
            if (type == PartialType.Payment)
            {
                selectorPayment.Visibility = ViewStates.Visible;
                imageViewPolicies.SetColorFilter(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)), PorterDuff.Mode.SrcAtop);
                paymentTitle.SetTextColor(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)));
            }
            if (type == PartialType.Parking)
            {
                selectorParking.Visibility = ViewStates.Visible;
                imageViewBonuses.SetColorFilter(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)), PorterDuff.Mode.SrcAtop);
                parkingTitle.SetTextColor(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)));
            }
            if (type == PartialType.More)
            {
                selectorMore.Visibility = ViewStates.Visible;
                imageViewProfile.SetColorFilter(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)), PorterDuff.Mode.SrcAtop);
                moreTitle.SetTextColor(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)));
            }
            if (type == PartialType.History)
            {
                selectorHistory.Visibility = ViewStates.Visible;
                imageViewUsefull.SetColorFilter(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)), PorterDuff.Mode.SrcAtop);
                historyTitle.SetTextColor(new Color(ContextCompat.GetColor(this.Activity, Resource.Color.bgr_white)));
            }
        }
コード例 #2
0
        private void ShowFragment(PartialType type)
        {
            var partialSetup = SupportFragmentManager.BeginTransaction();

            if (type == PartialType.CurrentValues)
            {
                partialSetup.Hide(deviceInfoFragment);
                partialSetup.AddToBackStack(null);

                currentValuesFragment = new CurrentValuesFragment();
                partialSetup.Replace(Resource.Id.fragmentContainer, currentValuesFragment, "CurrentValuesFragment");
                partialSetup.Show(currentValuesFragment);
            }
            else if (type == PartialType.DeviceInfo)
            {
                partialSetup.Hide(currentValuesFragment);
                partialSetup.AddToBackStack(null);

                deviceInfoFragment = new DeviceInfoFragment();
                partialSetup.Replace(Resource.Id.fragmentContainer, deviceInfoFragment, "DeviceInfoFragment");
                partialSetup.Show(deviceInfoFragment);
            }

            if (!IsFinishing)
            {
                partialSetup.CommitAllowingStateLoss();
            }
        }
コード例 #3
0
        private PartialManager(Action <PartialUgc> saveCallback)
        {
            _type         = InstanceType.Save;
            _saveCallback = saveCallback;

            _filter = GetFilter();
            SetWindowParams();
        }
コード例 #4
0
        private PartialManager(Action <PartialData <T> > loadCallback)
        {
            _type         = InstanceType.Load;
            _loadCallback = loadCallback;

            _filter = GetFilter();
            SetWindowParams();
        }
コード例 #5
0
        public static MvcHtmlString PartialForByConvention <TModel, TProperty>(this HtmlHelper <TModel> helper, System.Linq.Expressions.Expression <Func <TModel, TProperty> > expression, bool escapFirstDot = false, bool useDisplayNamePrefix = true, PartialType partialType = PartialType.Form)
        {
            string className = expression.Body.Type.Name;

            string path = ViewPathByConventionHelper.GetFullPath(className, partialType);

            return(PartialFor(helper, expression, path, escapFirstDot, useDisplayNamePrefix));
        }