Esempio n. 1
0
 private void CallTaskPaneDockPositionStateChange(NetOffice.OfficeApi._CustomTaskPane customTaskPaneInst)
 {
     try
     {
         foreach (TaskPaneInfo item in TaskPanes)
         {
             if (item.Pane == customTaskPaneInst)
             {
                 try
                 {
                     ITaskPane target = item.Pane.ContentControl as ITaskPane;
                     if (null != target && item.Pane == customTaskPaneInst)
                     {
                         try
                         {
                             target.OnDockPositionChanged(item.Pane.DockPosition);
                         }
                         catch (Exception exception)
                         {
                             Factory.Console.WriteException(exception);
                         }
                     }
                 }
                 catch (Exception exception)
                 {
                     Factory.Console.WriteException(exception);
                 }
             }
         }
         TaskPaneDockStateChanged(customTaskPaneInst);
     }
     catch (Exception exception)
     {
         Factory.Console.WriteException(exception);
     }
 }