// This function will be passed as the timer trigger function
        public void Fetch_Timer_Tick(object sender, EventArgs e)
        {
            // Refresh data of all widgetContainers
            for (int containerIter = 0; containerIter < CellsContainer.Children.Count; containerIter++)
            {
                IWidgetContainer container = (IWidgetContainer)CellsContainer.Children[containerIter];
                if (!AutoFetchManager.DashboardAutoFetchState.IsDominatingSchedule)
                {
                    // handle non dominating schedule case.
                    // Here we refresh container widget only if it's scheduler is disabled
                    WidgetContainerAutoFetchState containerState = container.AutoFetchState;
                    containerState.IsSuppressed = false;
                    container.AutoFetchState    = containerState;

                    if (container.AutoFetchState.SchedulerState.Mode == ScheduleMode.Disabled)
                    {
                        container.RefreshData();
                    }
                }
                else
                {
                    // handle dominating schedule case
                    // here we disable container scheduler and refresh its data
                    WidgetContainerAutoFetchState containerState = container.AutoFetchState;
                    containerState.IsSuppressed = true;
                    container.AutoFetchState    = containerState;
                    container.RefreshData();
                }
            }
        }
 public WidgetContainerAutoFetchEditWindow(WidgetContainerAutoFetchState autoFetchState)
 {
     InitializeComponent();
     FetchConfigVM = new WidgetContainerAutoFetchConfigVM(autoFetchState);
     DataContext   = FetchConfigVM;
     SetupEditorUC(FetchConfigVM.AutoFetchState_.SchedulerState);
 }
 public WidgetContainerAutoFetchConfigVM(WidgetContainerAutoFetchState state)
 {
     AutoFetchState_ = state.Clone();
 }