public WindowListPlugin(TPanel panel, PluginConfig cfg) : base(panel, cfg) { buttonTable = new PanelButtonTable(Orientation.Horizontal); //box.HeightRequest = panel.height; Update(); ShellManager.Current.WindowActivated += (wnd) => { var bt = GetButton(wnd); if (bt != null) { CoreLib.Log("act"); Application.Invoke((s, e) => { foreach (var b in buthash2.Values) { b.Active = bt == b; } }); //bt.Toggle(); } }; ShellManager.Current.WindowDestroyed += (wnd) => { var bt = GetButton(wnd); if (bt != null) { buthash2.Remove(wnd); buttonTable.Remove(bt); bt.Dispose(); } }; ShellManager.Current.WindowCreated += (wnd) => { if (wnd.ShowInTaskbar()) createButton(wnd); }; }
public MenuPlugin(TPanel panel, PluginConfig cfg) : base(panel, cfg) { button = new ToggleButton(); button.Add(new Label("Menu")); button.Clicked += (s, e) => { if (button.Active) Open(); else Close(); }; }
public ClockPlugin(TPanel panel, PluginConfig cfg) : base(panel, cfg) { button = new ToggleButton(); button.Add(new Label("DateTime")); /* button.Clicked += (s, e) => { if (button.Active) Open(); else Close(); };*/ button.Clicked += (s, e) => { CoreLib.Signal("test"); }; }