private static void ExecuteUndo(GLShogiElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { element.Board.Undo(); } catch (Exception ex) { Util.ThrowIfFatal(ex); DialogUtil.ShowError(ex, "指し手をⅰ手戻すことができませんでした ( ̄ω ̄;)"); } }
private static void ExecuteGotoLastState(GLShogiElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { element.Board.RedoAll(); } catch (Exception ex) { Util.ThrowIfFatal(ex); DialogUtil.ShowError( "局面を最終局面にできませんでした ( ̄ω ̄;)"); } }
/// <summary> /// 指し手を連続して戻します。 /// </summary> public static void ExecuteUndoContinue(GLShogiElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { var autoPlay = new DefaultAutoPlay( element.BoardModel, true, AutoPlayType.Undo) { IsUseEffect = false, }; //TODO element.StartAutoPlay(autoPlay); } catch (Exception ex) { Util.ThrowIfFatal(ex); DialogUtil.ShowError( "指し手を連続して戻すことに失敗しました ( ̄ω ̄;)"); } }
private static void ExecuteRedoContinue(GLShogiElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { var autoPlay = new AutoPlay( element.Board, true, AutoPlayType.Redo) { IsUseEffect = false, }; element.StartAutoPlay(autoPlay); } catch (Exception ex) { Util.ThrowIfFatal(ex); DialogUtil.ShowError( "局面を連続して進めることに失敗しました ( ̄ω ̄;)"); } }
/// <summary> /// 指し手を連続して戻します。 /// </summary> public static void ExecuteUndoContinue(GLShogiElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { var autoPlay = new AutoPlay( element.Board, true, AutoPlayType.Undo) { IsUseEffect = false, }; element.StartAutoPlay(autoPlay); } catch (Exception ex) { Util.ThrowIfFatal(ex); DialogUtil.ShowError( "指し手を連続して戻すことに失敗しました ( ̄ω ̄;)"); } }
private static void ExecuteGotoLastState(GLShogiElement element) { if (element == null) { throw new ArgumentNullException("element"); } try { element.Board.RedoAll(); } catch(Exception ex) { Util.ThrowIfFatal(ex); DialogUtil.ShowError( "局面を最終局面にできませんでした ( ̄ω ̄;)"); } }