Exemple #1
0
        private void btnWhereNow_Click(object sender, RoutedEventArgs e)
        {
            CheckUserInputs();
            uuid = txtUUID.Text;
            if (uuid.Trim() == "")
            {
                MessageBox.Show("UUID is required");
                return;
            }

            if (authKey.Trim() != "")
            {
                pubnub.AuthenticationKey = authKey;
            }

            WhereNowDialog whereNowPopup = new WhereNowDialog();

            whereNowPopup.txtWhereNowUUID.Text = uuid;

            whereNowPopup.Show();

            whereNowPopup.Closed += (obj, args) =>
            {
                if (whereNowPopup.DialogResult == true && whereNowPopup.txtWhereNowUUID.Text.Length > 0)
                {
                    Console.WriteLine("Running WhereNow()");

                    string whereNowUUID = whereNowPopup.txtWhereNowUUID.Text;
                    pubnub.WhereNow <string>(whereNowUUID, DisplayUserCallbackMessage, DisplayErrorMessage);
                }
            };
        }
        private void btnWhereNow_Click(object sender, RoutedEventArgs e)
        {
            CheckUserInputs();
            uuid = txtUUID.Text;
            if (uuid.Trim() == "")
            {
                MessageBox.Show("UUID is required");
                return;
            }

            if (authKey.Trim() != "")
            {
                pubnub.AuthenticationKey = authKey;
            }

            WhereNowDialog whereNowPopup = new WhereNowDialog();
            whereNowPopup.txtWhereNowUUID.Text = uuid;

            whereNowPopup.Show();

            whereNowPopup.Closed += (obj, args) =>
            {
                if (whereNowPopup.DialogResult == true && whereNowPopup.txtWhereNowUUID.Text.Length > 0)
                {
                    Console.WriteLine("Running WhereNow()");

                    string whereNowUUID = whereNowPopup.txtWhereNowUUID.Text;
                    pubnub.WhereNow<string>(whereNowUUID, DisplayUserCallbackMessage, DisplayErrorMessage);
                }
            };
        }