Пример #1
0
        public static void LoadFigmaFromResource(this NSView contentView, string resource, out List <FigmaImageView> figmaImageViews, Assembly assembly = null, string viewName = null, string nodeName = null)
        {
            figmaImageViews = new List <FigmaImageView>();
            var template    = FigmaHelper.GetManifestResource(assembly, resource);
            var figmaDialog = FigmaHelper.GetFigmaDialogFromContent(template, viewName, nodeName);

            LoadFigmaFromFrameEntity(contentView, figmaDialog, figmaImageViews, viewName, nodeName);
        }
Пример #2
0
        public void Initialize()
        {
            try {
                Console.WriteLine($"Reading {file} from resources");
                var template = FigmaHelper.GetManifestResource(GetType().Assembly, file);

                Document = FigmaHelper.GetFigmaDialogFromContent(template);
                Console.WriteLine($"Reading successfull");

                FigmaImages = new List <FigmaImageView> ();

                ContentView = new NSView();
                //Reload ();
            } catch (Exception ex) {
                Console.WriteLine($"Error reading resource");
                Console.WriteLine(ex);
            }
        }