private void RatingInput_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     if ((CurrentUser.getUserId() != null || CurrentUser.getUserId() != "0") && (CurrentUser.getUserId() != null))
     {
         editPopup.CreatePopup(sender, e);
     }
     else
     {
         AlertDialog.Builder aler = new AlertDialog.Builder(this, Resource.Style.MyDialogTheme);
         aler.SetTitle("Sorry");
         aler.SetMessage("This feature is available only for VIP Customers.");
         aler.SetPositiveButton("KnowMore", delegate
         {
             var uri    = Android.Net.Uri.Parse("https://hangoutz.azurewebsites.net/index.html");
             var intent = new Intent(Intent.ActionView, uri);
             StartActivity(intent);
         });
         aler.SetNegativeButton("Ok", delegate
         {
         });
         Dialog dialog1 = aler.Create();
         dialog1.SetCanceledOnTouchOutside(false);
         dialog1.Show();
         RatingInput.Rating = 0;
     }
     RatingInput.RatingBarChange -= RatingInput_RatingBarChange;
 }
Пример #2
0
 private void RatingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     if (e.FromUser)
     {
         view.FindViewById <TextView>(Resource.Id.rating_textView).Text = $"{e.Rating * 2}";
     }
 }
Пример #3
0
        private void Rb_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            FragmentTransaction trans = FragmentManager.BeginTransaction();
            DialogReview        dr    = new DialogReview();

            dr.Show(trans, "Wine Review");
        }
 private void RatingBarOnRatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     try
     {
         RatingBar.Rating = e.Rating;
     }
     catch (Exception exception)
     {
         Methods.DisplayReportResultTrack(exception);
     }
 }
 private void RatingBarOnRatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     try
     {
         RatingBar.Rating = e.Rating;
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
     }
 }
Пример #6
0
 private void RbAD_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     try
     {
         Toast.MakeText(this, "Su calificación: " + rbAD.Rating.ToString(), ToastLength.Long).Show();
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Пример #7
0
 void RatingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     if (this.Control == null)
     {
         return;
     }
     if (this.Control.IsIndicator)
     {
         return;
     }
     this.Element.SetValue(RatingControl.ValueProperty, (int)e.Rating);
 }
        private void RatingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            var target = Target as RatingBar;

            if (target == null)
            {
                return;
            }

            var value = target.Rating;

            FireValueChanged(value);
        }
        private void VersionUpGrade_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            float now    = nowGrade2.Rating;
            float target = targetGrade2.Rating;

            if (now <= target)
            {
                CalcDataPatch(Convert.ToInt32(now * 2), Convert.ToInt32(target * 2));
            }
            else
            {
                targetGrade2.Rating = now;
            }
        }
        private void NormalGrade_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            float now    = nowGrade1.Rating;
            float target = targetGrade1.Rating;

            if (now <= target)
            {
                CalcFragment(Convert.ToInt32(now), Convert.ToInt32(target));
            }
            else
            {
                targetGrade1.Rating = now;
            }
        }
Пример #11
0
        public void CreatePopup(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            //e.Rating

            Dialog editDialog = new Dialog(Parent);
            var    rat        = e.Rating;

            //editDialog.Window.RequestFeature(WindowFeatures.NoTitle);
            //editDialog.Window.SetBackgroundDrawable(new Android.Graphics.Drawables.ColorDrawable(Android.Graphics.Color.White));// (Android.Graphics.Color.Transparent));
            editDialog.SetContentView(Resource.Layout.EditReviewPopup);
            //editDialog.SetTitle();
            ServiceWrapper sw              = new ServiceWrapper();
            Review         review          = new Review();
            ImageButton    ibs             = editDialog.FindViewById <ImageButton>(Resource.Id.ratingimage);
            ImageButton    close           = editDialog.FindViewById <ImageButton>(Resource.Id.close);
            Button         btnSubmitReview = editDialog.FindViewById <Button>(Resource.Id.btnSubmitReview);
            TextView       Comments        = editDialog.FindViewById <TextView>(Resource.Id.txtReviewComments);
            RatingBar      custRating      = editDialog.FindViewById <RatingBar>(Resource.Id.rating);

            custRating.Rating = rat;


            ibs.SetImageResource(Resource.Drawable.wine_review);
            ibs.SetScaleType(ImageView.ScaleType.CenterCrop);
            //close.SetImageResource(Resource.Drawable.Close);
            close.SetScaleType(ImageView.ScaleType.CenterCrop);
            editDialog.Window.SetBackgroundDrawable(new Android.Graphics.Drawables.ColorDrawable(Android.Graphics.Color.Transparent));
            editDialog.Show();
            close.Click += delegate
            {
                editDialog.Dismiss();
            };
            btnSubmitReview.Click += async delegate
            {
                review.ReviewDate   = DateTime.Now;
                review.ReviewUserId = Convert.ToInt32(CurrentUser.getUserId());
                review.Username     = CurrentUser.getUserName();
                review.RatingText   = Comments.Text;
                review.RatingStars  = Convert.ToInt32(custRating.Rating);
                review.IsActive     = true;

                review.WineId = WineId;
                await sw.InsertUpdateReview(review);

                ((IPopupParent)Parent).RefreshParent();
                editDialog.Dismiss();
            };
        }
Пример #12
0
        private void FSTDBDetailActivity_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            try
            {
                if (e.Rating >= 5)
                {
                    FindViewById <LinearLayout>(Resource.Id.FSTDBDetailGradeControlLayout2).Visibility = ViewStates.Visible;
                }
                else
                {
                    FindViewById <LinearLayout>(Resource.Id.FSTDBDetailGradeControlLayout2).Visibility = ViewStates.Gone;
                    versionGradeControl.Rating = 0;
                }

                SetChipsetBonusList();
                SetCircuit();
            }
            catch (Exception ex)
            {
                ETC.LogError(ex, this);
                ETC.ShowSnackbar(snackbarLayout, Resource.String.FSTDBDetail_SubGradeError, Snackbar.LengthShort, Android.Graphics.Color.DarkRed);
            }
        }
 private void Control_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     element.OnRatingChanged(e.Rating);
 }
Пример #14
0
 private void EditRatingBarOnChanged(object o, RatingBar.RatingBarChangeEventArgs e)
 {
     Element.Rating = Control.Rating;
 }
Пример #15
0
 void RatBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     Petisco.NrEstrelas = (int)e.Rating;
     // fazer PUT HTTP para atualizar o rating
     var res = ApiHTTP.AvaliarPetisco(userID, Petisco.IdEspecialidade, Petisco.NrEstrelas);
 }
Пример #16
0
 private void Rb_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     editor.PutString("rate", e.Rating.ToString());
     editor.Apply();
     editor.Commit();
 }
Пример #17
0
 private void Ratingbar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     Toast.MakeText(this, "Your Rating: " + e.Rating.ToString(), ToastLength.Short).Show();
 }
Пример #18
0
 private void ratingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     Toast.MakeText(_context, "Новый рейтинг: " + _ratingBar.Rating, ToastLength.Short).Show();
 }
Пример #19
0
 private void gradeFilter_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     ExecuteSearch(lastQuery);
 }
Пример #20
0
        public void CreatePopup(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            try
            {
                Dialog editDialog = new Dialog(Parent);
                var    rat        = e.Rating;
                //editDialog.Window.RequestFeature(WindowFeatures.NoTitle);
                //editDialog.Window.SetBackgroundDrawable(new Android.Graphics.Drawables.ColorDrawable(Android.Graphics.Color.White));// (Android.Graphics.Color.Transparent));
                editDialog.SetContentView(Resource.Layout.EditReviewPopup);
                //editDialog.SetTitle();
                ServiceWrapper sw              = new ServiceWrapper();
                Review         review          = new Review();
                ImageButton    close           = editDialog.FindViewById <ImageButton>(Resource.Id.close);
                Button         btnSubmitReview = editDialog.FindViewById <Button>(Resource.Id.btnSubmitReview);
                TextView       Comments        = editDialog.FindViewById <TextView>(Resource.Id.txtReviewComments);
                RatingBar      custRating      = editDialog.FindViewById <RatingBar>(Resource.Id.rating);
                custRating.Rating = rat;
                Comments.Text     = _editObj.RatingText;
                int screenid = 9;
                //ImageButton ibs = editDialog.FindViewById<ImageButton>(Resource.Id.ratingimage);
                //ItemReviewResponse SkuRating = new ItemReviewResponse();
                //SkuRating = sw.GetItemReviewsByWineID(WineId).Result;
                //ReviewArray = SkuRating.Reviews.ToList();
                //for (int i = 0; i < ReviewArray.Count(); i++)
                //{
                //    if (Convert.ToInt32(CurrentUser.getUserId()) == ReviewArray[i].ReviewUserId)
                //    {
                //        ItemReviewResponse uidreviews = new ItemReviewResponse();
                //        uidreviews = sw.GetItemReviewUID(Convert.ToInt32(CurrentUser.getUserId())).Result;
                //        List<Review> myArr1;
                //        myArr1 = uidreviews.Reviews.ToList();
                //        for (int j = 0; j < myArr1.Count; j++)
                //        {
                //            if (ReviewArray[i].Name == myArr1[i].Name)
                //                Comments.Text = myArr1[i].RatingText.ToString();
                //        }
                //    }
                //    else
                //    {
                //        CreatePopup(sender, e);
                //    }
                //}



                //ibs.SetImageResource(Resource.Drawable.wine_review);
                //ibs.SetScaleType(ImageView.ScaleType.CenterCrop);
                //close.SetImageResource(Resource.Drawable.Close);
                close.SetScaleType(ImageView.ScaleType.CenterCrop);
                editDialog.Window.SetBackgroundDrawable(new Android.Graphics.Drawables.ColorDrawable(Android.Graphics.Color.Transparent));
                editDialog.Show();
                LoggingClass.LogInfo("Entered into CreatePopup", screenid);
                close.Click += delegate
                {
                    LoggingClass.LogInfo("Closed PoPup", screenid);
                    editDialog.Dismiss();
                };
                btnSubmitReview.Click += async delegate
                {
                    AndHUD.Shared.Show(Parent, "Saving Review...", Convert.ToInt32(MaskType.Clear));
                    if (CurrentUser.getUserId() == null)
                    {
                        AlertDialog.Builder aler = new AlertDialog.Builder(Parent, Resource.Style.MyDialogTheme);
                        aler.SetTitle("Sorry");
                        aler.SetMessage("This Feature is available for VIP Users only");
                        aler.SetNegativeButton("Ok", delegate {
                            LoggingClass.LogInfo("Closed PoPup", screenid);
                            editDialog.Dismiss();
                        });
                        Dialog dialog1 = aler.Create();
                        dialog1.Show();
                    }
                    else
                    {
                        //ProgressIndicator.Show(Parent);
                        review.ReviewDate   = DateTime.Now;
                        review.ReviewUserId = Convert.ToInt32(CurrentUser.getUserId());
                        review.Username     = CurrentUser.getUserName();
                        review.RatingText   = Comments.Text;
                        review.RatingStars  = Convert.ToInt32(custRating.Rating);
                        review.IsActive     = true;
                        review.Barcode      = WineBarcode;
                        review.PlantFinal   = storeid;
                        LoggingClass.LogInfo("Submitted review---->" + review.RatingStars + " ---->" + review.RatingText + "---->" + review.PlantFinal + "---->" + review.Barcode, screenid);
                        await sw.InsertUpdateReview(review);

                        ((IPopupParent)Parent).RefreshParent();
                        //ProgressIndicator.Hide();
                        editDialog.Dismiss();
                    }
                    AndHUD.Shared.Dismiss();
                    AndHUD.Shared.ShowSuccess(Parent, "Sucessfully Saved", MaskType.Clear, TimeSpan.FromSeconds(2));
                };
            }
            catch (Exception exe)
            {
                LoggingClass.LogError(exe.Message, ParentScreenId, exe.StackTrace.ToString());
            }

            //LoggingClass.LogTime("create popup",st.Elapsed.TotalSeconds.ToString());
        }
Пример #21
0
 private void RatingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     StartActivity(new Intent(Intent.ActionView, Android.Net.Uri
                              .Parse("https://play.google.com/store/apps/details?id=com.wave.wtquiz")));
 }
Пример #22
0
 private void ItemRating_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e)
 {
     changed = true;
 }
Пример #23
0
        public void CreatePopup(object sender, RatingBar.RatingBarChangeEventArgs e)
        {
            if (CurrentUser.getUserId() == null || CurrentUser.getUserId() == "0")
            {
                AlertDialog.Builder aler = new AlertDialog.Builder(Parent, Resource.Style.MyDialogTheme);
                aler.SetTitle("Sorry");
                aler.SetMessage("This Feature is available for VIP Users only");
                aler.SetNegativeButton("Ok", delegate {
                });
                Dialog dialog1 = aler.Create();
                dialog1.Show();
            }
            else
            {
                try
                {
                    Dialog editDialog = new Dialog(Parent);
                    var    rat        = e.Rating;
                    editDialog.SetContentView(Resource.Layout.EditReviewPopup);
                    ServiceWrapper sw              = new ServiceWrapper();
                    Review         review          = new Review();
                    ImageButton    close           = editDialog.FindViewById <ImageButton>(Resource.Id.close);
                    Button         btnSubmitReview = editDialog.FindViewById <Button>(Resource.Id.btnSubmitReview);
                    TextView       Comments        = editDialog.FindViewById <TextView>(Resource.Id.txtReviewComments);
                    RatingBar      custRating      = editDialog.FindViewById <RatingBar>(Resource.Id.rating);
                    custRating.Rating = rat;
                    Comments.Text     = _editObj.RatingText;
                    int screenid = 9;
                    close.SetScaleType(ImageView.ScaleType.CenterCrop);
                    editDialog.Window.SetBackgroundDrawable(new Android.Graphics.Drawables.ColorDrawable(Android.Graphics.Color.Transparent));
                    editDialog.Show();
                    editDialog.SetCanceledOnTouchOutside(false);
                    LoggingClass.LogInfo("Entered into CreatePopup", screenid);

                    close.Click += delegate
                    {
                        LoggingClass.LogInfo("Closed PoPup", screenid);
                        editDialog.Dismiss();
                    };
                    btnSubmitReview.Click += async delegate
                    {
                        AndHUD.Shared.Show(Parent, "Saving Review...", Convert.ToInt32(MaskType.Clear));
                        //  ProgressIndicator.Show(Parent);
                        review.ReviewDate   = DateTime.Now;
                        review.ReviewUserId = Convert.ToInt32(CurrentUser.getUserId());
                        review.Username     = CurrentUser.getUserName();
                        review.RatingText   = Comments.Text;
                        review.RatingStars  = Convert.ToInt32(custRating.Rating);
                        review.IsActive     = true;
                        review.Barcode      = WineBarcode;
                        review.PlantFinal   = storeid;
                        LoggingClass.LogInfo("Submitted review---->" + review.RatingStars + " ---->" + review.RatingText + "---->" + review.PlantFinal + "---->" + review.Barcode, screenid);
                        await sw.InsertUpdateReview(review);

                        ((IPopupParent)Parent).RefreshParent();
                        ProgressIndicator.Hide();
                        editDialog.Dismiss();
                        AndHUD.Shared.Dismiss();
                        AndHUD.Shared.ShowSuccess(Parent, "Sucessfully Saved", MaskType.Clear, TimeSpan.FromSeconds(2));
                    };
                }
                catch (Exception exe)
                {
                    LoggingClass.LogError(exe.Message, ParentScreenId, exe.StackTrace.ToString());
                }
            }
        }