aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/TaskBarController.cs
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-05-01 10:19:09 +0100
committerGitHub <[email protected]>2017-05-01 10:19:09 +0100
commit33373a873ffb0717cb153b5613514fe4478a0ec1 (patch)
treea27d8aa1874c65fa7c72e9e330d04db6f0af6963 /TimeHACK.Engine/TaskBarController.cs
parent93c445239c7d28a6cee7147d7b6dbe3c7f0974f9 (diff)
parent0a7c2d4dc020b58dacf1d0cf50403d101f176d72 (diff)
downloadhistacom2-33373a873ffb0717cb153b5613514fe4478a0ec1.tar.gz
histacom2-33373a873ffb0717cb153b5613514fe4478a0ec1.tar.bz2
histacom2-33373a873ffb0717cb153b5613514fe4478a0ec1.zip
Merge pull request #58 from Alex-TIMEHACK/master
Finished my taskbar!!!
Diffstat (limited to 'TimeHACK.Engine/TaskBarController.cs')
-rw-r--r--TimeHACK.Engine/TaskBarController.cs58
1 files changed, 58 insertions, 0 deletions
diff --git a/TimeHACK.Engine/TaskBarController.cs b/TimeHACK.Engine/TaskBarController.cs
new file mode 100644
index 0000000..3ede876
--- /dev/null
+++ b/TimeHACK.Engine/TaskBarController.cs
@@ -0,0 +1,58 @@
+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(string 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 (form.Tag.ToString() != "ignoreFormOnTaskbar")
+ {
+ AppsList.Add(form);
+ }
+ }
+ return AppsList;
+ }
+
+ public void FocusAppFromID(string ApplicationID)
+ {
+
+ foreach (Form form in Application.OpenForms)
+ {
+ if (form.Tag.ToString() == ApplicationID)
+ {
+ form.Show();
+ form.BringToFront();
+ form.Focus();
+ return;
+ }
+ }
+ }
+ }
+}