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);
            }
        }
Exemple #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);
            }
        }
        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);
            }
        }
 void Session_ReloadFinished(object sender, EventArgs e)
 {
     ReloadFinished?.Invoke(this, EventArgs.Empty);
 }