public SickLeaveSendingPage(SickLeave sickLeave, bool send = true) { InitializeComponent(); this.sickLeave = sickLeave; User user = MainWindow.ReturnCurrentUser(); if (send) { new Thread(() => Send(user)).Start(); } else { Reporter.AddRaport(user.ReturnName(), "Wystawienie zwolnienia bez wysyĆania", null); createPDF(); } }