예제 #1
0
 /// <summary>
 /// обработка события потери фокуса окном температуры
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tbToday_LostFocus(object sender, RoutedEventArgs e)
 {
     if (wd != null)
     {
         wd.EditData(0, sender as TextBox);
     }
 }
예제 #2
0
 /// <summary>
 /// обработка события потери фокуса окном температуры
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tbToday_LostFocus(object sender, RoutedEventArgs e)
 {
     if (wd != null)
     {
         if (index == -1)
         {
             if (tbDate.Text == "завтра")
             {
                 index = 1;
             }
             else
             {
                 for (int i = 0; i < wd.wi.Length; ++i)
                 {
                     if (DateTime.Parse(wd.wi[i].Date).ToString("dd MMMM") == tbDate.Text)
                     {
                         index = i;
                     }
                 }
             }
         }
         wd.EditData(index, sender as TextBox);
     }
 }