public void ShowAvgRating(string facultyName, string courseName, AvgRatingObject avgRateObj)
        {
            if (!IsOpen)
            {
                SetDialogMode(Mode.ShowRating);
                tbCourseName.Text = courseName;
                tbFacultyName.Text = facultyName;

                double avgRounded = Math.Round(avgRateObj.AvgRating, 2);
                tbRating.Text = avgRounded.ToString();
                double offsetValue = avgRounded / 5;
                tbFeedbacks.Text = avgRateObj.TotalComments.ToString();
                
                IsOpen = true;
                rating.Offset = offsetValue;

            }
        }
        private static AvgRatingObject ParseAvgRatingResult(string jsonString)
        {
            AvgRatingObject ratingObject = new AvgRatingObject(/* iD351r3 */);

            try
            {
                JObject o = JObject.Parse(jsonString);
                JArray  a = (JArray)o["Android"];

                foreach (JObject i in a)
                {
                    ratingObject.TotalComments = (int)i["count"];
                    ratingObject.AvgRating     = double.Parse((string)i["avg_count"]);
                    ratingObject.Success       = ((string)i["faculty_result"] == "success");
                }
            }
            catch (Exception)
            {
                return(new AvgRatingObject());
            }

            return(ratingObject);
        }
        private static AvgRatingObject ParseAvgRatingResult(string jsonString)
        {
            AvgRatingObject ratingObject = new AvgRatingObject(/* iD351r3 */);
            try
            {
                JObject o = JObject.Parse(jsonString);
                JArray a = (JArray)o["Android"];

                foreach (JObject i in a)
                {
                    ratingObject.TotalComments = (int)i["count"];
                    ratingObject.AvgRating = double.Parse((string)i["avg_count"]);
                    ratingObject.Success = ((string)i["faculty_result"] == "success");
                }
            }
            catch (Exception)
            {
                return new AvgRatingObject();
            }

            return ratingObject;
        }