Files
Oogynize/Client Services/GUIWPForms/GUIState.cs

56 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Foo Namespaces
using Foo.DataAccessLayer;
using Foo.DataAccessLayer.DataTypes;
using System.Windows;
namespace Foo.ClientServices.GUIWPForms
{
/// <summary>
/// Used to save GUI State Information for all of GUIWPForms,
/// such as last selected SortOrder etc. ~very useful for having multiple forms
/// communicate with each other * C# Singleton #
/// </summary>
public static class GUIState
{
// WorkspaceSelector_StandardPage comboBox Workspace SortOrder
public static SortOrderForWorkspaces LastSelectedSotOrderWorkspaces { get; set; }
public static int LastSelectedSotOrderWorkspacesIndex { get; set; }
// WorkspaceSelector_StandardPage dataGrid Selected WorkspaceName
public static string LastSelectedWorkspaceName { get; set; }
// ArtifactWall
public static SortOrderForArtifacts LastSelectedSotOrderArtifacts { get; set; }
public static int LastSelectedSotOrderArtifactsIndex { get; set; }
// Keeping track of launched WPF GUI's
public static Window CurrentlyShowingWPFWindow { get; set; }
/// <summary>
/// Defaults
/// </summary>
static GUIState()
{
// Defaults for comboBox Workspace SortOrder
LastSelectedSotOrderWorkspaces = SortOrderForWorkspaces.Ascending;
LastSelectedSotOrderWorkspacesIndex = 0;
// Defaults for Selected WorkspaceName
LastSelectedWorkspaceName = String.Empty;
// Artifact Wall
LastSelectedSotOrderArtifacts = SortOrderForArtifacts.Ascending;
LastSelectedSotOrderArtifactsIndex = 0;
// Keeping track of launched WPF GUI's
CurrentlyShowingWPFWindow = null;
}
}
}