Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     this.DialogResult = true;
     Protect.getInstance().addKey(regKey.Text);
 }
Ejemplo n.º 3
0
 public static Protect getInstance()
 {
     if (protect == null) protect = new Protect();
     return protect;
 }
Ejemplo n.º 4
0
 public RegScreen()
 {
     InitializeComponent();
     regCode.Text = Protect.getInstance().getCode();
 }