Example #1
0
 private void LoadValues()
 {
     _timeInputTxtBox.Text        = (settings.Properties.PrePaidTime / timeDivisor).ToString();
     _consumptionInputTxtBox.Text = (settings.Properties.TotalConsumption + settings.Properties.TempConsumption).ToString();
     _clientNameInputTXTBX.Text   = settings.ClientData.Name;
     _clientPhoneNumberTXTBX.Text = settings.ClientData.PhoneNumber;
     _clientDocIdTXTBX.Text       = settings.ClientData.DocId;
     _clientDateOfBirthPanel.Text = DateTime.Now.ToShortDateString();
     _currencyLBL.Text            = currency;
     _timeModeLBL.Text            = SettingsConvertionTools.ParseTimeDivisorToString(timeDivisor);
 }
Example #2
0
 private void EditSettings_Load(object sender, EventArgs e)
 {
     _currencyUpDown.SelectedIndex       = SettingsConvertionTools.ParseCurrency(editedSettings.Currency);
     _extraCPriceTxtBox.Text             = editedSettings.ExtraControlPrice.ToString();
     _priceTxtBox.Text                   = editedSettings.Price.ToString();
     _timeIntervalTxtBox.Text            = (editedSettings.TimeInterval / 1000).ToString();
     _perDivisorNUpDown.Value            = decimal.Parse(editedSettings.PerDivisor.ToString());
     _timeDivisorUpDown.SelectedIndex    = SettingsConvertionTools.ParseTimeDivisor(editedSettings.TimeDivisor);
     _minConsumptionTxtBox.Text          = editedSettings.MinimumConsumption.ToString("00.00");
     _minTimeTxtBox.Text                 = (editedSettings.MinimumTime / editedSettings.TimeDivisor).ToString();
     _minimumConsumptionCurrencyLBL.Text = editedSettings.Currency;
     _minTimeTimeLBL.Text                = _timeDivisorUpDown.SelectedItem.ToString();
     _lapsConsumptionCHKBX.Checked       = editedSettings.LapsConsumption;
 }
Example #3
0
 private void RenderValues()
 {
     editedSettings.Currency           = _currencyUpDown.SelectedItem.ToString();
     editedSettings.ExtraControlPrice  = double.Parse(_extraCPriceTxtBox.Text);
     editedSettings.Price              = double.Parse(_priceTxtBox.Text);
     editedSettings.TimeInterval       = int.Parse(_timeIntervalTxtBox.Text) * 1000;
     editedSettings.PerDivisor         = int.Parse(_perDivisorNUpDown.Value.ToString());
     editedSettings.TimeDivisor        = SettingsConvertionTools.DeParseTimeDivisor(_timeDivisorUpDown.SelectedIndex);
     editedSettings.MinimumConsumption = double.Parse(_minConsumptionTxtBox.Text);
     editedSettings.MinimumTime        = (int.Parse(_minTimeTxtBox.Text) * editedSettings.TimeDivisor);
     if (lapsConsumption)
     {
         editedSettings.LapsConsumption = true;
     }
     else
     {
         editedSettings.LapsConsumption = false;
     }
 }