public static Skin Load(IGraphicsObjectFactory objectFactory, string fileName) { var document = Parser.Load(fileName); var skinMapper = new SkinMapper(objectFactory); return(skinMapper.Instantiate(document)); }
public static Skin Load(IGraphicsObjectFactory objectFactory, Stream stream, Encoding encoding) { var document = Parser.Parse(stream, encoding); var skinMapper = new SkinMapper(objectFactory); return(skinMapper.Instantiate(document)); }
public UIMapper(IGraphicsObjectFactory factory) { this.factory = factory; RegisterConverters(this); this.RegisterConverter <IPicture>(new PictureConverter(factory)); this.RegisterType <Button>(); this.RegisterType <Label>(); this.RegisterType <Image>(); }
private static Form Create(MarkupDocument document, IGraphicsObjectFactory factory) { var mapper = new UIMapper(factory); lock (customTypes) { foreach (var ctype in customTypes) { mapper.RegisterType(ctype.Value, ctype.Key); } } return(mapper.Instantiate(document)); }
public SkinMapper(IGraphicsObjectFactory objectFactory) { this.RegisterType <Skin>(); this.RegisterType <Style>(); this.RegisterType <State>(); this.RegisterConverter <IFont>(new FontConverter(objectFactory)); this.RegisterConverter <IBrush>(new BrushConverter(objectFactory)); this.RegisterConverter <IPicture>(new PictureConverter(objectFactory)); // this.RegisterType<TextureBrushDescriptor>("Texture"); // this.RegisterType<SolidBrushDescriptor>("Color"); // this.RegisterType<TextureBoxBrushDescriptor>("TextureBox"); this.RegisterConverter <Thickness, ThicknessConverter>(); UIMapper.RegisterConverters(this); }
public FontConverter(IGraphicsObjectFactory objectFactory) { this.objectFactory = objectFactory; }
public PictureConverter(IGraphicsObjectFactory objectFactory) { this.objectFactory = objectFactory; }
public static Form Load(Stream stream, System.Text.Encoding encoding, IGraphicsObjectFactory factory) { var document = Parser.Parse(stream, encoding); return(Create(document, factory)); }
public static Form Load(string fileName, IGraphicsObjectFactory factory) { var document = Parser.Load(fileName); return(Create(document, factory)); }
public Form(IGraphicsObjectFactory factory) : base(new UIMapper(factory)) { }
public BrushConverter(IGraphicsObjectFactory objectFactory) { this.objectFactory = objectFactory; }