예제 #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="serverUrl"></param>
 /// <param name="org"></param>
 /// <param name="app"></param>
 /// <param name="channel"></param>
 internal Usergrid(string serverUrl, string org, string app, string userId, string password,string notifier)
 {
     string serverUrlWithSlash = serverUrl.EndsWith("/", StringComparison.CurrentCulture) ? serverUrl : serverUrl + "/";
     this.appUrl = String.Format("{0}{1}/{2}/", serverUrlWithSlash, org, app);
     this.managementUrl = serverUrlWithSlash + "management/";
     this.client = new HttpClient();
     Authenticate(userId, password, false).ContinueWith(task => {
         this.push = new PushClient(this, userId, notifier);
     });
 }
예제 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="serverUrl"></param>
        /// <param name="org"></param>
        /// <param name="app"></param>
        /// <param name="channel"></param>
        internal Usergrid(string serverUrl, string org, string app, string userId, string password, string notifier)
        {
            string serverUrlWithSlash = serverUrl.EndsWith("/", StringComparison.CurrentCulture) ? serverUrl : serverUrl + "/";

            this.appUrl        = String.Format("{0}{1}/{2}/", serverUrlWithSlash, org, app);
            this.managementUrl = serverUrlWithSlash + "management/";
            this.client        = new HttpClient();
            Authenticate(userId, password, false).ContinueWith(task => {
                this.push = new PushClient(this, userId, notifier);
            });
        }
        public NotificationsPageViewModel(IPushClient pushUserRegistrationClient)
        {
            this.pushUserRegistrationClient = pushUserRegistrationClient;
            this.Notifications = new ObservableCollection <string>();

            PushContext.Current.RawNotification += this.OnRawNotification;
            PushContext.Current.PropertyChanged +=
                (s, e) =>
            {
                if (e.PropertyName.Equals("IsConnected", StringComparison.OrdinalIgnoreCase))
                {
                    this.NotifyPropertyChanged("ConnectionStatus");
                }
            };
        }
        public NotificationsPageViewModel(IPushClient pushUserRegistrationClient)
        {
            this.pushUserRegistrationClient = pushUserRegistrationClient;
            this.Notifications = new ObservableCollection<string>();

            PushContext.Current.RawNotification += this.OnRawNotification;
            PushContext.Current.PropertyChanged +=
                (s, e) =>
                {
                    if (e.PropertyName.Equals("IsConnected", StringComparison.OrdinalIgnoreCase))
                    {
                        this.NotifyPropertyChanged("ConnectionStatus");
                    }
                };
        }
예제 #5
0
 public MainWindow()
 {
     pc = new PushClient();
     InitializeComponent();
     SetPosition();
 }
예제 #6
0
 public MainWindow()
 {
     pc = new PushClient();
     InitializeComponent();
     SetPosition();
 }