/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNext_Click(object sender, EventArgs e) { // Check mandetory Inputs if (string.IsNullOrEmpty(txtOrigin.Text.Trim())) { MessageBox.Show("Please enter origin"); return; } if (string.IsNullOrEmpty(txtPublishKey.Text.Trim())) { MessageBox.Show("Please enter publish key"); return; } if (string.IsNullOrEmpty(txtSubscribeKey.Text.Trim())) { MessageBox.Show("Please enter subscribe key"); return; } PubnubDemo demoForm = new PubnubDemo(); demoForm.Origin = txtOrigin.Text; demoForm.PublishKey = txtPublishKey.Text; demoForm.SubscribeKey = txtSubscribeKey.Text; demoForm.SecretKey = txtSecretKey.Text; demoForm.CipherKey = txtCipherKey.Text; demoForm.EnableSSL = chkEnableSSL.Checked; demoForm.SessionUUID = txtSessionUUID.Text; demoForm.EnableResumeOnReconnect = chkReconnect.Checked; try { demoForm.PresenceHeartbeatInSec = Int32.Parse(txtPresenceHeartbeat.Text); } catch { } try { demoForm.PresenceHeartbeatIntervalInSec = Int32.Parse(txtPresenceHeartbeatInterval.Text); } catch { } demoForm.PubnubInitialize(); demoForm.Show(); this.Hide(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnNext_Click(object sender, EventArgs e) { // Check mandetory Inputs if (string.IsNullOrEmpty(txtOrigin.Text.Trim())) { MessageBox.Show("Please enter origin"); return; } if (string.IsNullOrEmpty(txtPublishKey.Text.Trim())) { MessageBox.Show("Please enter publish key"); return; } if (string.IsNullOrEmpty(txtSubscribeKey.Text.Trim())) { MessageBox.Show("Please enter subscribe key"); return; } PubnubDemo demoForm = new PubnubDemo(); demoForm.Origin = txtOrigin.Text; demoForm.PublishKey = txtPublishKey.Text; demoForm.SubscribeKey = txtSubscribeKey.Text; demoForm.SecretKey = txtSecretKey.Text; demoForm.CipherKey = txtCipherKey.Text; demoForm.EnableSSL = chkEnableSSL.Checked; demoForm.SessionUUID = txtSessionUUID.Text; demoForm.EnableResumeOnReconnect = chkReconnect.Checked; try { demoForm.PresenceHeartbeatInSec = Int32.Parse(txtPresenceHeartbeat.Text); } catch { } try { demoForm.PresenceHeartbeatIntervalInSec = Int32.Parse(txtPresenceHeartbeatInterval.Text); } catch { } demoForm.PubnubInitialize(); demoForm.Show(); this.Hide(); }