Exemple #1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InternalStartup()
 {
     this.Startup  += new System.EventHandler(ThisAddIn_Startup);
     this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
     InfoPath.ApplicationEvents events = (InfoPath.ApplicationEvents)((InfoPath._Application3)Application).Events;
     events.XDocumentOpen       += new InfoPath._ApplicationEvents_XDocumentOpenEventHandler(ThisXDocument_Open);
     events.XDocumentBeforeSave += new InfoPath._ApplicationEvents_XDocumentBeforeSaveEventHandler(ThisXDocument_BeforeSave);
 }
Exemple #2
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            app3 = (InfoPath._Application3)this.Application;
            appevents = (InfoPath.ApplicationEvents)app3.Events;

            appevents.NewXDocument += new InfoPath._ApplicationEvents_NewXDocumentEventHandler(appevents_NewXDocument);
            appevents.XDocumentOpen += new InfoPath._ApplicationEvents_XDocumentOpenEventHandler(appevents_XDocumentOpen);
            appevents.XDocumentChange += new InfoPath._ApplicationEvents_XDocumentChangeEventHandler(appevents_DocumentChange);

            //appevents.WindowActivate += new InfoPath._ApplicationEvents_WindowActivateEventHandler(InfoPahtApplicationEvents_WindowActivate);
            //appevents.WindowDeactivate += new InfoPath._ApplicationEvents_WindowDeactivateEventHandler(InfoPahtApplicationEvents_WindowDeactivate);

            AddMenu();
            //AddAllQueryServiceTaskPanes();
        }