示例#1
0
        public FishBowl(FishWindow wndParent, IntPtr hBgd)
            : base(hBgd)
        {
            //changing these requires resetting the fishbowl
            _colorAgeGradient = 1;
            _FishInitPct      = 10;
            _SharkInitPct     = 10;

            CellWidth = CellHeight = 10;
            //these can be changed while running
            _SharkStarve     = 6;
            _FishBreedAge    = 3;
            _SharkBreedAge   = 5;
            _FishLifeLength  = 22;
            _SharkLifeLength = 33;

            _FishNumMovesPerYear  = 1;
            _SharkNumMovesPerYear = 1;

            _wndParent          = wndParent;
            _Instance           = this;
            _BgdBrush           = hBgd;
            _wndParent.Closing += (o, e) =>
            {
                _StopRequested = true;
            };
        }
示例#2
0
        public static void DoMain(object[] args)
        {
            var oWin = new FishWindow();

            oWin.ShowDialog();
        }