コード例 #1
0
        /// <summary>
        /// Open protected workbook event
        /// </summary>
        void OnProtectedExcelWorkbookOpen(ExcelInterop.ProtectedViewWindow Pvw)
        {
            AddNewTaskPane(protectedWorkbookIdentifier + Pvw.Workbook.Name);

            //When CSV files are opened. Events are fired in wrong order!
            //Workbook Activate is caled before Workbook Open. We require Activate to be called *after* Open
            //TODO: Need to investigate why this is so
            if (Pvw.Workbook.FileFormat == ExcelInterop.XlFileFormat.xlCSV)
            {
                OnProtectedExcelWorkbookActivate(Pvw);
            }
        }
コード例 #2
0
 private void ProtectedViewWindowOpen(Excel.ProtectedViewWindow Pvw)
 {
     // set UI as nonfunctional
     setUIState(null);
 }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 void OnProtectedExcelWorkbookBeforeClose(ExcelInterop.ProtectedViewWindow Pvw, ExcelInterop.XlProtectedViewCloseReason Reason, ref bool Cancel)
 {
     RemoveTaskPane(protectedWorkbookIdentifier + Pvw.Workbook.Name);
 }
コード例 #4
0
 /// <summary>
 /// On protected excel workbook activate
 /// </summary>
 void OnProtectedExcelWorkbookActivate(ExcelInterop.ProtectedViewWindow Pvw)
 {
     SetCurrentTaskPane(protectedWorkbookIdentifier + Pvw.Workbook.Name);
 }