private void ShowNotification(object myObject, DetectorArgs myArgs) { trayClass.ShowTrayInformation("Website change detector! ", myArgs.Message); try { if (tbEmail.Text != null && tbEmail.Text != "") { MailSender.sendMail(tbEmail.Text, tbURL.Text); } } catch (Exception e) { String historyItem = DateTime.Now.ToLocalTime().ToString() + " !! " + e.Message; lbHistory.Items.Add(historyItem); } }
private void button_Click(object sender, RoutedEventArgs e) { trayClass.ShowTrayInformation("Tytuł", "Treść"); }