Free cookie consent management tool by TermsFeed Policy Generator

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

Worked on OKB (#1174)

Location:
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/Query/Views
Files:
6 added
2 edited

Legend:

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

    r5606 r5612  
    5252      this.filtersGroupBox = new System.Windows.Forms.GroupBox();
    5353      this.filterPanel = new System.Windows.Forms.Panel();
     54      this.refreshFiltersButton = new System.Windows.Forms.Button();
    5455      this.resultsGroupBox = new System.Windows.Forms.GroupBox();
     56      this.includeBinaryValuesCheckBox = new System.Windows.Forms.CheckBox();
    5557      this.deserializeBlobsCheckBox = new System.Windows.Forms.CheckBox();
    5658      this.resultsInfoPanel = new System.Windows.Forms.Panel();
     
    9294      this.runCollectionView.ReadOnly = false;
    9395      this.runCollectionView.Size = new System.Drawing.Size(826, 223);
    94       this.runCollectionView.TabIndex = 2;
     96      this.runCollectionView.TabIndex = 3;
    9597      //
    9698      // splitContainer
     
    120122                  | System.Windows.Forms.AnchorStyles.Right)));
    121123      this.filtersGroupBox.Controls.Add(this.filterPanel);
     124      this.filtersGroupBox.Controls.Add(this.refreshFiltersButton);
    122125      this.filtersGroupBox.Location = new System.Drawing.Point(0, 0);
    123126      this.filtersGroupBox.Name = "filtersGroupBox";
     
    134137      this.filterPanel.Location = new System.Drawing.Point(6, 19);
    135138      this.filterPanel.Name = "filterPanel";
    136       this.filterPanel.Size = new System.Drawing.Size(826, 254);
    137       this.filterPanel.TabIndex = 0;
     139      this.filterPanel.Size = new System.Drawing.Size(796, 254);
     140      this.filterPanel.TabIndex = 1;
     141      //
     142      // refreshFiltersButton
     143      //
     144      this.refreshFiltersButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     145      this.refreshFiltersButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Refresh;
     146      this.refreshFiltersButton.Location = new System.Drawing.Point(808, 21);
     147      this.refreshFiltersButton.Name = "refreshFiltersButton";
     148      this.refreshFiltersButton.Size = new System.Drawing.Size(24, 24);
     149      this.refreshFiltersButton.TabIndex = 0;
     150      this.refreshFiltersButton.UseVisualStyleBackColor = true;
     151      this.refreshFiltersButton.Click += new System.EventHandler(this.refreshFiltersButton_Click);
    138152      //
    139153      // resultsGroupBox
     
    142156                  | System.Windows.Forms.AnchorStyles.Left)
    143157                  | System.Windows.Forms.AnchorStyles.Right)));
     158      this.resultsGroupBox.Controls.Add(this.includeBinaryValuesCheckBox);
    144159      this.resultsGroupBox.Controls.Add(this.deserializeBlobsCheckBox);
    145160      this.resultsGroupBox.Controls.Add(this.refreshResultsButton);
     
    152167      this.resultsGroupBox.Text = "Results";
    153168      //
     169      // includeBinaryValuesCheckBox
     170      //
     171      this.includeBinaryValuesCheckBox.AutoSize = true;
     172      this.includeBinaryValuesCheckBox.Checked = true;
     173      this.includeBinaryValuesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     174      this.includeBinaryValuesCheckBox.Location = new System.Drawing.Point(74, 24);
     175      this.includeBinaryValuesCheckBox.Name = "includeBinaryValuesCheckBox";
     176      this.includeBinaryValuesCheckBox.Size = new System.Drawing.Size(128, 17);
     177      this.includeBinaryValuesCheckBox.TabIndex = 1;
     178      this.includeBinaryValuesCheckBox.Text = "&Include Binary Values";
     179      this.includeBinaryValuesCheckBox.UseVisualStyleBackColor = true;
     180      //
    154181      // deserializeBlobsCheckBox
    155182      //
     
    157184      this.deserializeBlobsCheckBox.Checked = true;
    158185      this.deserializeBlobsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
    159       this.deserializeBlobsCheckBox.Location = new System.Drawing.Point(62, 24);
     186      this.deserializeBlobsCheckBox.Location = new System.Drawing.Point(225, 24);
    160187      this.deserializeBlobsCheckBox.Name = "deserializeBlobsCheckBox";
    161       this.deserializeBlobsCheckBox.Size = new System.Drawing.Size(106, 17);
    162       this.deserializeBlobsCheckBox.TabIndex = 1;
    163       this.deserializeBlobsCheckBox.Text = "&Deserialize Blobs";
     188      this.deserializeBlobsCheckBox.Size = new System.Drawing.Size(144, 17);
     189      this.deserializeBlobsCheckBox.TabIndex = 2;
     190      this.deserializeBlobsCheckBox.Text = "&Deserialize Binary Values";
    164191      this.deserializeBlobsCheckBox.UseVisualStyleBackColor = true;
    165192      //
     
    271298    private System.Windows.Forms.Panel filtersInfoPanel;
    272299    private System.Windows.Forms.Label filtersInfoLabel;
     300    private System.Windows.Forms.Button refreshFiltersButton;
     301    private System.Windows.Forms.CheckBox includeBinaryValuesCheckBox;
    273302
    274303  }
  • 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.