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

            return(NewGameRequestManager.instance);
        }
Example #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();
 }
Example #3
0
 private void btnStartGameNow_Click(object sender, EventArgs e)
 {
     NewGameRequestManager.GetInstance(Convert.ToInt32(idPlayer)).enablePlaying();
 }
Example #4
0
 private void FormMainScreen_FormClosing(object sender, FormClosingEventArgs e)
 {
     NewGameRequestManager.Cancel();
 }
Example #5
0
 public static void Cancel()
 {
     NewGameRequestManager.instance.timer.Dispose();
     NewGameRequestManager.instance = null;
 }