- Timestamp:
- 03/05/11 00:33:31 (14 years ago)
- 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 52 52 this.filtersGroupBox = new System.Windows.Forms.GroupBox(); 53 53 this.filterPanel = new System.Windows.Forms.Panel(); 54 this.refreshFiltersButton = new System.Windows.Forms.Button(); 54 55 this.resultsGroupBox = new System.Windows.Forms.GroupBox(); 56 this.includeBinaryValuesCheckBox = new System.Windows.Forms.CheckBox(); 55 57 this.deserializeBlobsCheckBox = new System.Windows.Forms.CheckBox(); 56 58 this.resultsInfoPanel = new System.Windows.Forms.Panel(); … … 92 94 this.runCollectionView.ReadOnly = false; 93 95 this.runCollectionView.Size = new System.Drawing.Size(826, 223); 94 this.runCollectionView.TabIndex = 2;96 this.runCollectionView.TabIndex = 3; 95 97 // 96 98 // splitContainer … … 120 122 | System.Windows.Forms.AnchorStyles.Right))); 121 123 this.filtersGroupBox.Controls.Add(this.filterPanel); 124 this.filtersGroupBox.Controls.Add(this.refreshFiltersButton); 122 125 this.filtersGroupBox.Location = new System.Drawing.Point(0, 0); 123 126 this.filtersGroupBox.Name = "filtersGroupBox"; … … 134 137 this.filterPanel.Location = new System.Drawing.Point(6, 19); 135 138 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); 138 152 // 139 153 // resultsGroupBox … … 142 156 | System.Windows.Forms.AnchorStyles.Left) 143 157 | System.Windows.Forms.AnchorStyles.Right))); 158 this.resultsGroupBox.Controls.Add(this.includeBinaryValuesCheckBox); 144 159 this.resultsGroupBox.Controls.Add(this.deserializeBlobsCheckBox); 145 160 this.resultsGroupBox.Controls.Add(this.refreshResultsButton); … … 152 167 this.resultsGroupBox.Text = "Results"; 153 168 // 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 // 154 181 // deserializeBlobsCheckBox 155 182 // … … 157 184 this.deserializeBlobsCheckBox.Checked = true; 158 185 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); 160 187 this.deserializeBlobsCheckBox.Name = "deserializeBlobsCheckBox"; 161 this.deserializeBlobsCheckBox.Size = new System.Drawing.Size(1 06, 17);162 this.deserializeBlobsCheckBox.TabIndex = 1;163 this.deserializeBlobsCheckBox.Text = "&Deserialize B lobs";188 this.deserializeBlobsCheckBox.Size = new System.Drawing.Size(144, 17); 189 this.deserializeBlobsCheckBox.TabIndex = 2; 190 this.deserializeBlobsCheckBox.Text = "&Deserialize Binary Values"; 164 191 this.deserializeBlobsCheckBox.UseVisualStyleBackColor = true; 165 192 // … … 271 298 private System.Windows.Forms.Panel filtersInfoPanel; 272 299 private System.Windows.Forms.Label filtersInfoLabel; 300 private System.Windows.Forms.Button refreshFiltersButton; 301 private System.Windows.Forms.CheckBox includeBinaryValuesCheckBox; 273 302 274 303 } -
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.