From 12c253ab76b8117a563b021e969262da13eaec9d Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sun, 30 Apr 2017 15:46:36 +0100 Subject: Half done the taskbars --- TimeHACK.Engine/TaskBarController.cs | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 TimeHACK.Engine/TaskBarController.cs (limited to 'TimeHACK.Engine/TaskBarController.cs') diff --git a/TimeHACK.Engine/TaskBarController.cs b/TimeHACK.Engine/TaskBarController.cs new file mode 100644 index 0000000..a24d73e --- /dev/null +++ b/TimeHACK.Engine/TaskBarController.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Drawing; + +namespace TimeHACK.Engine +{ + public class TaskBarController + { + public static int AvalibleApplicationID; + + public Panel AddTaskbarItem95(int ApplicationID, string ApplicationName, Image ApplicationIcon, UserControl taskbar_item, Panel oldPanel) + { + Panel returnPanel = oldPanel; + + AvalibleApplicationID++; + + taskbar_item.BackgroundImage = ApplicationIcon; + taskbar_item.Tag = ApplicationName; + taskbar_item.Dock = DockStyle.Left; + returnPanel.Controls.Add(taskbar_item); + + return returnPanel; + } + + public List
GetAllOpenApps() + { + List AppsList = new List(); + foreach (Form form in Application.OpenForms) + { + if ((string)form.Tag != "ignoreFormOnTaskbar") + { + AppsList.Add(form); + } + } + + return AppsList; + } + } +} -- cgit v1.2.3