27 lines
615 B
C#
27 lines
615 B
C#
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;
|
|
}
|
|
}
|
|
|
|
}
|