Esempio n. 1
0
        private void Button_Click_Remove(object sender, RoutedEventArgs e)
        {
            if (ListBox_saved.SelectedValue == null)
            {
                return;
            }
            string item = ListBox_saved.SelectedValue.ToString();

            Saved.Remove(item);
            ListBox_saved.UnselectAll();
            saveToFile();
        }
Esempio n. 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     label_error.Content = "";
     if (countryText.Text.Equals(""))
     {
         getUserLocation();
     }
     else
     {
         getWeather(countryText.Text);
     }
     if (label_error.Content.ToString().Equals(""))
     {
         if (findInSaved(label_CityName.Content.ToString()))
         {
             ListBox_saved.UnselectAll();
         }
     }
     Grid_MouseDown(boredr_0, new RoutedEventArgs());
     countryText.Text = "";
 }