using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DiagramUI.Interfaces;
using Diagram.UI.Interfaces;
namespace Diagram.UI.Factory
{
public static class StaticFactoryPerformer
{
/// <summary>
/// Default label factoty
/// </summary>
static private IDefaultLabelFactory labelFactory;
/// <summary>
/// Default label factoty
/// </summary>
static public IDefaultLabelFactory Factory
{
get
{
return labelFactory;
}
set
{
labelFactory = value;
}
}
/// <summary>
/// Performs start stop action
/// </summary>
/// <param name="desktop">Desktop</param>
/// <param name="type">Action type</param>
/// <param name="start">True in start and false in stop</param>
static public void Action(IDesktop desktop, object type, bool start)
{
ICollection<object> comp = desktop.AllComponents;
foreach (object o in comp)
{
if (o is IStartStop)
{
IStartStop ss = o as IStartStop;
ss.Action(type, start);
}
}
}
}
}