• R/O
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

どうぶつしょうぎの完全解析をするGUI


Commit MetaInfo

修订版33 (tree)
时间2015-07-22 18:04:37
作者bellyoshi

Log Message

更改概述

差异

--- doubutu.UI.Form/frmMain.vb (revision 32)
+++ doubutu.UI.Form/frmMain.vb (revision 33)
@@ -41,21 +41,21 @@
4141
4242 Private Sub btnUndoFirst_Click(sender As System.Object, e As System.EventArgs) Handles btnUndoFirst.Click
4343 BoardViewer1.kyokumen.UndoAll()
44- BoardViewer1.DrawCurrentBitmap()
44+ FormUpdate()
4545 End Sub
4646
4747 Private Sub btnUndo_Click(sender As System.Object, e As System.EventArgs) Handles btnUndo.Click
4848 BoardViewer1.kyokumen.Undo()
49- BoardViewer1.DrawCurrentBitmap()
49+ FormUpdate()
5050 End Sub
5151
5252 Private Sub btnNext_Click(sender As System.Object, e As System.EventArgs) Handles btnNext.Click
5353 BoardViewer1.kyokumen.DoNext()
54- BoardViewer1.DrawCurrentBitmap()
54+ FormUpdate()
5555 End Sub
5656
5757 Private Sub BoardViewer1_Edited(sender As System.Object, e As doubutu.UI.Form.Control.Board.EditedEventArgs) Handles BoardViewer1.Edited
58- BackgroundWorker1.RunWorkerAsync()
58+ ReAnalyze()
5959 End Sub
6060
6161 Private Sub BackgroundWorker1_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
@@ -83,10 +83,21 @@
8383 If bestMoveCode <> String.Empty Then
8484 Dim move As Move = New Move(bestMoveCode)
8585 BoardViewer1.kyokumen.DoMove(move)
86- BoardViewer1.DrawCurrentBitmap()
87- BackgroundWorker1.RunWorkerAsync()
88- output = String.Empty
89- TextBox1.Text = String.Empty
86+ FormUpdate()
87+ ReAnalyze()
9088 End If
9189 End Sub
90+
91+ Private Sub FormUpdate()
92+ BoardViewer1.DrawCurrentBitmap()
93+ output = String.Empty
94+ TextBox1.Text = String.Empty
95+ End Sub
96+
97+ Private Sub ReAnalyze()
98+ While BackgroundWorker1.IsBusy
99+ Threading.Thread.Sleep(1)
100+ End While
101+ BackgroundWorker1.RunWorkerAsync()
102+ End Sub
92103 End Class