public TrayMenu(NotifyIcon uiTrayIcon) { // Notify icon this._notifyIcon = uiTrayIcon; this._notifyIcon.MouseUp += this.NotifyIcon_OnMouseUp; // Notify icon context menu this._notifyIcon.ContextMenuStrip.Opening += this.ContextMenuStrip_OnOpening; this._notifyIcon.ContextMenuStrip.Renderer = new WtToolStripMenuRenderer(); // Update menu items state timer this._updateTimer = new Timer { Interval = 1000 }; this._updateTimer.Tick += this.UpdateTimer_OnTick; this._updateTimer.Start(); this._menuGenerator = new MenuGenerator(this); this._showContextMenuMethod = typeof(NotifyIcon).GetMethod("ShowContextMenu", FLAGS); // Config / theme subscription ConfigManager.Instance.ConfigSaved += this.ConfigManager_OnConfigSaved; ResourcesProcessor.ThemeChanged += this.ResourcesProcessor_OnThemeChanged; this.RecreateMenu(); this.UpdateTrayIcon(); }
public override Gtk.MenuItem GetMenuItem(object parent) { Gtk.MenuItem item = base.GetMenuItem (parent); menu_generator = (IMenuGenerator) Addin.CreateInstance (command_type); item.Submenu = menu_generator.GetMenu (); item.Activated += menu_generator.OnActivated; return item; }
public override Gtk.MenuItem GetMenuItem(object parent) { Gtk.MenuItem item = base.GetMenuItem(parent); menu_generator = (IMenuGenerator)Addin.CreateInstance(command_type); item.Submenu = menu_generator.GetMenu(); item.Activated += menu_generator.OnActivated; return(item); }
/// <summary> /// Initializes a new instance of the <see cref="Janna"/> class. /// </summary> public Janna() { this.JannaMenuGenerator = new JannaMenuGenerator(); Obj_AI_Base.OnProcessSpellCast += this.OnProcessSpellCast; Events.OnGapCloser += this.OnGapcloser; Events.OnTurretAttack += this.OnTurretAttack; Events.OnInterruptableTarget += this.OnInterruptableTarget; Events.OnTeleport += this.OnTeleport; }
private List<MenuItem> GetItemsByRestaurantType(IMenuGenerator menuGenerator, string restaurantType) { switch (restaurantType) { case "Diner": return menuGenerator.GetDinerItems(); case "EveningOnly": return menuGenerator.GetEveningOnlyItems(); case "AllDay": return menuGenerator.GetAllDayItems(); } return null; }
/// <summary> /// Initializes a new instance of the <see cref="Janna"/> class. /// </summary> public Janna() { this.JannaMenuGenerator = new JannaMenuGenerator(); }
public GenerateRandomMenuHandler(IMenuGenerator generator) { _generator = generator; }
/// <summary> /// Creates instance of ShooterDemoUserInterface /// </summary> /// <param name="engine"></param> public ShooterInterface(Game game) { this.Game = game; ShowMenu = true; menuGenerator = new MenuGenerator(game); }
public FindRecipeHandler(IMenuGenerator generator) { _generator = generator; }