private void button2_Click(object sender, EventArgs e) { if (notification == null) { notification = new Notification(); } notification.Initialization(); try { dataGridView.DataSource = notification.SomeMethod(NotificationHandler); } catch (Exception) { throw; } }
public Form1() { InitializeComponent(); notification = new Notification(); bt_prisijungti.Enabled = notification.CanRequestNotifications(); }