ファイル保存時にファイル名がディレクトリー名を含んでいた問題の修正。
| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | Private _dirname As String |
| 24 | 24 | Public ReadOnly Property dirName As String |
| 25 | 25 | Get |
| 26 | - Return _dirname & "/KifuData" | |
| 26 | + Return _dirname & "\KifuData\" | |
| 27 | 27 | End Get |
| 28 | 28 | End Property |
| 29 | 29 |
| @@ -167,25 +167,28 @@ | ||
| 167 | 167 | End If |
| 168 | 168 | |
| 169 | 169 | If rbEdit.Checked AndAlso rbNextMove.Checked Then |
| 170 | + NextMoveAddAndSave(e.MovingValue) | |
| 171 | + End If | |
| 170 | 172 | |
| 171 | - Dim msg As String = String.Format("次の一手は""{0}""でよいですか?", | |
| 172 | - Board.Kifu.KifKifuUtil.GetInstance.MoveToString(e.MovingValue, Nothing)) | |
| 173 | - Dim ret As DialogResult = MessageBox.Show(msg, "確認", MessageBoxButtons.OKCancel) | |
| 174 | - If ret = Windows.Forms.DialogResult.Cancel Then | |
| 175 | - Viewer.kyokumen = _editKifu.KyokumenList(0) | |
| 176 | - Viewer.DrawCurrentBitmap() | |
| 177 | - Exit Sub | |
| 178 | - End If | |
| 173 | + End Sub | |
| 179 | 174 | |
| 180 | - _editKifu.AddMove(e.MovingValue, 0) | |
| 181 | - KifuSavefileDaialog.FileName = _kifuDataDirectoryReader.dirName | |
| 182 | - KifuSavefileDaialog.Filter = "csa棋譜ファイル(*.csa)|*.csa" | |
| 183 | - If KifuSavefileDaialog.ShowDialog() = Windows.Forms.DialogResult.OK Then | |
| 184 | - _kifuDataDirectoryReader.Write(_editKifu, KifuSavefileDaialog.FileName) | |
| 185 | - End If | |
| 186 | - rbFirstKyokumen.Checked = True | |
| 175 | + Private Sub NextMoveAddAndSave(NextMoveValue As Board.Te) | |
| 176 | + Dim msg As String = String.Format("次の一手は""{0}""でよいですか?", | |
| 177 | + Board.Kifu.KifKifuUtil.GetInstance.MoveToString(NextMoveValue, Nothing)) | |
| 178 | + Dim ret As DialogResult = MessageBox.Show(msg, "確認", MessageBoxButtons.OKCancel) | |
| 179 | + If ret = Windows.Forms.DialogResult.Cancel Then | |
| 180 | + Viewer.kyokumen = _editKifu.KyokumenList(0) | |
| 181 | + Viewer.DrawCurrentBitmap() | |
| 182 | + Exit Sub | |
| 187 | 183 | End If |
| 188 | 184 | |
| 185 | + _editKifu.AddMove(NextMoveValue, 0) | |
| 186 | + KifuSavefileDaialog.InitialDirectory = _kifuDataDirectoryReader.dirName | |
| 187 | + KifuSavefileDaialog.Filter = "csa棋譜ファイル(*.csa)|*.csa" | |
| 188 | + If KifuSavefileDaialog.ShowDialog() = Windows.Forms.DialogResult.OK Then | |
| 189 | + _kifuDataDirectoryReader.Write(_editKifu, KifuSavefileDaialog.FileName) | |
| 190 | + End If | |
| 191 | + rbFirstKyokumen.Checked = True | |
| 189 | 192 | End Sub |
| 190 | 193 | |
| 191 | 194 | Private Sub HirateToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles HirateToolStripMenuItem.Click |