コード例 #1
0
        public void Reload(IViewWrapper contentView, string file, FigmaViewRendererServiceOptions options)
        {
            try
            {
                rendererService.Start(file, contentView, options);
                distributionService.Start();

                ReloadFinished?.Invoke(this, EventArgs.Empty);
            }
            catch (DirectoryNotFoundException ex)
            {
                Console.WriteLine("[FIGMA.RENDERER] Resource directory not found ({0}). Images will not load", ex.Message);
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
コード例 #2
0
        public void Reload(IView contentView, string file, ViewRenderServiceOptions options)
        {
            try
            {
                rendererService.Start(file, contentView, options);
                distributionService.Run(contentView, rendererService);

                ReloadFinished?.Invoke(this, EventArgs.Empty);
            }
            catch (DirectoryNotFoundException ex)
            {
                LoggingService.LogInfo("[FIGMA.RENDERER] Resource directory not found ({0}). Images will not load", ex.Message);
            }
            catch (System.Exception ex)
            {
                LoggingService.LogError("[FIGMA.RENDERER] Error", ex);
            }
        }
コード例 #3
0
        public async Task ReloadAsync(IView contentView, string file, ViewRenderServiceOptions options)
        {
            try
            {
                await rendererService.StartAsync(file, contentView, options);

                distributionService.Run(contentView, rendererService);

                ReloadFinished?.Invoke(this, EventArgs.Empty);
            }
            catch (DirectoryNotFoundException ex)
            {
                Console.WriteLine("[FIGMA.RENDERER] Resource directory not found ({0}). Images will not load", ex.Message);
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
コード例 #4
0
 void Session_ReloadFinished(object sender, EventArgs e)
 {
     ReloadFinished?.Invoke(this, EventArgs.Empty);
 }