public void Load_Notif() { Notification_Form n = new Notification_Form(); int countrecords = n.count(); if (countrecords > Properties.Settings.Default.notif_count) { btn_notif.Image = Properties.Resources.Notification_48px; } else { btn_notif.Image = Properties.Resources.Notification_white; } Properties.Settings.Default.notif_count = countrecords; Properties.Settings.Default.Save(); }
private void btn_notif_Click(object sender, EventArgs e) { //= new Notification_Form(); if (n == null) { //su = new sales_list(); //su.FormClosed += delegate { su = null; }; //su.RefreshDgv += new sales_list.DoEvent(setsu); //su.Show(); n = new Notification_Form(); n.RefreshDgv += new Notification_Form.DoEvent(setnullnotif); n.Show(this); btn_notif.Image = Properties.Resources.Notification_white; } else { n.WindowState = FormWindowState.Normal; n.Focus(); } }
public void setnullnotif() { n = null; }