private void UpdateBuilds() { BuildResourceFilter filter = this.CreateBuildResourceFilter(); if (this.viewmodel.SelectedBuildFilter == BuildFilter.Completed) { var dateFilter = this.CompletedBuildsDateFilter.SelectedItem as BuildDateFilter; this.viewmodel.AssignBuilds(this.repository.GetCompletedBuilds(filter, dateFilter.TimeSpan)); } else { this.viewmodel.AssignBuilds(this.repository.GetQueuedBuilds(filter)); } }
private void UpdateBuilds() { if (!this.dispatcherTimer.IsEnabled && this.CheckBoxAutoRefresh.IsChecked == true) { this.dispatcherTimer.Start(); } BuildResourceFilter filter = this.CreateBuildResourceFilter(); if (this.viewmodel.SelectedBuildFilter == BuildFilter.Completed) { var dateFilter = this.CompletedBuildsDateFilter.SelectedItem as BuildDateFilter; if (dateFilter != null) { this.viewmodel.AssignBuilds(this.repository.GetCompletedBuilds(filter, dateFilter.TimeSpan)); } } else { this.viewmodel.AssignBuilds(this.repository.GetQueuedBuilds(filter)); } }