//------------------------------------------------------------- public SuggestInternetGame(KobberLan parent) //------------------------------------------------------------- { closed = false; kobberLan = parent; InitializeComponent(); }
//------------------------------------------------------------- public Communication(KobberLan gui) //------------------------------------------------------------- { queueNetwork = new BlockingCollection <QueueNetwork>(); //Read port from ApplicationConfig COMMUNICATION_PORT = Convert.ToInt32(ConfigurationManager.AppSettings.Get("Port:CommunicationTCP")); kobberLanGui = gui; }
//------------------------------------------------------------- public Broadcast(KobberLan gui) //------------------------------------------------------------- { firewallBlocking = true; //Read port from ApplicationConfig BROADCAST_PORT = Convert.ToInt32(ConfigurationManager.AppSettings.Get("Port:BroadcastUDP")); playersFound = new SynchronizedCollection <IPAddress>(); kobberLanGui = gui; Log.Get().Write("Broadcast own IP: " + Helper.GetHostIP()); }
//------------------------------------------------------------- public OverviewControl(KobberLan kobberLan) //------------------------------------------------------------- { InitializeComponent(); parentGui = kobberLan; //------------------------------------------------------------- //Count number of games in folder //------------------------------------------------------------- string gamesFolder = Helper.GetDirection(); int directoryCount = System.IO.Directory.GetDirectories(gamesFolder).Length; label_GamesFound.Text = directoryCount.ToString(); }
//------------------------------------------------------------- public ChooseGame(KobberLan kobberLan) //------------------------------------------------------------- { InitializeComponent(); parentGui = kobberLan; //------------------------------------------------------------- //Show all possible games //------------------------------------------------------------- string gamesFolder = Helper.GetDirection(); string[] directories = System.IO.Directory.GetDirectories(gamesFolder); foreach (var folder in directories) { AddGame(folder); } }
//------------------------------------------------------------- public void SetGuiReference(KobberLan guiRef) //------------------------------------------------------------- { kobberLan = guiRef; }