Hier ist der Quellcode der Anwendung in C#

 

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PasswordGenerator {
 public partial class Form1 : Form {
 private static readonly Random Random = new Random();

 public Form1() {
 InitializeComponent();
 }

 private void btnExit_Click(object sender, EventArgs e) {
 saveSettings();
 Close();
 }

 private void loadSettings() {
 tracklength.Value = Properties.Settings.Default.length;
 checkSonderzeichen.Checked = Properties.Settings.Default.sonderzeichen;
 }


 private void saveSettings() {
 Properties.Settings.Default.length = tracklength.Value;
 Properties.Settings.Default.sonderzeichen = checkSonderzeichen.Checked;
 Properties.Settings.Default.Save();
 }

 private void Form1_Load(object sender, EventArgs e) {
 loadSettings();
 updateLaengeLabel();
 generatePassword();
 }

 private void generatePassword() {
 txtPassword.Text = PasswordGenerator(tracklength.Value, checkSonderzeichen.Checked);
 }



 private void btnGenerate_Click(object sender, EventArgs e) {
 generatePassword();
 }


 private static string PasswordGenerator(int passwordLength, bool strongPassword) {
 int seed = Random.Next(1, int.MaxValue);
 //const string allowedChars = "ABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";
 const string allowedChars = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";
 const string specialCharacters = @"!#$%&'()*+,-./:;<=>?@[]_";
 var chars = new char[passwordLength];
 var rd = new Random(seed);

 for (var i = 0; i < passwordLength; i++) {
 // If we are to use special characters
 if (strongPassword && i % Random.Next(3, passwordLength) == 0) {
 chars[i] = specialCharacters[rd.Next(0, specialCharacters.Length)];
 }

 else {
 chars[i] = allowedChars[rd.Next(0, allowedChars.Length)];
 }
 }

 return new string(chars);
 }

 private void tracklength_SizeChanged(object sender, EventArgs e) {
 }

 private void tracklength_Scroll(object sender, EventArgs e) {
 updateLaengeLabel();
 generatePassword();
 }

 private void updateLaengeLabel() {
 lbllaenge.Text = "Länge: (" + tracklength.Value.ToString() + ")";
 }

 private void btnCopy_Click(object sender, EventArgs e) {
 System.Windows.Forms.Clipboard.SetDataObject(txtPassword.Text, true);
 }

 private void linkLabel1_Click(object sender, EventArgs e) {
 System.Diagnostics.Process.Start("http://www.heger-software.de");
 }

 }
}