コード例 #1
0
        public GamePresenter()
        {
            _CurrentGame.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_CurrentGame_PropertyChanged);
            _CurrentGame.Timer            = new WPFPacmanTimer();
            if (!System.ComponentModel.DesignerProperties.IsInDesignTool)
            {
#if (DEBUG)
#else
                //HACK BUG VS Designer
                protector       = Protect.getInstance();
                protector.Tick += new EventHandler(RegistrationChanged);
#endif
                demoTimer          = new DispatcherTimer();
                demoTimer.Interval = TimeSpan.FromMinutes(1);
                demoTimer.Tick    += new EventHandler(GameOverTick);
                fCanPlay           = true;
                checkRegister();
            }

            _pacman         = new PacmanPresenter(CurrentGame);
            _pacman.xyList  = new TXYPresenter(CurrentGame.taskBox);
            _BonusPresenter = new BonusPresenter(CurrentGame);
            for (int i = 0; i < 4; i++)
            {
                _ghosts[i] = new GhostPresenter(CurrentGame, i);
            }
        }
コード例 #2
0
ファイル: regScreen.xaml.cs プロジェクト: prog76/Pacman
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     this.DialogResult = true;
     Protect.getInstance().addKey(regKey.Text);
 }
コード例 #3
0
ファイル: regScreen.xaml.cs プロジェクト: prog76/Pacman
 public RegScreen()
 {
     InitializeComponent();
     regCode.Text = Protect.getInstance().getCode();
 }