Esempio n. 1
0
 //Singleton implementation, returns or creates instance
 public static NetCons getInstance()
 {
     if (instance == null)
     {
         instance = new NetCons();
     }
     return(instance);
 }
Esempio n. 2
0
 public Invite(String aliasA, String aliasB)
 {
     this.aliasA = aliasA;
     this.aliasB = aliasB;
     InitializeComponent();
     //Set label message
     InviteLabel.Text = aliasA + " has invited you to a game! Accept or decline ";
     message          = new MessageHandler();
     network          = NetCons.getInstance(); //Get NetCons instance
 }