예제 #1
0
 /// <summary>
 /// Основной конструктор
 /// </summary>
 /// <param name="cat">Тип варианта</param>
 /// <param name="date">Дата варианта</param>
 /// <param name="price">Максимальная цена</param>
 /// <param name="rating">Допустимый рейтинг</param>
 /// <param name="rad">Радиус поиска (в км.)</param>
 public KGFilter(KGCategory cat, DateTime date, decimal price, KGItem.ORating rating, int rad)
 {
     Category = cat;
     Date     = date;
     Price    = price;
     Rating   = rating;
     Radius   = rad;
 }
예제 #2
0
파일: KGItem.cs 프로젝트: sashkoy/Poster
 /// <summary>
 /// Основной конструктор предлагаемого варианта.
 /// </summary>
 /// <param name="type">Тип</param>
 /// <param name="date">Дата</param>
 /// <param name="price">Цена</param>
 /// <param name="rating">Рейтинг</param>
 public KGItem(KGCategory type, DateTime date, decimal price, ORating rating, string desc, KGLocation loc)
 {
     Type        = type;
     this.date   = date;
     Price       = price;
     this.rating = rating;
     Description = desc;
     Location    = loc;
 }
예제 #3
0
        /// <summary>
        /// Клик по кнопке применения фильтра для поиска
        /// </summary>
        private void filterApply_Button_Click(object sender, RoutedEventArgs e)
        {
            while (itemsGetter.IsBusy)
            {
            }

            filterApply_Button.Content   = "...";
            filterApply_Button.IsEnabled = false;

            KGCategory type  = (KGCategory)optionType.SelectedItem;
            decimal    price = (decimal)eventPrice.Value;

            KGItem.ORating rating = KGItem.Str2Rating(eventRating.SelectionBoxItem.ToString());
            int            radius = (int)eventRadius.Value;
            var            date   = eventDate.SelectedDate.Value.Date;

            itemsGetter.RunWorkerAsync(new Tuple <KGCategory, DateTime, decimal, KGItem.ORating, int>
                                           (type, date, price, rating, radius));
        }