Changeset 5612 for branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Query/Views/QueryView.cs
- Timestamp:
- 03/05/11 00:33:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Query/Views/QueryView.cs
r5611 r5612 31 31 using HeuristicLab.Optimization; 32 32 using HeuristicLab.Persistence.Default.Xml; 33 using HeuristicLab.PluginInfrastructure; 33 34 34 35 namespace HeuristicLab.Clients.OKB.Query { … … 71 72 } 72 73 73 private void Content_Refreshing(object sender, EventArgs e) {74 if (InvokeRequired) {75 Invoke(new EventHandler(Content_Refreshing), sender, e);76 } else {77 Cursor = Cursors.AppStarting;78 filtersInfoPanel.Visible = true;79 splitContainer.Enabled = false;80 }81 }82 private void Content_Refreshed(object sender, EventArgs e) {83 if (InvokeRequired) {84 Invoke(new EventHandler(Content_Refreshed), sender, e);85 } else {86 CreateFilterView();87 filtersInfoPanel.Visible = false;88 splitContainer.Enabled = true;89 Cursor = Cursors.Default;90 SetEnabledStateOfControls();91 }92 }93 94 74 #region Load Results 95 75 private void LoadResultsAsync(int batchSize) { 76 bool includeBinaryValues = includeBinaryValuesCheckBox.Checked; 96 77 bool deserialize = deserializeBlobsCheckBox.Checked; 97 78 … … 116 97 117 98 RunCollection runs = new RunCollection(); 118 runs.CollectionReset += new Collections.CollectionItemsChangedEventHandler<IRun>(runs_CollectionReset);119 99 runCollectionView.Content = runs; 120 100 while (ids.Count() > 0) { 121 101 cancellationToken.ThrowIfCancellationRequested(); 122 runs.AddRange(QueryClient.Instance.GetRuns(ids.Take(batchSize), true).Select(x => ConvertToOptimizationRun(x, deserialize)));102 runs.AddRange(QueryClient.Instance.GetRuns(ids.Take(batchSize), includeBinaryValues).Select(x => ConvertToOptimizationRun(x, deserialize))); 123 103 ids = ids.Skip(batchSize); 124 104 Invoke(new Action(() => { … … 139 119 }); 140 120 } 141 142 void runs_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {143 }144 121 #endregion 122 123 private void Content_Refreshing(object sender, EventArgs e) { 124 if (InvokeRequired) { 125 Invoke(new EventHandler(Content_Refreshing), sender, e); 126 } else { 127 Cursor = Cursors.AppStarting; 128 filtersInfoPanel.Visible = true; 129 splitContainer.Enabled = false; 130 } 131 } 132 private void Content_Refreshed(object sender, EventArgs e) { 133 if (InvokeRequired) { 134 Invoke(new EventHandler(Content_Refreshed), sender, e); 135 } else { 136 CreateFilterView(); 137 filtersInfoPanel.Visible = false; 138 splitContainer.Enabled = true; 139 Cursor = Cursors.Default; 140 SetEnabledStateOfControls(); 141 } 142 } 143 144 private void refreshFiltersButton_Click(object sender, EventArgs e) { 145 Content.RefreshAsync(new Action<Exception>((Exception ex) => ErrorHandling.ShowErrorDialog(this, "Refresh failed.", ex))); 146 } 145 147 146 148 private void refreshResultsButton_Click(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.