Beispiel #1
0
        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);
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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());
        }