예제 #1
0
 //-------------------------------------------------------------
 public SuggestInternetGame(KobberLan parent)
 //-------------------------------------------------------------
 {
     closed    = false;
     kobberLan = parent;
     InitializeComponent();
 }
예제 #2
0
        //-------------------------------------------------------------
        public Communication(KobberLan gui)
        //-------------------------------------------------------------
        {
            queueNetwork = new BlockingCollection <QueueNetwork>();

            //Read port from ApplicationConfig
            COMMUNICATION_PORT = Convert.ToInt32(ConfigurationManager.AppSettings.Get("Port:CommunicationTCP"));

            kobberLanGui = gui;
        }
예제 #3
0
        //-------------------------------------------------------------
        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());
        }
예제 #4
0
        //-------------------------------------------------------------
        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();
        }
예제 #5
0
        //-------------------------------------------------------------
        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);
            }
        }
예제 #6
0
 //-------------------------------------------------------------
 public void SetGuiReference(KobberLan guiRef)
 //-------------------------------------------------------------
 {
     kobberLan = guiRef;
 }