とりあえずtearingのバックグラウンド処理化に対応
@@ -272,11 +272,14 @@ | ||
272 | 272 | if ((grid_.SelectedCells[0].ColumnIndex >= 1) && (grid_.SelectedCells[0].RowIndex >= 1) && |
273 | 273 | (grid_.SelectedCells[0].Value.ToString() == 1.ToString())) |
274 | 274 | { |
275 | - //if (controller_.tearing(grid_.SelectedCells[0].ColumnIndex - 1, grid_.SelectedCells[0].RowIndex - 1)) | |
276 | - if (controller_.tearing(grid_.SelectedCells[0].RowIndex - 1, grid_.SelectedCells[0].ColumnIndex - 1)) | |
277 | - { | |
278 | - return; | |
279 | - } | |
275 | + ProgressDialog prog = new ProgressDialog(ref controller_, ref dsm_); | |
276 | + prog.tearing(grid_.SelectedCells[0].RowIndex - 1, grid_.SelectedCells[0].ColumnIndex - 1); | |
277 | + prog.ShowDialog(); | |
278 | + update(); | |
279 | + //if (controller_.tearing(grid_.SelectedCells[0].RowIndex - 1, grid_.SelectedCells[0].ColumnIndex - 1)) | |
280 | + //{ | |
281 | + // return; | |
282 | + //} | |
280 | 283 | } |
281 | 284 | } |
282 | 285 |
@@ -64,6 +64,15 @@ | ||
64 | 64 | bgWorker_.RunWorkerAsync(); |
65 | 65 | } |
66 | 66 | |
67 | + public void tearing(int row, int columun) | |
68 | + { | |
69 | + if (controller_.tearing(row, columun)) | |
70 | + { | |
71 | + this.bgWorker_.DoWork += new DoWorkEventHandler(bgWorker__DoWork3); | |
72 | + bgWorker_.RunWorkerAsync(); | |
73 | + } | |
74 | + } | |
75 | + | |
67 | 76 | private void bgWorker__DoWork(object sender, DoWorkEventArgs e) |
68 | 77 | { |
69 | 78 | BackgroundWorker bg = (BackgroundWorker)sender; |
@@ -79,6 +88,12 @@ | ||
79 | 88 | controller_.partitioning(ref bg); |
80 | 89 | } |
81 | 90 | |
91 | + private void bgWorker__DoWork3(object sender, DoWorkEventArgs e) | |
92 | + { | |
93 | + BackgroundWorker bg = (BackgroundWorker)sender; | |
94 | + controller_.partitioning(ref bg); | |
95 | + } | |
96 | + | |
82 | 97 | private void bgWorker__ProgressChanged(object sender, ProgressChangedEventArgs e) |
83 | 98 | { |
84 | 99 | pBar_.Value = e.ProgressPercentage; |
@@ -260,9 +260,9 @@ | ||
260 | 260 | // 指定されたセルを削除 |
261 | 261 | if (dsm_.removeDependency(x, y)) |
262 | 262 | { |
263 | + return true; | |
263 | 264 | // partitioningを実行 |
264 | 265 | //return partitioning(ref bg); |
265 | - return true; | |
266 | 266 | } |
267 | 267 | return false; |
268 | 268 | } |