All pastes #491158 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-16 13:49 UTC
rendered paste body
  99 			#if WIN32
  100 				contextMenu = new System.Windows.Forms.ContextMenu();
  101 				contextMenu.Popup += new EventHandler(on_trayicon_popup);
  102 
  103 				trayIcon = new System.Windows.Forms.NotifyIcon();
  104 				trayIcon.Text = Title;
  105 				trayIcon.ContextMenu = contextMenu;
  106 				trayIcon.Icon = new System.Drawing.Icon("openvpn-admin.ico");
  107 				trayIcon.DoubleClick += new EventHandler(on_trayicon_click);
  108 				trayIcon.Visible = true;
  109 			#else
  110 				#if !MAEMO
  111 					EventBox eb = new EventBox();
  112 					eb.Add(new Gtk.Image(Icon.ScaleSimple(24, 24, Gdk.InterpType.Hyper)));
  113 					eb.ButtonPressEvent += new ButtonPressEventHandler(on_trayicon_mouseclick);
  114 
  115 					TrayIcon icon = new TrayIcon("OpenVPN Admin");
  116 					icon.Add(eb);
  117 					icon.ShowAll();
  118 				#endif
  119 			#endif