void AddSingleContext(MLPlugin _plugin, MLRatContextEntry entry) { ToolStripMenuItem _baseItem = new ToolStripMenuItem(); Image toolstripIcon = getImage(entry.Icon); if (toolstripIcon != null) { _baseItem.Image = toolstripIcon; } _baseItem.Text = entry.Text; _baseItem.Tag = new MLContextData() { Plugin = _plugin, ContextData = entry }; if (entry.OnClick != null) { _baseItem.Click += ContextMenu_Click; } if (entry.SubMenus != null) { foreach (var subentry in entry.SubMenus) { AddMenuItem(_plugin, _baseItem, subentry); } } ClientContextStrip.Items.Add(_baseItem); }
void AddMenuItem(MLPlugin _plugin, ToolStripMenuItem parent, MLRatContextEntry entry) { ToolStripMenuItem _menu = new ToolStripMenuItem(); Image toolstripIcon = getImage(entry.Icon); if (toolstripIcon != null) { _menu.Image = toolstripIcon; } _menu.Text = entry.Text; _menu.Tag = new MLContextData() { Plugin = _plugin, ContextData = entry }; if (entry.OnClick != null) { _menu.Click += ContextMenu_Click; } if (entry.SubMenus != null) { foreach (var subentrys in entry.SubMenus) { AddMenuItem(_plugin, _menu, subentrys); } } parent.DropDownItems.Add(_menu); }
public void OnPluginLoad(IServerUIHandler UIHost) { MLRatContextEntry surv = new MLRatContextEntry(); surv.Text = "Surveillance"; surv.Icon = "camera.png"; surv.SubMenus = new MLRatContextEntry[] { //new MLRatContextEntry(){ Text = "Remote Desktop", OnClick = RemoteDesktopHandler.ContextCallback, Icon="desktop.png" }, new MLRatContextEntry() { Text = "Remote Chat", OnClick = RemoteChatHandler.ContextCallback, Icon="chat.png" } }; UIHost.AddContext(surv); }
public void OnPluginLoad(IServerUIHandler UIHost) { MLRatContextEntry miscContext = new MLRatContextEntry() { Text = "Misc", Icon = "misc.png" }; miscContext.SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Text to speech", Icon = "comment_edit.png", OnClick = MiscHandler.TextToSpeechContextCallback }, new MLRatContextEntry() { Text = "Computer Power", Icon = "power_surge.png", OnClick = MiscHandler.ComputerPowerContextCallback }, new MLRatContextEntry() { Text = "Input", Icon = "lock_edit.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Block Input", Icon = "lock.png", OnClick = MiscHandler.BlockInputContextCallback }, new MLRatContextEntry() { Text = "Allow Input", Icon = "lock_break.png", OnClick = MiscHandler.AllowInputContextCallback } } }, new MLRatContextEntry() { Text = "Taskbar", Icon = "controlbar.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Show", Icon = "show_detail.png", OnClick = MiscHandler.ShowTaskbarContextCallback }, new MLRatContextEntry() { Text = "Hide", Icon = "hide_detail.png", OnClick = MiscHandler.HideTaskbarContextCallback } } } }; UIHost.AddContext(miscContext); }
public void OnPluginLoad(IServerUIHandler UIHost) { MLRatContextEntry surv = new MLRatContextEntry(); surv.Text = "Surveillance"; surv.Icon = "camera.png"; surv.SubMenus = new MLRatContextEntry[] { //new MLRatContextEntry(){ Text = "Remote Desktop", OnClick = RemoteDesktopHandler.ContextCallback, Icon="desktop.png" }, new MLRatContextEntry() { Text = "Remote Chat", OnClick = RemoteChatHandler.ContextCallback, Icon = "chat.png" } }; UIHost.AddContext(surv); }
void AddMenuItem(MLPlugin _plugin, ToolStripMenuItem parent, MLRatContextEntry entry) { ToolStripMenuItem _menu = new ToolStripMenuItem(); Image toolstripIcon = getImage(entry.Icon); if (toolstripIcon != null) _menu.Image = toolstripIcon; _menu.Text = entry.Text; _menu.Tag = new MLContextData() { Plugin = _plugin, ContextData = entry }; if (entry.OnClick != null) _menu.Click += ContextMenu_Click; if (entry.SubMenus != null) { foreach (var subentrys in entry.SubMenus) AddMenuItem(_plugin, _menu, subentrys); } parent.DropDownItems.Add(_menu); }
public void OnPluginLoad(IServerUIHandler UIHost) { MLRatContextEntry miscContext = new MLRatContextEntry() {Text = "Misc", Icon = "misc.png" }; miscContext.SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() {Text="Text to speech", Icon = "comment_edit.png", OnClick = MiscHandler.TextToSpeechContextCallback }, new MLRatContextEntry() {Text="Computer Power", Icon = "power_surge.png", OnClick = MiscHandler.ComputerPowerContextCallback }, new MLRatContextEntry() { Text = "Input", Icon="lock_edit.png", SubMenus=new MLRatContextEntry[] { new MLRatContextEntry() {Text = "Block Input", Icon = "lock.png" , OnClick = MiscHandler.BlockInputContextCallback}, new MLRatContextEntry() {Text = "Allow Input", Icon = "lock_break.png", OnClick = MiscHandler.AllowInputContextCallback } } }, new MLRatContextEntry() {Text = "Taskbar", Icon = "controlbar.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() {Text="Show", Icon = "show_detail.png", OnClick = MiscHandler.ShowTaskbarContextCallback }, new MLRatContextEntry() {Text="Hide", Icon = "hide_detail.png", OnClick = MiscHandler.HideTaskbarContextCallback } } } }; UIHost.AddContext(miscContext); }
public void OnPluginLoad(IServerUIHandler UIHost) { MUIHost = UIHost; FileExplorerHandler.SetUIHost(UIHost); TaskManagerHandler.SetUIHost(UIHost); ConnectionsHandler.SetUIHost(UIHost); UIHost.Log("MLManagement loaded!", System.Drawing.Color.Green); PingHandler.Column = UIHost.AddColumn("Ping", "-"); MLRatContextEntry management = new MLRatContextEntry() { Text = "Management", Icon = "management.png" }; MLRatContextEntry network = new MLRatContextEntry() { Text = "Network", Icon = "network.png" }; management.SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "File Manager", OnClick = FileExplorerHandler.ContextCallback, Icon = "folder_explore.png" }, new MLRatContextEntry() { Text = "Registry Edit", OnClick = RegistryEditorHandler.ContextCallback, Icon = "registry.png" }, new MLRatContextEntry() { Text = "Startup Manager", OnClick = StartupManagerhandler.ContextCallback, Icon = "system_time.png" }, new MLRatContextEntry() { Text = "Task Manager", OnClick = TaskManagerHandler.ContextCallback, Icon = "list.png" }, new MLRatContextEntry() { Text = "Clipboard", OnClick = ClipboardHandler.ContextCallback, Icon = "clipboard.png" }, new MLRatContextEntry() { Text = "Connections", OnClick = ConnectionsHandler.ContextCallback, Icon = "connections.png" }, new MLRatContextEntry() { Text = "Console", OnClick = ConsoleHandler.ContextCallback, Icon = "cmd.png" }, }; network.SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Ping", OnClick = PingHandler.ContextCallback, Icon = "Antena.png" }, new MLRatContextEntry() { Text = "Run", Icon = "monitor-lightning.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Normal", OnClick = MiscHandler.ExecuteContextHandler, Icon = "application-blue-lightining.png" }, new MLRatContextEntry() { Text = "Hidden", OnClick = MiscHandler.ExecuteHiddenContextHandler, Icon = "application-green-lightining.png" }, } }, new MLRatContextEntry() { Text = "Download And Execute", OnClick = MiscHandler.DownloadAndExecuteContextHandler, Icon = "globe.png" }, new MLRatContextEntry() { Text = "Client Executable", Icon = "cog.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Disconnect Client", OnClick = MiscHandler.DisconnectHandler, Icon = "disconnect.png" }, new MLRatContextEntry() { Text = "Restart Client", OnClick = MiscHandler.RestartContextHandler, Icon = "restart.png" }, new MLRatContextEntry() { Text = "Close Client", OnClick = MiscHandler.CloseContextHandler, Icon = "cross.png" } } }, }; UIHost.AddContext(network, management); }
public void OnPluginLoad(IServerUIHandler UIHost) { MUIHost = UIHost; FileExplorerHandler.SetUIHost(UIHost); TaskManagerHandler.SetUIHost(UIHost); ConnectionsHandler.SetUIHost(UIHost); UIHost.Log("MLManagement loaded!", System.Drawing.Color.Green); PingHandler.Column = UIHost.AddColumn("Ping", "-"); MLRatContextEntry management = new MLRatContextEntry() { Text = "Management", Icon = "management.png" }; MLRatContextEntry network = new MLRatContextEntry() { Text = "Network", Icon = "network.png" }; management.SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "File Manager", OnClick = FileExplorerHandler.ContextCallback, Icon="folder_explore.png" }, new MLRatContextEntry() {Text = "Registry Edit", OnClick = RegistryEditorHandler.ContextCallback, Icon="registry.png" }, new MLRatContextEntry() {Text = "Startup Manager", OnClick = StartupManagerhandler.ContextCallback, Icon="system_time.png" }, new MLRatContextEntry() { Text = "Task Manager", OnClick = TaskManagerHandler.ContextCallback, Icon="list.png" }, new MLRatContextEntry() { Text = "Clipboard", OnClick = ClipboardHandler.ContextCallback, Icon="clipboard.png" }, new MLRatContextEntry() { Text = "Connections", OnClick = ConnectionsHandler.ContextCallback, Icon="connections.png" }, new MLRatContextEntry() { Text = "Console", OnClick = ConsoleHandler.ContextCallback, Icon="cmd.png" }, }; network.SubMenus = new MLRatContextEntry[] { new MLRatContextEntry(){Text = "Ping", OnClick = PingHandler.ContextCallback, Icon="Antena.png"}, new MLRatContextEntry(){Text = "Run", Icon="monitor-lightning.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() {Text = "Normal", OnClick = MiscHandler.ExecuteContextHandler, Icon = "application-blue-lightining.png" }, new MLRatContextEntry() {Text = "Hidden", OnClick = MiscHandler.ExecuteHiddenContextHandler, Icon = "application-green-lightining.png" }, } }, new MLRatContextEntry(){Text = "Download And Execute", OnClick = MiscHandler.DownloadAndExecuteContextHandler, Icon="globe.png"}, new MLRatContextEntry() { Text = "Client Executable", Icon="cog.png", SubMenus = new MLRatContextEntry[] { new MLRatContextEntry() { Text = "Disconnect Client", OnClick = MiscHandler.DisconnectHandler, Icon="disconnect.png" }, new MLRatContextEntry() { Text = "Restart Client", OnClick = MiscHandler.RestartContextHandler, Icon="restart.png" }, new MLRatContextEntry() { Text = "Close Client", OnClick = MiscHandler.CloseContextHandler, Icon="cross.png" } }}, }; UIHost.AddContext(network, management); }
void AddSingleContext(MLPlugin _plugin, MLRatContextEntry entry) { ToolStripMenuItem _baseItem = new ToolStripMenuItem(); Image toolstripIcon = getImage(entry.Icon); if (toolstripIcon != null) _baseItem.Image = toolstripIcon; _baseItem.Text = entry.Text; _baseItem.Tag = new MLContextData() { Plugin = _plugin, ContextData = entry }; if (entry.OnClick != null) _baseItem.Click += ContextMenu_Click; if (entry.SubMenus != null) { foreach (var subentry in entry.SubMenus) AddMenuItem(_plugin, _baseItem, subentry); } ClientContextStrip.Items.Add(_baseItem); }
void OncontextAdd(MLPlugin _plugin, MLRatContextEntry[] entry) { foreach(MLRatContextEntry contextentry in entry) { AddSingleContext(_plugin, contextentry); } }