Esempio n. 1
0
        private async void Send_Click(object sender, RoutedEventArgs e)
        {
            Status.Text += "\nSending push to all subscribers...";
            await ParsePush.SendDataAsync(new Dictionary <string, object> {
                { "title", PushTitle.Text },
                { "alert", PushAlert.Text },
            });

            Status.Text += "\nDone sending push.";
        }
Esempio n. 2
0
        private void SendPush(object sender, RoutedEventArgs e)
        {
            var alert = txtAlert.Text;
            var title = txtTitle.Text;

            if (title.Length == 0)
            {
                txtStatus.Text += "\nSending push to everyone with alert: " + alert;
                ParsePush.SendAlertAsync(alert, from installation in ParseInstallation.Query
                                         where installation.DeviceType == "winrt"
                                         select installation);
                ParsePush.SendAlertAsync(alert);
            }
            else
            {
                txtStatus.Text += "\nSending push to everyone with title: " + title + ", alert: " + alert;
                ParsePush.SendDataAsync(new Dictionary <string, object> {
                    { "title", title },
                    { "alert", alert }
                }, from installation in ParseInstallation.Query
                                        where installation.DeviceType == "winrt"
                                        select installation);
            }
        }