Пример #1
0
 public void LoadGenerator(NumberGenerator Generator)
 {
     textBoxName.Text = Generator.Name;
     comboBoxEncoding.SelectedIndex = GeneratorEncoding.ReturnEncodingIndex(Generator.Encoding);
     numericUpDownIncrement.Value   = Convert.ToDecimal(Generator.Increment);
     numericUpDownStartNumber.Value = Convert.ToDecimal(Generator.StartNumber);
     numericUpDownStopNumber.Value  = Convert.ToDecimal(Generator.StopNumber);
 }
Пример #2
0
 public void LoadGenerator(StringGenerator Generator)
 {
     textBoxName.Text = Generator.Name;
     comboBoxEncoding.SelectedIndex   = GeneratorEncoding.ReturnEncodingIndex(Generator.Encoding);
     textBoxCharacterSet.Text         = Generator.CharacterSet;
     numericUpDownStringLength.Value  = Convert.ToDecimal(Generator.StringLength);
     checkBoxAllowRepetitions.Checked = Generator.AllowRepetitions;
 }
Пример #3
0
 public void LoadGenerator(CharacterRepeater Generator)
 {
     textBoxName.Text = Generator.Name;
     comboBoxEncoding.SelectedIndex  = GeneratorEncoding.ReturnEncodingIndex(Generator.Encoding);
     numericUpDownIncrement.Value    = Convert.ToDecimal(Generator.Increment);
     numericUpDownInitialCount.Value = Convert.ToDecimal(Generator.InitialCount);
     numericUpDownFinalCount.Value   = Convert.ToDecimal(Generator.FinalCount);
     textBoxCharacterString.Text     = Generator.Character;
 }
Пример #4
0
        public FileGenerator GetGenerator()
        {
            FileGenerator fileGenerator = new FileGenerator();

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

            return(fileGenerator);
        }
Пример #5
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);
        }
Пример #6
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);
        }
Пример #8
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);
        }
Пример #9
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);
        }
Пример #10
0
 public void LoadGenerator(FileGenerator Generator)
 {
     textBoxName.Text = Generator.Name;
     comboBoxEncoding.SelectedIndex = GeneratorEncoding.ReturnEncodingIndex(Generator.Encoding);
     textBoxFileName.Text           = Generator.FilePath;
 }