/// <summary> /// Method which is called when any Workspace Rule Action is invoked. /// </summary> /// <param name="ActionName">The name of the Workspace Rule Action that was invoked.</param> public void RuleActionInvoked(string ActionName) { if (ActionName == "ShowScheduler") { if (isSchedulerInitialized) { Controls.Remove(elementHost); } else { isSchedulerInitialized = true; } var monthlyViewScheduler = new MonthlyViewScheduler(_recordContext); bool isSuccess = monthlyViewScheduler.InitializeScheduler(IsManagerOverride); if (isSuccess) { elementHost = new ElementHost { Dock = DockStyle.Fill, Child = monthlyViewScheduler, }; Controls.Add(elementHost); } } }
/// <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> /// <param name="managerOverride">Scheduler Override Allowed flag</param> public OracleRightnowToaMonthlyViewSchedulerAddIn(bool inDesignMode, IRecordContext RecordContext, bool managerOverride) { _recordContext = RecordContext; IsManagerOverride = managerOverride; if (inDesignMode) { var monthlyViewScheduler = new MonthlyViewScheduler(_recordContext); var elementHost = new ElementHost { Dock = DockStyle.Fill, Child = monthlyViewScheduler, }; Controls.Add(elementHost); } }
/// <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> /// <param name="managerOverride">Scheduler Override Allowed flag</param> public OracleRightnowToaMonthlyViewSchedulerAddIn(bool inDesignMode, IRecordContext RecordContext, bool managerOverride) { _recordContext = RecordContext; IsManagerOverride = managerOverride; if (inDesignMode) { var monthlyViewScheduler = new MonthlyViewScheduler(_recordContext); var elementHost = new ElementHost { Dock = DockStyle.Fill, Child = monthlyViewScheduler, }; Controls.Add(elementHost); } }
/// <summary> /// Method which is called when any Workspace Rule Action is invoked. /// </summary> /// <param name="ActionName">The name of the Workspace Rule Action that was invoked.</param> public void RuleActionInvoked(string ActionName) { if (ActionName == "ShowScheduler") { if (isSchedulerInitialized) { Controls.Remove(elementHost); } else { isSchedulerInitialized = true; } var monthlyViewScheduler = new MonthlyViewScheduler(_recordContext); bool isSuccess = monthlyViewScheduler.InitializeScheduler(IsManagerOverride); if (isSuccess) { elementHost = new ElementHost { Dock = DockStyle.Fill, Child = monthlyViewScheduler, }; Controls.Add(elementHost); } } }