Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/11 00:33:31 (13 years ago)
Author:
swagner
Message:

Worked on OKB (#1174)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Query/Views/QueryView.cs

    r5611 r5612  
    3131using HeuristicLab.Optimization;
    3232using HeuristicLab.Persistence.Default.Xml;
     33using HeuristicLab.PluginInfrastructure;
    3334
    3435namespace HeuristicLab.Clients.OKB.Query {
     
    7172    }
    7273
    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 
    9474    #region Load Results
    9575    private void LoadResultsAsync(int batchSize) {
     76      bool includeBinaryValues = includeBinaryValuesCheckBox.Checked;
    9677      bool deserialize = deserializeBlobsCheckBox.Checked;
    9778
     
    11697
    11798        RunCollection runs = new RunCollection();
    118         runs.CollectionReset += new Collections.CollectionItemsChangedEventHandler<IRun>(runs_CollectionReset);
    11999        runCollectionView.Content = runs;
    120100        while (ids.Count() > 0) {
    121101          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)));
    123103          ids = ids.Skip(batchSize);
    124104          Invoke(new Action(() => {
     
    139119      });
    140120    }
    141 
    142     void runs_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<IRun> e) {
    143     }
    144121    #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    }
    145147
    146148    private void refreshResultsButton_Click(object sender, EventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.