コード例 #1
0
        private void ServerStartButton_OnClick(object Sender, RoutedEventArgs E)
        {
            NetworkComponent comp = MainWindow.Player.GetComponent <NetworkComponent>( );

            comp.ShutdownServer( );
            comp.SetUpNetworkReceiver(Settings.Default.ListenPort);
        }
コード例 #2
0
        private void OnPortChanged(object Sender, RoutedPropertyChangedEventArgs <double?> E)
        {
            if (!this.IsPlayerInitialized)
            {
                return;
            }

            if (!E.NewValue.HasValue)
            {
                return;
            }

            Settings.Default.ListenPort = ( ushort )E.NewValue;
            Settings.Default.Save( );

            NetworkComponent comp = MainWindow.Player.GetComponent <NetworkComponent>( );

            comp.ShutdownServer( );
            comp.SetUpNetworkReceiver(Settings.Default.ListenPort);
            SetQRCodeImage( );
        }