diff --git a/MP-II/Resources/GUITestPlugin/GUITestModel.cs b/MP-II/Resources/GUITestPlugin/GUITestModel.cs
index 84142ca6259..52956bd7d16 100644
--- a/MP-II/Resources/GUITestPlugin/GUITestModel.cs
+++ b/MP-II/Resources/GUITestPlugin/GUITestModel.cs
@@ -24,20 +24,13 @@
using System;
using System.Collections.Generic;
-using MediaPortal.Core;
-using MediaPortal.Core.General;
-using MediaPortal.Core.MediaManagement;
-using MediaPortal.Core.Services.MediaManagement;
-using MediaPortal.UI.Presentation.DataObjects;
using MediaPortal.UI.Presentation.Models;
-using MediaPortal.UI.Presentation.Players;
-using MediaPortal.UI.Presentation.Screens;
using MediaPortal.UI.Presentation.Workflow;
namespace Test.GUITestPlugin
{
///
- /// Model which holds the GUI state for the GUI test model.
+ /// Model which holds the GUI state for the GUI test state.
///
public class GUITestModel : IWorkflowModel
{
@@ -50,10 +43,6 @@ public class GUITestModel : IWorkflowModel
#endregion
- public GUITestModel()
- {
- }
-
#region IWorkflowModel implementation
public Guid ModelId
diff --git a/MP-II/Resources/GUITestPlugin/GUITestPlugin.csproj b/MP-II/Resources/GUITestPlugin/GUITestPlugin.csproj
index e47d97f22ef..7d56118c8cf 100644
--- a/MP-II/Resources/GUITestPlugin/GUITestPlugin.csproj
+++ b/MP-II/Resources/GUITestPlugin/GUITestPlugin.csproj
@@ -52,6 +52,7 @@
+
@@ -62,6 +63,7 @@
+
diff --git a/MP-II/Resources/GUITestPlugin/Skin/default/screens/gui-test-main.xaml b/MP-II/Resources/GUITestPlugin/Skin/default/screens/gui-test-main.xaml
index d1b411b268c..03f25d55679 100644
--- a/MP-II/Resources/GUITestPlugin/Skin/default/screens/gui-test-main.xaml
+++ b/MP-II/Resources/GUITestPlugin/Skin/default/screens/gui-test-main.xaml
@@ -1,36 +1,50 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Source="screens\master_menu.xaml"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MP-II/Resources/GUITestPlugin/Skin/default/screens/test-treeview.xaml b/MP-II/Resources/GUITestPlugin/Skin/default/screens/test-treeview.xaml
new file mode 100644
index 00000000000..e95fb1ee1ef
--- /dev/null
+++ b/MP-II/Resources/GUITestPlugin/Skin/default/screens/test-treeview.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-actions.xml b/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-actions.xml
index 2ca6ea4834e..0a23ffb02d3 100644
--- a/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-actions.xml
+++ b/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-actions.xml
@@ -8,5 +8,12 @@
SourceState="7F702D9C-F2DD-42da-9ED8-0BA92F07787F"
TargetState="F660C2CA-A340-4694-A7F4-9E68AB9721C4"
DisplayTitle="GUI-Test"/>
+
diff --git a/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-states.xml b/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-states.xml
index aebbbb19253..df860a1d4fa 100644
--- a/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-states.xml
+++ b/MP-II/Resources/GUITestPlugin/Skin/default/workflow/gui-test-states.xml
@@ -5,5 +5,9 @@
Name="GuiTestMain" MainScreen="gui-test-main"
DisplayLabel="GUI-Test"
WorkflowModel="F4FC1599-F412-40d0-82BF-46FC352E93BE"/>
+
diff --git a/MP-II/Resources/GUITestPlugin/TreeViewModel.cs b/MP-II/Resources/GUITestPlugin/TreeViewModel.cs
new file mode 100644
index 00000000000..17bb745cfcc
--- /dev/null
+++ b/MP-II/Resources/GUITestPlugin/TreeViewModel.cs
@@ -0,0 +1,135 @@
+#region Copyright (C) 2007-2008 Team MediaPortal
+
+/*
+ Copyright (C) 2007-2008 Team MediaPortal
+ http://www.team-mediaportal.com
+
+ This file is part of MediaPortal II
+
+ MediaPortal II is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ MediaPortal II is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with MediaPortal II. If not, see .
+*/
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using MediaPortal.UI.Presentation.DataObjects;
+using MediaPortal.UI.Presentation.Models;
+using MediaPortal.UI.Presentation.Workflow;
+
+namespace Test.GUITestPlugin
+{
+ ///
+ /// Model which holds the GUI state for the TreeView state.
+ ///
+ public class TreeViewModel : IWorkflowModel
+ {
+ public const string MODEL_ID_STR = "A6C3F942-105C-48cd-AEFF-059DA79773A9";
+
+ #region Protected fields
+
+ protected ItemsList _tree = null;
+
+ #endregion
+
+ protected void CreateChildren(TreeItem item, int level, int maxLevel)
+ {
+ if (level > maxLevel)
+ return;
+ TreeItem childItem = new TreeItem("Name", "First item, level " + level);
+ CreateChildren(childItem, level + 1, maxLevel);
+ item.SubItems.Add(childItem);
+ childItem = new TreeItem("Name", "Second item, level " + level);
+ CreateChildren(childItem, level + 1, maxLevel);
+ item.SubItems.Add(childItem);
+ childItem = new TreeItem("Name", "Third item, level " + level);
+ CreateChildren(childItem, level + 1, maxLevel);
+ item.SubItems.Add(childItem);
+ }
+
+ protected void InitializeTree()
+ {
+ _tree = new ItemsList();
+ TreeItem item = new TreeItem("Name", "First item");
+ CreateChildren(item, 2, 3);
+ _tree.Add(item);
+ item = new TreeItem("Name", "Second item");
+ CreateChildren(item, 2, 4);
+ _tree.Add(item);
+ item = new TreeItem("Name", "Third item");
+ CreateChildren(item, 2, 5);
+ _tree.Add(item);
+ }
+
+ protected void DisposeTree()
+ {
+ _tree = null;
+ }
+
+ #region Public properties
+
+ public ItemsList Tree
+ {
+ get { return _tree; }
+ }
+
+ #endregion
+
+ #region IWorkflowModel implementation
+
+ public Guid ModelId
+ {
+ get { return new Guid(MODEL_ID_STR); }
+ }
+
+ public bool CanEnterState(NavigationContext oldContext, NavigationContext newContext)
+ {
+ return true;
+ }
+
+ public void EnterModelContext(NavigationContext oldContext, NavigationContext newContext)
+ {
+ InitializeTree();
+ }
+
+ public void ExitModelContext(NavigationContext oldContext, NavigationContext newContext)
+ {
+ DisposeTree();
+ }
+
+ public void ChangeModelContext(NavigationContext oldContext, NavigationContext newContext, bool push)
+ {
+ // We could initialize some data here when changing the media navigation state
+ }
+
+ public void Deactivate(NavigationContext oldContext, NavigationContext newContext)
+ {
+ }
+
+ public void ReActivate(NavigationContext oldContext, NavigationContext newContext)
+ {
+ }
+
+ public void UpdateMenuActions(NavigationContext context, IDictionary actions)
+ {
+ }
+
+ public ScreenUpdateMode UpdateScreen(NavigationContext context, ref string screen)
+ {
+ return ScreenUpdateMode.AutoWorkflowManager;
+ }
+
+ #endregion
+ }
+}
diff --git a/MP-II/Resources/GUITestPlugin/plugin.xml b/MP-II/Resources/GUITestPlugin/plugin.xml
index e4a43f07d89..2e44c6b69bf 100644
--- a/MP-II/Resources/GUITestPlugin/plugin.xml
+++ b/MP-II/Resources/GUITestPlugin/plugin.xml
@@ -13,6 +13,7 @@
+