You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1007 B
41 lines
1007 B
using GummingCommon;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Gumming
|
|
{
|
|
public class ViewModelLoad
|
|
{
|
|
public static List<ViewModelBase> models = new List<ViewModelBase>();
|
|
|
|
public static void SetActiveModel(ViewModelBase model)
|
|
{
|
|
if (!models.Contains(model))
|
|
{
|
|
models.Add(model);
|
|
}
|
|
for (int i = 0; i < models.Count; i++)
|
|
{
|
|
models[i].IsActivePage = false;
|
|
}
|
|
model.IsActivePage = true;
|
|
}
|
|
|
|
public static void SetActiveChildModel(ViewModelBase model)
|
|
{
|
|
if (!models.Contains(model))
|
|
{
|
|
models.Add(model);
|
|
}
|
|
for (int i = 0; i < models.Count; i++)
|
|
{
|
|
models[i].IsActiveChildPage = false;
|
|
}
|
|
model.IsActiveChildPage = true;
|
|
}
|
|
}
|
|
}
|