From 2104f401ec9affd04be4ca27e5acc99168bad414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Mon, 17 Jul 2017 08:28:18 +0200 Subject: [PATCH] Working on multiple instance and multiple application layout of taskbar. --- .../Behaviour/StartupController.cs | 23 ++++++++++- .../Controls/ApplicationButton.xaml | 13 +++++-- .../Controls/ApplicationButton.xaml.cs | 15 +++++--- .../ApplicationInstanceButton.xaml.cs | 2 +- SafeExamBrowser.UserInterface/Taskbar.xaml | 8 +++- SafeExamBrowser.UserInterface/Taskbar.xaml.cs | 33 +++++++++++++++- SafeExamBrowser/App.cs | 38 +++++++++---------- 7 files changed, 98 insertions(+), 34 deletions(-) diff --git a/SafeExamBrowser.Core/Behaviour/StartupController.cs b/SafeExamBrowser.Core/Behaviour/StartupController.cs index f25bfaab..86d40035 100644 --- a/SafeExamBrowser.Core/Behaviour/StartupController.cs +++ b/SafeExamBrowser.Core/Behaviour/StartupController.cs @@ -171,16 +171,35 @@ namespace SafeExamBrowser.Core.Behaviour private void InitializeBrowser() { - var browserButton = uiFactory.CreateApplicationButton(browserInfo); - logger.Info("Initializing browser."); splashScreen.UpdateText(Key.SplashScreen_InitializeBrowser); + var browserButton = uiFactory.CreateApplicationButton(browserInfo); + browserController.RegisterApplicationButton(browserButton); // TODO taskbar.AddButton(browserButton); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.AddButton(uiFactory.CreateApplicationButton(browserInfo)); + taskbar.SetPosition(500, 500); } private void FinishInitialization() diff --git a/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml b/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml index 57c6041d..f028afc1 100644 --- a/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml +++ b/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml @@ -4,15 +4,20 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Controls" + xmlns:s="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" d:DesignHeight="40" d:DesignWidth="50"> - - + + - - + + + 5 + + +