Beispiel #1
0
 public MainWindow()
 {
     InitializeComponent();
     //загружаем из файла даты праздников
     if (Holydays.LoadHolyDays("holidays.txt", out List <string> fileHolydaysList))
     {
         foreach (string s in fileHolydaysList)
         {
             holidayList.Items.Add(s);
         }
     }
 }
Beispiel #2
0
 private void HolidayForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     Holydays.SaveHolyDays(new StreamWriter("holidays.txt"), holidayList.Items);
 }
Beispiel #3
0
 private void saveHolidaysButton_Click(object sender, RoutedEventArgs e)
 {
     Holydays.SaveHolyDays(new StreamWriter("holidays.txt"), holidayList.Items);
 }