private void mTimer_Tick(object sender, EventArgs e) { if (IsDisposed) { return; } var values = mTunableShape.SelectValues(); var valuesWrapper = new RequestNumberSettingsFormValuesWrapper(values); var generationMethod = valuesWrapper.Control1GenerationMethod; var increment = valuesWrapper.Control2Increment; var requestNumber = _context.Session.AuthenticationService.GetRequestNumber(generationMethod, increment); liveViewTextBox.Text = requestNumber.ToString(CultureInfo.CurrentCulture.NumberFormat); }
private void okButton_Click(object sender, EventArgs e) { var values = mTunableShape.SelectValues(); var valuesWrapper = new RequestNumberSettingsFormValuesWrapper(values); var generationMethod = valuesWrapper.Control1GenerationMethod; var increment = valuesWrapper.Control2Increment; var authenticationService = _context.Session.AuthenticationService; var requestNumberSettings = authenticationService.GetRequestNumberSettings(); requestNumberSettings.Method = generationMethod; requestNumberSettings.Increment = increment; authenticationService.SetRequestNumberSettings(requestNumberSettings); Close(); }
public void ApplyTemplate(TunableShapeTemplate <ShapeColumnTemplate> template) { if (null == template) { throw new ArgumentNullException(nameof(template)); } var requestNumberSettings = _context.Session.AuthenticationService.GetRequestNumberSettings(); mTunableShape.ApplyTemplate(template); var valuesWrapper = new RequestNumberSettingsFormValuesWrapper { Control1GenerationMethod = requestNumberSettings.Method, Control2Increment = requestNumberSettings.Increment }; mTunableShape.ApplyValues(valuesWrapper.CollectIncomeValues()); }