private void AddVehicleHistoryReport_Click(object sender, RoutedEventArgs e)
        {
            noError = true;
            string[] Data = new string[4];
            Data[0] = VINText.GetLineText(0);
            Data[1] = NumOwnersText.GetLineText(0);
            Data[2] = RatingText.GetLineText(0);
            Data[3] = MileageText.GetLineText(0);

            MakeVHR VHR = new MakeVHR(Data, cn);

            try
            {
                VHR.CreateVHR();
            }
            catch (OleDbException ex)
            {
                noError = false;
                ErrorWindow Error = new ErrorWindow(ex.Message);
                Error.ShowDialog();
            }
            if (noError)
            {
                this.Close();
            }
        }
Ejemplo n.º 2
0
    public void SetText()
    {
        var distance   = Vector2.Distance(this.transform.position, CollideObj.transform.position);
        var _RatingObj = new RatingObj("", Color.white, 0);

        if (distance >= 0 && distance < 0.1f)
        {
            _RatingObj = new RatingObj("Perfect", Color.yellow, 10);
        }
        else if (distance >= 0.1f && distance < 0.5f)
        {
            _RatingObj = new RatingObj("Good", new Color32(128, 255, 128, 255), 5);
        }
        else if (distance >= 0.5f && distance < 1f)
        {
            _RatingObj = new RatingObj("Bad", Color.red, 1);
        }
        Score += _RatingObj._Level;

        ComboText.text   = ComboVum.ToString();
        MessageText.text = distance.ToString();
        ScoreText.text   = Score.ToString();
        RatingText.color = _RatingObj._RatingColor;
        RatingText.text  = _RatingObj._RatingText;
        RatingText.GetComponent <Animation>().Play();
    }
Ejemplo n.º 3
0
        private void SetRating(float rating)
        {
            ratingController.SetRating(rating);

            RatingText text = emotionClient.GetTextsFor(rating);

            TopLabel.Text     = text.Top;
            MessageLabel.Text = text.Message;
        }
Ejemplo n.º 4
0
        private void Save_Click(object sender, EventArgs e)
        {
            Resturant rest = new Resturant(NameText.Text, AddressText.Text, PhoneNumberText.Text, ZipCodeText.Text, RatingText.Text, ReviewText.Text);

            if (!listOfRestruants.Contains(rest))
            {
                listOfRestruants.Add(rest);
            }
            else
            {
                listOfRestruants.Add(rest);
            }
            NameText.Clear();
            AddressText.Clear();
            ZipCodeText.Clear();
            PhoneNumberText.Clear();
            RatingText.Clear();
            ReviewText.Clear();
        }
Ejemplo n.º 5
0
        public RatingText GetTextsFor(float rating)
        {
            var texts = new RatingText();

            if (rating > 0.7)
            {
                texts.Top     = "Great! Glad you like the app!";
                texts.Message = "Oh, beautiful smile! Thank you!";
            }
            else if (rating > 0.4)
            {
                texts.Top     = "The app is good for you, but could be better.";
                texts.Message = "OK. Maybe not good enough :-|";
            }
            else
            {
                texts.Top     = "You don't like the app after all.";
                texts.Message = "Ooops, it seems that you are sad :-(";
            }

            return(texts);
        }
Ejemplo n.º 6
0
        public override object Get()
        {
            var parts        = ListUtils.Partition(Model.Students, x => Model.StudentInfos[x.StudentInGroup_ID].IsWebinar);
            var webinarList  = parts.Item1;
            var other        = parts.Item2;
            var webinarTable = GetTable("Вебинар", webinarList, 0, true);
            var otherTable   = GetTable("Очное обучение", other, webinarList.Count);
            var form         = AjaxForm(Url.Lms().Urls.UpdateLecture(null))[
                HiddenFor(x => x.Lecture.Lecture_ID),
                webinarTable,
                otherTable,
                Model.LectureEditStatus != LectureEditStatus.Nothing ? (object)bh.SubmitButton("Сохранить")
                .Style("margin-bottom:10px;").Id("button-lecture-edit") :
                bh.Warning("Сохранить изменения может только преподаватель {0} в день проведения занятия"
                           .FormatWith(StringUtils.AngleBrackets(Model.Lecture.Teacher_TC)))].Id("form-lecture-edit");

            var date       = Model.Lecture.TrainerComingTime;
            var group      = Url.Lms().Group(Model.Lecture.Group_ID, Model.Lecture.Group_ID);
            var comingTime = div[b["Время регистрации: "],
                                 date.HasValue ? date.Value.ToShortTimeString() : "не определено",
                                 b[" Группа: "], group,
                                 Model.Rating.GetOrDefault(x => b[" Служебный код: "]),
                                 Model.Rating.GetOrDefault(x => Anchor("#", x.Current).Class("not-link").Title(RatingText.FormatWith(x.Current, x.Max)).Data("toggle", "tooltip"))
                             ];
            var updateForm = Model.LectureEditStatus == LectureEditStatus.All ? UpdateForm() : null;

            return(div[
                       GetScript("/Scripts/Views/Lms/lectureeditview.js?v=6", "LectureEditView.init",
                                 Url.File().Urls.AddLectureFile(Model.Lecture.Lecture_ID)),
                       comingTime,
                       BootHtmls.Collapse(_.List(GetWebinarBlock())),
                       BootHtmls.Collapse(_.List(updateForm)).Style("margin-top:5px;"),
                       form,
                       BootHtmls.Collapse(_.List(UploadArchive(), FtpBlock())),
                       br,
                       LmsViews.SupportInfo,
                       h3[Url.Lms().LectureQuestionnaire(Model.Lecture.Lecture_ID, "Анкета преподавателя")]
                   ].Class("lecture-edit").Style("font-size:10px;"));
        }