Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var suggestion = string.Empty;

            try
            {
                suggestion = repo.GetRandom(seed);
            }
            catch
            {
                MessageBox.Show("No Resturants!");
                return;
            }
            if (MessageBox.Show(suggestion + "?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                repo.LockInWinner(suggestion);
            }
            else
            {
                seed++;
            }
        }