Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 /// <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;
 }
Exemplo n.º 5
0
 /// <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;
 }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Janna"/> class.
        /// </summary>
        public Janna()
        {
            this.JannaMenuGenerator = new JannaMenuGenerator();

        }
Exemplo n.º 8
0
 public GenerateRandomMenuHandler(IMenuGenerator generator)
 {
     _generator = generator;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Creates instance of ShooterDemoUserInterface
 /// </summary>
 /// <param name="engine"></param>
 public ShooterInterface(Game game)
 {
     this.Game     = game;
     ShowMenu      = true;
     menuGenerator = new MenuGenerator(game);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Janna"/> class.
 /// </summary>
 public Janna()
 {
     this.JannaMenuGenerator = new JannaMenuGenerator();
 }
 public FindRecipeHandler(IMenuGenerator generator)
 {
     _generator = generator;
 }