-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gustavo.gvs
authored and
gustavo.gvs
committed
Sep 15, 2023
1 parent
447cc3e
commit f6ff3eb
Showing
25 changed files
with
1,201 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Microsoft.Office.Core; | ||
using Microsoft.Office.Interop.Word; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace PeriTAB | ||
{ | ||
internal class Class_DocumentBeforeClose_Event | ||
{ | ||
public void Evento_DocumentBeforeClose() | ||
{ | ||
Globals.ThisAddIn.Application.DocumentBeforeClose += new ApplicationEvents4_DocumentBeforeCloseEventHandler(Metodo_DocumentBeforeClose); | ||
} | ||
private void Metodo_DocumentBeforeClose(Document Doc, ref bool Cancel) | ||
{ | ||
//Class_New_or_Open_Event.list_TaskPane.Remove(Class_New_or_Open_Event.TaskPane_1); | ||
//bool b = Globals.ThisAddIn.CustomTaskPanes.Remove(Class_New_or_Open_Event.TaskPane_1); | ||
try | ||
{ | ||
Microsoft.Office.Tools.CustomTaskPane CTP = Class_New_or_Open_Event.Dicionario_Doc_e_TaskPane[Doc]; | ||
//bool b = Globals.ThisAddIn.CustomTaskPanes.Remove(CTP); | ||
Globals.ThisAddIn.CustomTaskPanes.Remove(CTP); | ||
Class_New_or_Open_Event.Dicionario_Doc_e_TaskPane.Remove(Doc); | ||
Globals.ThisAddIn.Dicionario_Doc_e_UserControl.Remove(Doc); | ||
} | ||
catch (System.Collections.Generic.KeyNotFoundException ex) { } | ||
//if (b) MessageBox.Show("Taskpane removed"); | ||
} | ||
} | ||
} |
Oops, something went wrong.