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