Exemplo n.º 1
0
        private void btn_add_sneeze_Click(object sender, EventArgs e)
        {
            string message = GetLongestStreak(); // Calculate this first

            SneezeDatabase database   = SneezeClientListener.Database;
            int            sneezeNum  = database.CountdownStart - database.Sneezes.Count;
            DateTime       sneezeDate = CommonInfo.GetDateOfSneeze(sneezeNum);

            SneezeClientListener.Sneeze(new SneezeRecord(CurrentUser.UserGuid, sneezeDate, txtbx_commentary.Text));
            txtbx_commentary.Clear();

            if (!String.IsNullOrEmpty(message))
            {
                MessageBox.Show(message, "Sneeze Streak Status");
            }
        }