示例#1
0
        private void BtnRun_Click(object sender, RoutedEventArgs e)
        {
            double temp;
            double Price92;
            double Price95;
            double Price98;
            double PriceDT;

            if (Double.TryParse(CmbBoxTimeInterval.Text, out temp) && Double.TryParse(TxtBox92.Text, out Price92) && Double.TryParse(TxtBox95.Text, out Price95) && Double.TryParse(TxtBox98.Text, out Price98) && Double.TryParse(TxtBoxDT.Text, out PriceDT))
            {
                if (Price92 < 25 || Price92 > 29 || Price95 < 27 || Price95 > 31 || Price98 < 29 || Price98 > 33 || PriceDT < 26 || PriceDT > 30)
                {
                    MessageBox.Show("Укажите цену на бензин в указаном диапазоне");
                }
                else
                {
                    RefillWindow RefillWind = new RefillWindow(int.Parse(CmbBxNumDispensers.Text), int.Parse(CmbBxMaxAutosInQueue.Text), int.Parse(CmbBoxMarginPrcntg.Text), int.Parse(CmbBoxTimeInterval.Text), int.Parse(CmbBoxTimeAccelerate.Text.Substring(0, 1)), Price92, Price95, Price98, PriceDT, CmbBoxDay.Text, int.Parse(CmbBoxHours.Text), int.Parse(CmbBoxMinutes.Text), CmbBoxTestingTime.Text);
                    RefillWind.Show();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Пожалуйста, введите время и цены в цифрах.");
            }
        }
示例#2
0
 public AutoGenerationAndManagement(int numberdispensers, int maximumautosinqueue, int marginpercentage, int timeinterval, RefillWindow refillwindow)
 {
     _numberdispensers    = numberdispensers;
     _maximumautosinqueue = maximumautosinqueue;
     _marginpercentage    = marginpercentage;
     _timeinterval        = timeinterval;
     _refillwindow        = refillwindow;
 }
示例#3
0
 public Dispenser(bool has92, bool has95, bool has98, bool hasDT, int number, RefillWindow refillwindow)
 {
     Has92         = has92;
     Has95         = has95;
     Has98         = has98;
     HasDT         = hasDT;
     Occupied      = false;
     Number        = number;
     _refillwindow = refillwindow;
 }
示例#4
0
 public RefillCore(int numberdispensers, int maximumautosinqueue, int marginpercentage, int timeinterval, RefillWindow refillwindow, int timeaccelerate, string testingtime)
 {
     _numberdispensers    = numberdispensers;
     _maximumautosinqueue = maximumautosinqueue;
     _marginpercentage    = marginpercentage;
     _timeinterval        = timeinterval;
     _refillwindow        = refillwindow;
     _timeaccelerate      = timeaccelerate;
     _testingtime         = testingtime;
     RunRefill();
 }
示例#5
0
 public ListDispenserAndDequeue(int numberdispensers, RefillWindow refillwindow)
 {
     _numberdispensers = numberdispensers;
     _refillwindow     = refillwindow;
     Initialize();
 }
示例#6
0
 public QueueOnRefill(int number, RefillWindow refillwindow)
 {
     Number        = number;
     _refillwindow = refillwindow;
 }