private void mostrarNotificaciones(int flag) { if (recordatorioF != "") { if (flag != 0) { switch (nRec) { case 1: { try { string imagepath = Path.Combine(Application.StartupPath, @"..\..\imagenes\icono.ico"); Notificaciones.Icon = new System.Drawing.Icon(imagepath); Notificaciones.Text = "Recordatorio de evento"; Notificaciones.Tag = idE; Notificaciones.Visible = true; Notificaciones.BalloonTipTitle = "Recordatorio de evento: " + recordatorioF; Notificaciones.BalloonTipText = "Pulsame para mas detalles"; Notificaciones.ShowBalloonTip(10000); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } break; } case 2: { try { string imagepath = Path.Combine(Application.StartupPath, @"..\..\imagenes\icono.ico"); notifyIcon1.Icon = new System.Drawing.Icon(imagepath); notifyIcon1.Text = "Recordatorio de evento"; notifyIcon1.Tag = idE; notifyIcon1.Visible = true; notifyIcon1.BalloonTipTitle = "Recordatorio de evento: " + recordatorioF; notifyIcon1.BalloonTipText = "Pulsame para mas detalles"; notifyIcon1.ShowBalloonTip(10000); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } break; } case 3: { try { string imagepath = Path.Combine(Application.StartupPath, @"..\..\imagenes\icono.ico"); notifyIcon2.Icon = new System.Drawing.Icon(imagepath); notifyIcon2.Text = "Recordatorio de evento"; notifyIcon2.Tag = idE; notifyIcon2.Visible = true; notifyIcon2.BalloonTipTitle = "Recordatorio de evento: " + recordatorioF; notifyIcon2.BalloonTipText = "Pulsame para mas detalles"; notifyIcon2.ShowBalloonTip(10000); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } break; } case 4: { try { string imagepath = Path.Combine(Application.StartupPath, @"..\..\imagenes\icono.ico"); notifyIcon3.Icon = new System.Drawing.Icon(imagepath); notifyIcon3.Text = "Recordatorio de evento"; notifyIcon3.Tag = idE; notifyIcon3.Visible = true; notifyIcon3.BalloonTipTitle = "Recordatorio de evento: " + recordatorioF; notifyIcon3.BalloonTipText = "Pulsame para mas detalles"; notifyIcon3.ShowBalloonTip(10000); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } break; } case 5: { try { string imagepath = Path.Combine(Application.StartupPath, @"..\..\imagenes\icono.ico"); notifyIcon4.Icon = new System.Drawing.Icon(imagepath); notifyIcon4.Text = "Recordatorio de evento"; notifyIcon4.Tag = idE; notifyIcon4.Visible = true; notifyIcon4.BalloonTipTitle = "Recordatorio de evento: " + recordatorioF; notifyIcon4.BalloonTipText = "Pulsame para mas detalles"; notifyIcon4.ShowBalloonTip(10000); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } break; } } nRec++; } } }