public void CopyFrom(ViewerConfig config) { if (null == config) { throw new ArgumentNullException(nameof(config)); } EngineCommandLine = config.EngineCommandLine; EngineType = config.EngineType; HexOrientation = config.HexOrientation; NotationType = config.NotationType; PieceStyle = config.PieceStyle; PieceColors = config.PieceColors; DisablePiecesInHandWithNoMoves = config.DisablePiecesInHandWithNoMoves; DisablePiecesInPlayWithNoMoves = config.DisablePiecesInPlayWithNoMoves; HighlightTargetMove = config.HighlightTargetMove; HighlightValidMoves = config.HighlightValidMoves; HighlightLastMovePlayed = config.HighlightLastMovePlayed; BlockInvalidMoves = config.BlockInvalidMoves; RequireMoveConfirmation = config.RequireMoveConfirmation; AddPieceNumbers = config.AddPieceNumbers; StackPiecesInHand = config.StackPiecesInHand; PlaySoundEffects = config.PlaySoundEffects; ShowBoardHistory = config.ShowBoardHistory; ShowMoveCommentary = config.ShowMoveCommentary; FirstRun = config.FirstRun; CheckUpdateOnStart = config.CheckUpdateOnStart; InternalGameEngineConfig = config.InternalGameEngineConfig; }
public ViewerConfig Clone() { ViewerConfig clone = new ViewerConfig { EngineCommandLine = EngineCommandLine, EngineType = EngineType, HexOrientation = HexOrientation, NotationType = NotationType, PieceStyle = PieceStyle, PieceColors = PieceColors, DisablePiecesInHandWithNoMoves = DisablePiecesInHandWithNoMoves, DisablePiecesInPlayWithNoMoves = DisablePiecesInPlayWithNoMoves, HighlightTargetMove = HighlightTargetMove, HighlightValidMoves = HighlightValidMoves, HighlightLastMovePlayed = HighlightLastMovePlayed, BlockInvalidMoves = BlockInvalidMoves, RequireMoveConfirmation = RequireMoveConfirmation, AddPieceNumbers = AddPieceNumbers, StackPiecesInHand = StackPiecesInHand, PlaySoundEffects = PlaySoundEffects, ShowBoardHistory = ShowBoardHistory, ShowMoveCommentary = ShowMoveCommentary, FirstRun = FirstRun, CheckUpdateOnStart = CheckUpdateOnStart, InternalGameEngineConfig = InternalGameEngineConfig, }; return(clone); }