Changeset 9923
- Timestamp:
- 09/02/13 14:03:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs
r9922 r9923 241 241 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>() 242 242 .AddOperationProgressToView(this, "Calculating..."); 243 Task.Factory.StartNew(CalculateValuesAsync); 244 } 245 } 246 247 private void CalculateValuesAsync() { 243 244 string curItem = (string)groupCompComboBox.SelectedItem; 245 Task.Factory.StartNew(() => CalculateValuesAsync(curItem)); 246 } 247 } 248 249 private void CalculateValuesAsync(string groupName) { 248 250 TestAllGroups(); 249 251 CalculateNormality(); 250 252 CalculateNormalityDetails(); 251 CalculatePairwiseTest( );252 CalculatePairwiseTestDetails( );253 CalculatePairwiseTest(groupName); 254 CalculatePairwiseTestDetails(groupName); 253 255 254 256 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 255 257 } 256 258 257 private void CalculatePairwise( ) {259 private void CalculatePairwise(string groupName) { 258 260 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Calculating..."); 259 Task.Factory.StartNew( CalculatePairwiseAsync);260 } 261 262 private void CalculatePairwiseAsync( ) {263 CalculatePairwiseTest( );264 CalculatePairwiseTestDetails( );261 Task.Factory.StartNew(() => CalculatePairwiseAsync(groupName)); 262 } 263 264 private void CalculatePairwiseAsync(string groupName) { 265 CalculatePairwiseTest(groupName); 266 CalculatePairwiseTestDetails(groupName); 265 267 266 268 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); … … 309 311 } 310 312 311 private void CalculatePairwiseTest() { 312 string curItem = (string)groupCompComboBox.SelectedItem; 313 private void CalculatePairwiseTest(string groupName) { 313 314 int colIndex = 0; 314 315 foreach (string col in stringConvertibleMatrixView.Content.ColumnNames) { 316 if (col == curItem) { 315 IEnumerable<string> columnNames = null; 316 this.Invoke(new Action(() => { columnNames = stringConvertibleMatrixView.Content.ColumnNames; })); 317 318 foreach (string col in columnNames) { 319 if (col == groupName) { 317 320 break; 318 321 } … … 344 347 } 345 348 346 private void CalculatePairwiseTestDetails() { 347 string curItem = (string)groupCompComboBox.SelectedItem; 349 private void CalculatePairwiseTestDetails(string groupName) { 348 350 int colIndex = 0; 349 350 foreach (string col in stringConvertibleMatrixView.Content.ColumnNames) { 351 if (col == curItem) { 351 IEnumerable<string> columnNames = null; 352 this.Invoke(new Action(() => { columnNames = stringConvertibleMatrixView.Content.ColumnNames; })); 353 354 foreach (string col in columnNames) { 355 if (col == groupName) { 352 356 break; 353 357 } … … 386 390 387 391 private void groupCompComboBox_SelectedValueChanged(object sender, EventArgs e) { 388 CalculatePairwise(); 392 string curItem = (string)groupCompComboBox.SelectedItem; 393 CalculatePairwise(curItem); 389 394 } 390 395 }
Note: See TracChangeset
for help on using the changeset viewer.