コード例 #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
ファイル: ChooseGame.cs プロジェクト: Nosceteipsum/KobberLan
        //-------------------------------------------------------------
        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;
 }