void Reconnect_Click(object sender, RoutedEventArgs e) { if (_connection == null) { _connection = Connection.NewConnection(); } Progress.Visibility = Visibility.Visible; _connection.Connect(); }
private void MainPage_Loaded(object sender, RoutedEventArgs e) { if (_connection != null && _connection._isConnectedFirstTime) { return; } this._connection = Connection.NewConnection(); this._connection.addListener(this); this._connection.Connect(); Progress.Visibility = Visibility.Visible; //this.NavigationService.Navigated += RootFrame_Navigated; }