Exemple #1
0
        public static NewGameRequestManager GetInstance(int idPlayer)
        {
            if (NewGameRequestManager.instance == null)
            {
                NewGameRequestManager.instance = new NewGameRequestManager(idPlayer);
            }

            return(NewGameRequestManager.instance);
        }
Exemple #2
0
 public FormMainScreen(string idPlayer)
 {
     InitializeComponent();
     this.idPlayer = idPlayer;
     NewGameRequestManager.GetInstance(Convert.ToInt32(this.idPlayer));
     aTimer          = new System.Timers.Timer();
     aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
     aTimer.Interval = 1000;
     aTimer.Enabled  = true;
     this.Text       = "Tela Principal - Id: " + idPlayer;
     FormSkinManager.LoadMe();
 }
Exemple #3
0
 private void btnStartGameNow_Click(object sender, EventArgs e)
 {
     NewGameRequestManager.GetInstance(Convert.ToInt32(idPlayer)).enablePlaying();
 }
Exemple #4
0
 private void FormMainScreen_FormClosing(object sender, FormClosingEventArgs e)
 {
     NewGameRequestManager.Cancel();
 }
Exemple #5
0
 public static void Cancel()
 {
     NewGameRequestManager.instance.timer.Dispose();
     NewGameRequestManager.instance = null;
 }