You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
681 B
C#
31 lines
681 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Rs.MotionPlat
|
|
{
|
|
public class ActiveForms
|
|
{
|
|
private static Dictionary<string, BaseForm> forms = new Dictionary<string, BaseForm>();
|
|
|
|
public static void Add(BaseForm form)
|
|
{
|
|
if(!forms.ContainsKey(form.Name))
|
|
{
|
|
forms.Add(form.Name, form);
|
|
}
|
|
}
|
|
|
|
public static BaseForm Get(string formName)
|
|
{
|
|
if (forms.ContainsKey(formName))
|
|
{
|
|
return forms[formName];
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|