Esempio n. 1
0
        public FileGenerator GetGenerator()
        {
            FileGenerator fileGenerator = new FileGenerator();

            fileGenerator.Name     = textBoxName.Text;
            fileGenerator.Encoding = GeneratorEncoding.GetEncoding(comboBoxEncoding.SelectedIndex);
            fileGenerator.FilePath = textBoxFileName.Text;

            return(fileGenerator);
        }
Esempio n. 2
0
        public NumberGenerator GetGenerator()
        {
            NumberGenerator numberGenerator = new NumberGenerator();

            numberGenerator.Name        = textBoxName.Text;
            numberGenerator.Encoding    = GeneratorEncoding.GetEncoding(comboBoxEncoding.SelectedIndex);
            numberGenerator.Increment   = Convert.ToInt32(numericUpDownIncrement.Value);
            numberGenerator.StartNumber = Convert.ToInt32(numericUpDownStartNumber.Value);
            numberGenerator.StopNumber  = Convert.ToInt32(numericUpDownStopNumber.Value);

            return(numberGenerator);
        }
Esempio n. 3
0
        public StringGenerator GetGenerator()
        {
            StringGenerator stringGenerator = new StringGenerator();

            stringGenerator.Name             = textBoxName.Text;
            stringGenerator.Encoding         = GeneratorEncoding.GetEncoding(comboBoxEncoding.SelectedIndex);
            stringGenerator.StringLength     = Convert.ToInt32(numericUpDownStringLength.Value);
            stringGenerator.CharacterSet     = textBoxCharacterSet.Text;
            stringGenerator.AllowRepetitions = checkBoxAllowRepetitions.Checked;

            return(stringGenerator);
        }
        public CharacterGenerator GetGenerator()
        {
            CharacterGenerator characterGenerator = new CharacterGenerator();

            characterGenerator.Name           = textBoxName.Text;
            characterGenerator.Encoding       = GeneratorEncoding.GetEncoding(comboBoxEncoding.SelectedIndex);
            characterGenerator.Increment      = Convert.ToInt32(numericUpDownIncrement.Value);
            characterGenerator.StartCharacter = Convert.ToInt32(numericUpDownStartCharacter.Value);
            characterGenerator.StopCharacter  = Convert.ToInt32(numericUpDownStopCharacter.Value);

            return(characterGenerator);
        }
Esempio n. 5
0
        public RandomStringGenerator GetGenerator()
        {
            RandomStringGenerator randomGenerator = new RandomStringGenerator();

            randomGenerator.Name             = textBoxName.Text;
            randomGenerator.Encoding         = GeneratorEncoding.GetEncoding(comboBoxEncoding.SelectedIndex);
            randomGenerator.CharacterSet     = textBoxCharacterSet.Text;
            randomGenerator.StringLength     = Convert.ToInt32(numericUpDownStringLength.Value);
            randomGenerator.MaximumStrings   = Convert.ToInt32(numericUpDownNumberOfStrings.Value);
            randomGenerator.AllowRepetitions = checkBoxAllowRepetitions.Checked;

            return(randomGenerator);
        }
Esempio n. 6
0
        public CharacterRepeater GetGenerator()
        {
            CharacterRepeater characterRepeaterGenerator = new CharacterRepeater();

            characterRepeaterGenerator.Name         = textBoxName.Text;
            characterRepeaterGenerator.Encoding     = GeneratorEncoding.GetEncoding(comboBoxEncoding.SelectedIndex);
            characterRepeaterGenerator.Increment    = Convert.ToInt32(numericUpDownIncrement.Value);
            characterRepeaterGenerator.InitialCount = Convert.ToInt32(numericUpDownInitialCount.Value);
            characterRepeaterGenerator.FinalCount   = Convert.ToInt32(numericUpDownFinalCount.Value);
            characterRepeaterGenerator.Character    = textBoxCharacterString.Text;

            return(characterRepeaterGenerator);
        }