Пример #1
0
 /// <summary>
 /// Switch to TCP mode when the TCP radio button is highlighted
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TCPRadioButton_Checked(object sender, RoutedEventArgs e)
 {
     if (TCPRadioButton != null && TCPRadioButton.IsChecked != null && (bool)TCPRadioButton.IsChecked)
     {
         //Update the application and connectionType
         chatApplication.ConnectionType = ConnectionType.TCP;
         chatApplication.RefreshNetworkCommsConfiguration();
     }
 }
Пример #2
0
        public MainPage()
        {
            this.InitializeComponent();

            //Initialise the chat application
            chatApplication = new ChatAppWinRT(currentMessageInputBox, chatBox, chatBoxScroller);

            //Set the localName text to the hostname
            chatApplication.LocalName = HostInfo.HostName + "_WinRT";
            localNameBox.Text         = HostInfo.HostName + "_WinRT";

            //Set the initial serializer
            chatApplication.Serializer = NetworkCommsDotNet.DPSBase.DPSManager.GetDataSerializer <NetworkCommsDotNet.DPSBase.ProtobufSerializer>();

            //Print out some usage instructions
            chatApplication.PrintUsageInstructions();

            //Initialise the NetworkComms.Net settings
            chatApplication.RefreshNetworkCommsConfiguration();

            Application.Current.Suspending += Application_Suspending;
        }
        public MainPage()
        {
            this.InitializeComponent();

            //Initialise the chat application
            chatApplication = new ChatAppWinRT(currentMessageInputBox, chatBox, chatBoxScroller);

            //Set the localName text to the hostname
            chatApplication.LocalName = HostInfo.HostName + "_WinRT";
            localNameBox.Text = HostInfo.HostName + "_WinRT";

            //Set the initial serializer
            chatApplication.Serializer = NetworkCommsDotNet.DPSBase.DPSManager.GetDataSerializer<NetworkCommsDotNet.DPSBase.ProtobufSerializer>();

            //Print out some usage instructions
            chatApplication.PrintUsageInstructions();

            //Initialise the NetworkComms.Net settings
            chatApplication.RefreshNetworkCommsConfiguration();

            Application.Current.Suspending += Application_Suspending;
        }