コード例 #1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="inDesignMode">Flag which indicates if the control is being drawn on the Workspace Designer. (Use this flag to determine if code should perform any logic on the workspace record)</param>
 /// <param name="RecordContext">The current workspace record context.</param>
 public ActivityAddIn(bool inDesignMode, IRecordContext RecordContext)
 {
     // do nothing so framework won't throw exception once it gets to GetControl
     if (!ConfigurationSetting.configVerbPerfect && ConfigurationSetting.loginUserIsAdmin)
     {
         // do nothing
     }
     else
     {
         _recordContext = RecordContext;
         if (_recordContext != null)
         {
             _recordContext.DataLoaded += _recordContext_DataLoaded;
             _recordContext.Saving     += _recordContext_Saving;
             _recordContext.Saved      += _recordContext_Saved;
         }
         _activityControl = new ActivityInformationControl();
     }
 }
コード例 #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="inDesignMode">Flag which indicates if the control is being drawn on the Workspace Designer. (Use this flag to determine if code should perform any logic on the workspace record)</param>
 /// <param name="RecordContext">The current workspace record context.</param>
 public ActivityAddIn(bool inDesignMode, IRecordContext RecordContext)
 {
     // do nothing so framework won't throw exception once it gets to GetControl
     if (!ConfigurationSetting.configVerbPerfect && ConfigurationSetting.loginUserIsAdmin)
     {
         // do nothing
     }
     else
     {
         _recordContext = RecordContext;
         if (_recordContext != null)
         {
             _recordContext.DataLoaded += _recordContext_DataLoaded;
             _recordContext.Saving += _recordContext_Saving;
             _recordContext.Saved += _recordContext_Saved;
         }
         _activityControl = new ActivityInformationControl();
     }
 }