Ejemplo n.º 1
0
 private void Document_FileActionOccurred(object sender, TextDocumentFileActionEventArgs e)
 {
     if (e.FileActionType == FileActionTypes.ContentSavedToDisk)
     {
         if (GenerateHtml.HtmlGenerationEnabled(e.FilePath))
         {
             GenerateHtml.GenerateHtmlFile(e.FilePath);
         }
     }
 }
Ejemplo n.º 2
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            Language = new MarkdownLanguage(this);

            var editorFactory = new EditorFactory(this, typeof(MarkdownLanguage).GUID);

            RegisterEditorFactory(editorFactory);

            await JoinableTaskFactory.SwitchToMainThreadAsync();

            _options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            ErrorList.Initialize(this);
            CopyAsHtmlCommand.Initialize(this);
            AddCustomStylesheet.Initialize(this);
            GenerateHtml.Initialize(this);
        }
Ejemplo n.º 3
0
        protected override void Initialize()
        {
            _options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            ErrorList.Initialize(this);
            CopyAsHtmlCommand.Initialize(this);
            AddCustomStylesheet.Initialize(this);
            GenerateHtml.Initialize(this);

            var serviceContainer = this as IServiceContainer;
            var langService      = new MarkdownLanguage(this);

            serviceContainer.AddService(typeof(MarkdownLanguage), langService, true);

            var editorFactory = new EditorFactory(this, typeof(MarkdownLanguage).GUID);

            RegisterEditorFactory(editorFactory);
        }
Ejemplo n.º 4
0
 public static void Initialize(Package package)
 {
     Instance = new GenerateHtml(package);
 }