private void buttonAdd_Click(object sender, EventArgs e)
 {
     if (textBoxString.Text != null)
     {
         AddStr.Invoke(this, new ViewEvent(textBoxString.Text));
     }
 }
Exemplo n.º 2
0
 void Add()
 {
     if (AddStr.Text == String.Empty)
     {
         AddStr.Focus();
         return;
     }
     tmpList.Add(AddStr.Text);
     AddStr.Text = String.Empty;
     SortDescAndView();
     AddStr.Focus();
 }
Exemplo n.º 3
0
 void window1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (AddStr.Text != String.Empty)
         {
             Add();
         }
         else
         {
             AddStr.Focus();
         }
     }
 }