예제 #1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            SearchPanel.EnclosingPage = this;

            RefreshTimer.AutoDisabled                += RefreshTimer_AutoDisabled;
            ConfirmRescheduleDialog.Confirmed        += ConfirmationContinueDialog_Confirmed;
            ScheduleWorkQueueDialog.WorkQueueUpdated += ScheduleWorkQueueDialog_OnWorkQueueUpdated;
            ScheduleWorkQueueDialog.OnShow           += DisableRefresh;
            ScheduleWorkQueueDialog.OnHide           += () => RefreshTimer.Reset(AutoRefresh);

            ResetWorkQueueDialog.WorkQueueItemReseted += ResetWorkQueueDialog_WorkQueueItemReseted;
            ResetWorkQueueDialog.OnShow += DisableRefresh;
            ResetWorkQueueDialog.OnHide += () => RefreshTimer.Reset(AutoRefresh);
            DeleteWorkQueueDialog.WorkQueueItemDeleted += DeleteWorkQueueDialog_WorkQueueItemDeleted;
            DeleteWorkQueueDialog.OnShow += DisableRefresh;
            DeleteWorkQueueDialog.OnHide += () => RefreshTimer.Reset(AutoRefresh);
            InformationDialog.OnShow     += DisableRefresh;
            InformationDialog.OnHide     += () => RefreshTimer.Reset(AutoRefresh);

            if (!Page.IsPostBack)
            {
                AutoRefresh             = false;
                RefreshTimer.Enabled    = false;
                RefreshTimer.Interval   = (int)TimeSpan.FromSeconds(Math.Max(WorkQueueSettings.Default.NormalRefreshIntervalSeconds, 5)).TotalMilliseconds;// min refresh rate: every 5 sec
                RefreshRateTextBox.Text = TimeSpan.FromMilliseconds(RefreshTimer.Interval).TotalSeconds.ToString(CultureInfo.InvariantCulture);
            }

            ServerPartitionSelector.PartitionChanged += delegate(ServerPartition partition)
            {
                SearchPanel.ServerPartition = partition;
                SearchPanel.Reset();
            };

            ServerPartitionSelector.SetUpdatePanel(PageContent);

            SetPageTitle(Titles.WorkQueuePageTitle);
        }
예제 #2
0
 protected void RefreshTimer_Tick(object sender, EventArgs e)
 {
     SearchPanel.Refresh();
 }
예제 #3
0
 void ResetWorkQueueDialog_WorkQueueItemReseted(Model.WorkQueue item)
 {
     SearchPanel.Refresh();
 }
예제 #4
0
 void DeleteWorkQueueDialog_WorkQueueItemDeleted(Model.WorkQueue item)
 {
     SearchPanel.Refresh();
 }
예제 #5
0
 private void ScheduleWorkQueueDialog_OnWorkQueueUpdated(List <Model.WorkQueue> workqueueItems)
 {
     SearchPanel.Refresh();
 }