Beispiel #1
0
        private void btnContinue_Click(object sender, RoutedEventArgs e)
        {
            PubnubConfigData data = new PubnubConfigData();

            data.ssl = chkSSL.IsChecked.Value;
            data.resumeOnReconnect         = chkReconnect.IsChecked.Value;
            data.publishKey                = txtPublishKey.Text.Trim();
            data.subscribeKey              = txtSubscribeKey.Text.Trim();
            data.cipherKey                 = txtCipherKey.Text.Trim();
            data.secretKey                 = txtSecretKey.Text.Trim();
            data.sessionUUID               = txtSessionUUID.Text.Trim();
            data.origin                    = txtOrigin.Text.Trim();
            data.hideErrorCallbackMessages = chkHideErrors.IsChecked.Value;

            var frame = new Frame();

            frame.Navigate(typeof(PubnubTimeoutSettings), data);
            Window.Current.Content = frame;
        }
Beispiel #2
0
        /// <summary>
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// <para>
        /// Page specific logic should be placed in event handlers for the
        /// <see cref="NavigationHelper.LoadState"/>
        /// and <see cref="NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method
        /// in addition to page state preserved during an earlier session.
        /// </para>
        /// </summary>
        /// <param name="e">Provides data for navigation methods and event
        /// handlers that cannot cancel the navigation request.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);

            data = e.Parameter as PubnubConfigData;

            if (data != null)
            {
                pubnub                              = new Pubnub(data.publishKey, data.subscribeKey, data.secretKey, data.cipherKey, data.ssl);
                pubnub.Origin                       = data.origin;
                pubnub.SessionUUID                  = data.sessionUUID;
                pubnub.SubscribeTimeout             = data.subscribeTimeout;
                pubnub.NonSubscribeTimeout          = data.nonSubscribeTimeout;
                pubnub.NetworkCheckMaxRetries       = data.maxRetries;
                pubnub.NetworkCheckRetryInterval    = data.retryInterval;
                pubnub.LocalClientHeartbeatInterval = data.localClientHeartbeatInterval;
                pubnub.EnableResumeOnReconnect      = data.resumeOnReconnect;
                pubnub.AuthenticationKey            = data.authKey;
                pubnub.PresenceHeartbeat            = data.presenceHeartbeat;
                pubnub.PresenceHeartbeatInterval    = data.presenceHeartbeatInterval;
            }
        }
        /// <summary>
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// <para>
        /// Page specific logic should be placed in event handlers for the  
        /// <see cref="NavigationHelper.LoadState"/>
        /// and <see cref="NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method 
        /// in addition to page state preserved during an earlier session.
        /// </para>
        /// </summary>
        /// <param name="e">Provides data for navigation methods and event
        /// handlers that cannot cancel the navigation request.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);

            data = e.Parameter as PubnubConfigData;

            if (data != null)
            {
                pubnub = new Pubnub(data.publishKey, data.subscribeKey, data.secretKey, data.cipherKey, data.ssl);
                pubnub.Origin = data.origin;
                pubnub.SessionUUID = data.sessionUUID;
                pubnub.SubscribeTimeout = data.subscribeTimeout;
                pubnub.NonSubscribeTimeout = data.nonSubscribeTimeout;
                pubnub.NetworkCheckMaxRetries = data.maxRetries;
                pubnub.NetworkCheckRetryInterval = data.retryInterval;
                pubnub.LocalClientHeartbeatInterval = data.localClientHeartbeatInterval;
                pubnub.EnableResumeOnReconnect = data.resumeOnReconnect;
                pubnub.AuthenticationKey = data.authKey;
                pubnub.PresenceHeartbeat = data.presenceHeartbeat;
                pubnub.PresenceHeartbeatInterval = data.presenceHeartbeatInterval;
            }

        }
        private void btnContinue_Click(object sender, RoutedEventArgs e)
        {
            PubnubConfigData data = new PubnubConfigData();
            data.ssl = chkSSL.IsChecked.Value;
            data.resumeOnReconnect = chkReconnect.IsChecked.Value;
            data.publishKey = txtPublishKey.Text.Trim();
            data.subscribeKey = txtSubscribeKey.Text.Trim();
            data.cipherKey = txtCipherKey.Text.Trim();
            data.secretKey = txtSecretKey.Text.Trim();
            data.sessionUUID = txtSessionUUID.Text.Trim();
            data.origin = txtOrigin.Text.Trim();
            data.hideErrorCallbackMessages = chkHideErrors.IsChecked.Value;

            var frame = new Frame();
            frame.Navigate(typeof(PubnubTimeoutSettings), data);
            Window.Current.Content = frame;
        }
        /// <summary>
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// <para>
        /// Page specific logic should be placed in event handlers for the  
        /// <see cref="NavigationHelper.LoadState"/>
        /// and <see cref="NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method 
        /// in addition to page state preserved during an earlier session.
        /// </para>
        /// </summary>
        /// <param name="e">Provides data for navigation methods and event
        /// handlers that cannot cancel the navigation request.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);

            data = e.Parameter as PubnubConfigData;
        }
Beispiel #6
0
        /// <summary>
        /// The methods provided in this section are simply used to allow
        /// NavigationHelper to respond to the page's navigation methods.
        /// <para>
        /// Page specific logic should be placed in event handlers for the
        /// <see cref="NavigationHelper.LoadState"/>
        /// and <see cref="NavigationHelper.SaveState"/>.
        /// The navigation parameter is available in the LoadState method
        /// in addition to page state preserved during an earlier session.
        /// </para>
        /// </summary>
        /// <param name="e">Provides data for navigation methods and event
        /// handlers that cannot cancel the navigation request.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.navigationHelper.OnNavigatedTo(e);

            data = e.Parameter as PubnubConfigData;
        }