12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media;
- namespace School
- {
- public partial class Service
- {
- public static System.Windows.Visibility Btn_Admin = System.Windows.Visibility.Collapsed;
- public static System.Windows.Visibility btn_admin
- {
- get
- {
- return Btn_Admin;
- }
- set
- {
- Btn_Admin = value;
- }
- }
- public string sale
- {
- get
- {
- if (Discount == null)
- {
- return "";
- }
- return "* скидка " + Discount * 100 + "%";
- }
- }
- public SolidColorBrush TextBrush
- {
- get
- {
- var brushConverter = new BrushConverter();
- if (Discount == null)
- {
- return Brushes.White;
- }
- else
- {
- return (SolidColorBrush)(Brush)brushConverter.ConvertFrom("#e7fabf");
- }
- }
- }
- public string price
- {
- get
- {
- if (Discount != null)
- {
- double b = (Convert.ToDouble(Cost) / 100) * (100 - (Discount.Value * 100));
- int time = DurationInSeconds / 60;
- return b + " рублей на " + time + " минут";
- }
- else
- {
- double a = Convert.ToDouble(Cost);
- int time = DurationInSeconds / 60;
- return a + " рублей на " + time + " минут";
- }
- }
- }
- public int time
- {
- get
- {
- return DurationInSeconds/60;
- }
- }
- public string cost
- {
- get
- {
- if (Discount != null)
- {
- double a = Math.Round(Convert.ToDouble(Cost),1);
- return a + " ";
- }
- return "";
-
- }
- }
- }
- }
|