Пример #1
0
 public static FigmaBundle FromDirectoryPath(string fullPath)
 {
     try {
         var bundle = new FigmaBundle();
         bundle.Load(fullPath);
         return(bundle);
     } catch (Exception ex) {
         Console.WriteLine(ex);
         //not a bundle
         return(null);
     }
 }
Пример #2
0
 public static FigmaBundle FromDirectoryPath(string fullPath)
 {
     try {
         var bundle = new FigmaBundle();
         bundle.Load(fullPath);
         return(bundle);
     } catch (Exception ex) {
         LoggingService.LogError("[FIGMA] Error", ex);
         //not a bundle
         return(null);
     }
 }
Пример #3
0
        public static FigmaBundle Empty(string fileId, FigmaFileVersion version, string directoryPath, string nameSpace = null)
        {
            var bundle = new FigmaBundle()
            {
                DirectoryPath = directoryPath,
                Version       = version,
            };

            bundle.Manifest = new FigmaManifest()
            {
                ApiVersion       = AppContext.Current.Version,
                RemoteApiVersion = AppContext.Api.Version.ToString(),
                Date             = DateTime.Now,
                FileId           = fileId,
            };

            if (!string.IsNullOrEmpty(nameSpace))
            {
                bundle.Manifest.Namespace = bundle.Namespace = nameSpace;
            }

            return(bundle);
        }
Пример #4
0
 public FigmaContainerBundleWindow(FigmaBundle figmaBundle, string viewName, FigmaNode figmaNode) : base(figmaBundle, viewName, figmaNode)
 {
 }
Пример #5
0
 public FigmaBundleViewBase GetBundleView(FigmaBundle bundle, string name, FigmaNode figmaNode)
 => figmaDelegate.GetBundleView(bundle, name, figmaNode);
Пример #6
0
 public FigmaBundleView(FigmaBundle figmaBundle, string viewName, FigmaNode figmaNode) : base(figmaBundle, viewName, figmaNode)
 {
 }
Пример #7
0
 public FigmaBundleViewBase(FigmaBundle figmaBundle, string viewName, Models.FigmaNode figmaNode)
 {
     Name      = viewName;
     bundle    = figmaBundle;
     FigmaNode = figmaNode;
 }