コード例 #1
0
ファイル: App.xaml.cs プロジェクト: aloyziuz/CheckersGame
        private void HandleSetNetworkMenu(object sender, RoutedEventArgs e)
        {
            NetworkInformationWindow dialog = new NetworkInformationWindow();

            dialog.Owner = playerWindow;
            dialog.ShowDialog();
            messageHandler.connectTo(dialog.getIP(), dialog.getPort());
        }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: aloyziuz/CheckersGame
        private void HandleMulticastMenu(object sender, RoutedEventArgs e)
        {
            NetworkInformationWindow dialog = new NetworkInformationWindow();

            dialog.Owner            = playerWindow;
            dialog.portSlider.Value = 50001;
            dialog.ShowDialog();
            multicastAddress = dialog.getIP();
            multicastPort    = dialog.getPort();

            multicastThread = new Thread(ListenBroadcasts);
            multicastThread.IsBackground = true;
            multicastThread.Start();
        }