CtrEditor/ObjetosSim/UserControlFactory.cs

27 lines
615 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace CtrEditor.ObjetosSim
{
public static class UserControlFactory
{
public static UserControl GetControlForType(Type tipoObjeto)
{
if (tipoObjeto == typeof(osBotella))
return new ucBotella();
if (tipoObjeto == typeof(osTransporteTTop))
return new ucTransporteTTop();
// Puedes añadir más condiciones para otros tipos
return null;
}
}
}