private void PasswordGeneratorButton_Click(object sender, RoutedEventArgs e)
        {
            int  amountSymbols          = (int)AmountSymbolsSlider.Value;
            bool isRemoveCapitalLetters = (bool)IsRemoveCapitalLettersCheckBox.IsChecked;
            bool isRemoveSigns          = (bool)IsRemoveSignsCheckBox.IsChecked;

            PasswordField.Text = Generator.GeneratePassword(amountSymbols, !isRemoveCapitalLetters, !isRemoveSigns);
        }
partial         void generatePasswordClicked(NSButton sender)
        {
            gen = new Generator(Int32.Parse( passwordLengthText.StringValue ),
                                useUppercaseLetters,
                                useLowercaseLetters,
                                useNumbers,
                                useSpecialCharacters);
            generatedPasswordText.StringValue = gen.GeneratePassword();
        }
Example #3
0
        static void Main(string[] args)
        {
            Console.Write("Enter strength for password: "******"Enter length for password: "******"Enter count of passwords: ");
            int count = Int32.Parse(Console.ReadLine());

            Console.WriteLine(Generator.GeneratePassword(strength, length, count));
            Console.ReadLine();
        }