Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            string fileAddress = @"OriginalText.txt";

            tbFileAddress.Text = fileAddress;
            sentenceGenerator  = new SentenceGenerator(fileAddress);
        }
        public Form1()
        {
            InitializeComponent();

            //Default to einstein quote generator
            string fileAddress = @"EinsteinQuotes.txt";

            tbFileAddress.Text = fileAddress;
            sentenceGenerator  = new SentenceGenerator(fileAddress);
        }
Beispiel #3
0
        private void btnSelectFile_Click(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog()
            {
                Filter           = "Text Files (*.txt)|*.txt",
                RestoreDirectory = true
            };
            DialogResult dialogResults = fd.ShowDialog();
            string       fileAddress   = fd.FileName;


            tbFileAddress.Text = fileAddress;

            sentenceGenerator = new SentenceGenerator(fileAddress);

            btnGenerate.Enabled = true;
        }