protected override void DoExecute(IShell shell)
 {
     if (shell.HasActiveDocument)
     {
         SafeExecutionContext.Execute((Form)shell.Owner, () =>
         {
             var setting = this.SettingProvider.GetExtensionSetting<InsertSourceCodeSetting>();
             var insertCodeDialog = new FrmInsertSourceCode(setting);
             if (insertCodeDialog.ShowDialog() == DialogResult.OK)
             {
                 shell.InsertHtml(insertCodeDialog.SourceCodeTag);
             }
         });
     }
     else
     {
         MessageBox.Show(Resources.NoActiveNoteOpened, Resources.Error, MessageBoxButtons.OK,
             MessageBoxIcon.Error);
     }
 }
 protected override void DoExecute(IShell shell)
 {
     if (shell.HasActiveDocument)
     {
         SafeExecutionContext.Execute((Form)shell.Owner, () =>
         {
             var setting          = this.SettingProvider.GetExtensionSetting <InsertSourceCodeSetting>();
             var insertCodeDialog = new FrmInsertSourceCode(setting);
             if (insertCodeDialog.ShowDialog() == DialogResult.OK)
             {
                 shell.InsertHtml(insertCodeDialog.SourceCodeTag);
             }
         });
     }
     else
     {
         MessageBox.Show(Resources.NoActiveNoteOpened, Resources.Error, MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }