Ejemplo n.º 1
0
        public void Show(IPluginInterface pluginInterface)
        {
            string path = pluginInterface.GetTemp(templateType + ".html");

            var tryoutConsole = pluginInterface.Settings.Get <bool>(templateType + ".console");

            var clone = pluginInterface.Timetable.Clone();

            var tsk = export.GetAsyncSafeExport(clone, path, pluginInterface, tryoutConsole ? new[] { DefaultTemplateExport.FLAG_TYROUT_CONSOLE } : Array.Empty <string>());

            tsk.ContinueWith((t, o) =>
            {
                if (t.Result)
                {
                    Application.Instance.Invoke(() => pluginInterface.OpenUrl(path, true));
                }
            }, null, TaskScheduler.Default);
            tsk.Start();
        }