Ejemplo n.º 1
0
 private void BackButton_Click(object sender, EventArgs e)
 {
     if (BackBox.Items.Count > 0)
     {
         ExcuseNotification.Text = "";
         ForwardBox.Items.Add(ExcuseText.Text);
         ExcuseText.Text = BackBox.Items[0].ToString();
         BackBox.Items.Remove(ExcuseText.Text);
         BackBox.EndUpdate();
         ForwardBox.EndUpdate();
     }
 }
Ejemplo n.º 2
0
 private void ForwardButton_Click(object sender, EventArgs e)
 {
     if (ForwardBox.Items.Count != 0)
     {
         ExcuseNotification.Text = "";
         BackBox.Items.Insert(0, ExcuseText.Text);
         ExcuseText.Text = ForwardBox.Items[ForwardBox.Items.Count - 1].ToString();
         ForwardBox.Items.Remove(ExcuseText.Text);
         BackBox.EndUpdate();
         ForwardBox.EndUpdate();
     }
     else
     {
         ExcuseButton.PerformClick();
     }
 }
Ejemplo n.º 3
0
 private void RestartExcuses_Click(object sender, EventArgs e)
 {
     resetSeenExcuses();
     RestartExcuses.Hide();
     ExcuseText.Show();
     ExcuseButton.Show();
     BackButton.Hide();
     ForwardButton.Hide();
     ExcuseNotification.Text = "";
     ExcuseText.Text         = "Excuses Ahead...";
     BackBox.Items.Clear();
     ForwardBox.Items.Clear();
     BackBox.EndUpdate();
     ForwardBox.EndUpdate();
     Count = 0;
     Settings.Default.CurrentExcuse = 0;
     Settings.Default.Save();
 }
Ejemplo n.º 4
0
        private void ExcuseButton_Click(object sender, EventArgs e)
        {
            if (Count > 0)
            {
                BackBox.Items.Insert(0, ExcuseText.Text);
                BackBox.EndUpdate();
            }
            ExcuseNotification.ForeColor = Color.BlanchedAlmond;
            ExcuseNotification.Text      = "Excuse #" + (Settings.Default.CurrentExcuse + 1).ToString() + "/" + TotExcuses;
            CopyButton.Show();
            SendToEmail.Show();
            BackButton.Show();
            ForwardButton.Show();
            string excuse = getExcuse();

            ExcuseText.Text = excuse;
            Count          += 1;
            ForwardBox.Items.Clear();
            ForwardBox.EndUpdate();
        }
Ejemplo n.º 5
0
 private void ResetExcuses_Click(object sender, EventArgs e)
 {
     RestartExcuses.Hide();
     ExcuseText.Show();
     ExcuseButton.Show();
     BackButton.Hide();
     ForwardButton.Hide();
     CopyButton.Hide();
     SendToEmail.Hide();
     ExcuseNotification.Text = "";
     ExcuseText.Text         = "Excuses Ahead...";
     BackBox.Items.Clear();
     ForwardBox.Items.Clear();
     BackBox.EndUpdate();
     ForwardBox.EndUpdate();
     Count = 0;
     Settings.Default.CurrentExcuse = 0;
     for (int i = 0; i < Settings.Default.ExcuseSeen.Count; i++)
     {
         Settings.Default.ExcuseSeen[i] = "0";
         Settings.Default.Save();
     }
     Settings.Default.Save();
 }