コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:FigmaSharp.FigmaFile"/> class.
        /// </summary>
        /// <param name="file">File.</param>
        /// <param name="figmaViewConverters">Figma view converters.</param>
        public FigmaFile(string file, NodeConverter[] figmaViewConverters, ViewPropertyConfigureBase propertyConfigure)
        {
            this.file = file;

            ContentView = AppContext.Current.CreateEmptyView();
            FigmaImages = new List <IImageView>();

            if (propertyConfigure == null)
            {
                propertyConfigure = AppContext.Current.GetViewPropertyConfigure();
            }

            var assembly = System.Reflection.Assembly.GetCallingAssembly();

            figmaLocalFileProvider = new AssemblyResourceNodeProvider(assembly, file);
            rendererService        = new ViewRenderService(figmaLocalFileProvider, figmaViewConverters, propertyConfigure);
        }
コード例 #2
0
ファイル: ViewRenderService.cs プロジェクト: kblok/FigmaSharp
 public ViewRenderService(INodeProvider figmaProvider, NodeConverter[] figmaViewConverters, ViewPropertyConfigureBase propertySetter, ITranslationService translationService = null) :
     base(figmaProvider, figmaViewConverters ?? AppContext.Current.GetFigmaConverters(), translationService)
 {
     this.PropertySetter = propertySetter;
 }
コード例 #3
0
 public ControlViewRenderingService(INodeProvider figmaProvider, NodeConverter[] figmaViewConverters = null, ViewPropertyConfigureBase propertySetter = null, ITranslationService translationService = null)
     : base(figmaProvider,
            figmaViewConverters ?? FigmaControlsContext.Current.GetConverters(),
            propertySetter ?? FigmaControlsContext.Current.GetViewPropertySetter(), translationService
            )
 {
 }
コード例 #4
0
 public FigmaStoryboard(NodeConverter[] figmaViewConverters = null, ViewPropertyConfigureBase propertySetter = null) : base("FigmaStoryboard.figma", figmaViewConverters, propertySetter)
 {
     InitializeComponent();
 }