예제 #1
0
        private void GenerateByGivenChars(object sender, RoutedEventArgs e)
        {
            var generator = new RandomTextGenerator();

            mLoadedText = generator.GenerateRandomStringWithEqualProb(Convert.ToInt32(uiNumberOfCharToGenerate.Text.Trim()), uiCharToGenerate.Text.Trim());

            dataGrid.ItemsSource      = mProb.GetLetters(mLoadedText);
            uiEntropy.Text            = mProb.CalculateEntropy(mLoadedText).ToString();
            uiNumberOfCharacters.Text = mLoadedText.Length.ToString();
        }
예제 #2
0
        private void GenerateRandomString(object sender, RoutedEventArgs e)
        {
            var generator = new RandomTextGenerator();
            var tekst     = generator.GenerateRandomString(100000);

            mLoadedText               = tekst;
            dataGrid.ItemsSource      = mProb.GetLetters(tekst);
            uiEntropy.Text            = mProb.CalculateEntropy(tekst).ToString();
            uiNumberOfCharacters.Text = tekst.Length.ToString();
        }