/// <summary>
 /// Wyświetlenie okna do edycji wpisu
 /// </summary>
 /// <param name="ledger">dane wpisu do edycji</param>
 public AddEntryWindow(Entry ledger)
     : this()
 {
     var entry = ledger as Revenue;
     if (entry != null)
         DataContext = new RevenueViewModel(entry);
     else
     {
         var expense = ledger as Expense;
         if (expense != null)
             DataContext = new ExpenseViewModel(expense);
     }
     ((EntryViewModel)DataContext).RequestCloseWindow += (s, e) => Close();
 }
 /// <summary>
 /// Dodawanie nowego wpisu do księgi
 /// Ustalenie nowego contextu dla okna na podstawie wybranej opcji
 /// </summary>
 /// <param name="kindOfEntry"> <see cref="KindOfEntry"/> </param>
 public AddEntryWindow(KindOfEntry kindOfEntry)
     : this()
 {
     switch (kindOfEntry)
     {
         case KindOfEntry.Expense:
             DataContext = new ExpenseViewModel();
             break;
         case KindOfEntry.Revenue:
             DataContext = new RevenueViewModel();
             break;
     }
     ((EntryViewModel)DataContext).RequestCloseWindow += (s, e) => Close();
 }