using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.Json.Serialization; using System.Threading.Tasks; using System.Windows.Controls; namespace CtrEditor.ObjetosSim { public interface IosBase { string Nombre { get; } void Update(); } public abstract class osBase : IosBase { private UserControl? _visualRepresentation = null; [JsonIgnore] public UserControl? VisualRepresentation { get => _visualRepresentation; set => _visualRepresentation = value; } // Método para inicializar la representación visual, si es necesario //public void InitializeVisualRepresentation() //{ // // Suponiendo que existe un método estático para obtener el UserControl adecuado // _visualRepresentation = UserControlFactory.GetControlForType(this.GetType()); //} public string Nombre => "Base"; public abstract void Update(); public bool Inicializado = false; public double Left { get; set; } public double Top { get; set; } } }