четвер, 11 квітня 2013 р.

Вылечил диспетчера во ViewModel

        public Action<Action> CallWithDispatcher;

        void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
        {
            AppSettings settings = new AppSettings();
            if (CallWithDispatcher != null) {
                CallWithDispatcher(() =>
                {
                    settings.PushURLSetting = String.Format("Channel Uri Updated, new Received\n");
                    Uri uri = new Uri((string)settings.URLwpNagSetting + "?cmd=14?&push=" + e.ChannelUri.ToString()); // , UriKind.Relative);
                    WebClient webClient = new WebClient();
                    webClient.Credentials = new NetworkCredential((string)settings.UserNameSetting, (string)settings.UserPasswordSetting);
                    webClient.DownloadStringCompleted += OnRegisterPushCompleted;
                    webClient.DownloadStringAsync(uri);
                });
            }
        }
  

Немає коментарів:

Дописати коментар