aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/TaskBarController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'TimeHACK.Engine/TaskBarController.cs')
-rw-r--r--TimeHACK.Engine/TaskBarController.cs43
1 files changed, 43 insertions, 0 deletions
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<Form> GetAllOpenApps()
+ {
+ List<Form> AppsList = new List<Form>();
+ foreach (Form form in Application.OpenForms)
+ {
+ if ((string)form.Tag != "ignoreFormOnTaskbar")
+ {
+ AppsList.Add(form);
+ }
+ }
+
+ return AppsList;
+ }
+ }
+}