Пример #1
0
        public OptionsDialog(Options options)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // Create a copy of the given game options.
            this.Options = new Options(options);

            // Set the form controls based on those options.
            this.MapOptionsToControls();
        }
Пример #2
0
 //
 // Creates a new Options object by copying an existing one.
 //
 public Options(Options options)
 {
     this.ShowValidMoves = options.ShowValidMoves;
     this.PreviewMoves = options.PreviewMoves;
     this.AnimateMoves = options.AnimateMoves;
     this.BoardColor = options.BoardColor;
     this.ValidMoveColor = options.ValidMoveColor;
     this.ActiveSquareColor = options.ActiveSquareColor;
     this.MoveIndicatorColor = options.MoveIndicatorColor;
     this.FirstMove = options.FirstMove;
     this.ComputerPlaysBlack = options.ComputerPlaysBlack;
     this.ComputerPlaysWhite = options.ComputerPlaysWhite;
 }