コード例 #1
0
        private void getClipResult(object sender, UploadStringCompletedEventArgs e)
        {
            //获取裁剪结果名称
            string rltName = this._spatial.OnGetAnalyseResult(e);

            if (rltName == null || rltName == "")
            {
                return;
            }
            if (rltName == "*#*")
            {
                timerCnt = 0;
                MessageBox.Show("裁剪失败");
                return;
            }
            else
            {
                cancle(null, null);
                this.iMSMap1.EnableProgressBar = false;
                //裁剪分析成功,叠加显示分析后的图层
                showClipInfo(rltName, this._clipLayerAcsInfo.LayerInfoList[0].LayerType, this._serverAddr);
            }
        }
コード例 #2
0
        /// <summary>呼出しの完了後イベント(一覧取得(dt))</summary>
        void client_SelectAll_DT_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            // レスポンスを ServiceReturnValue 形式に変換
            byte[] byteResponse = Encoding.UTF8.GetBytes(e.Result);
            using (MemoryStream ms = new MemoryStream(byteResponse))
            {
                // JSON 形式のレスポンスを復元するための Serializer
                DataContractJsonSerializer serializer  = new DataContractJsonSerializer(typeof(ReturnDataContract));
                ReturnDataContract         returnValue = (ReturnDataContract)serializer.ReadObject(ms);

                if (returnValue.Error != null)
                {
                    // 例外発生時
                    MessageBox.Show("以下のエラーが発生しました\r\nメッセージ : " + returnValue.Error.Message);
                }
                else
                {
                    // 結果(正常系)
                    // データバインド
                    this.dataGrid1.ItemsSource = returnValue.Info.DicList;
                }
            }
        }
コード例 #3
0
        private static void HandleResponse(
            object _,
            UploadStringCompletedEventArgs args,
            Action <Exception> onError,
            Action <bool, string> onCompletion = null)
        {
            try {
                if (onCompletion != null)
                {
                    bool   success = !args.Cancelled && args.Error == null;
                    string result  = success ? args.Result :
                                     (args.Cancelled ? "Cancelled" : args.Error?.Message ?? "Error");
                    onCompletion(success, result);
                }

                if (args.Error != null)
                {
                    onError(args.Error);
                }
            } catch (Exception e) {
                LogLibraries.Warn(e.GetType().Name + " - " + e.Message);
            }
        }
コード例 #4
0
 private void updateLayerStatus(object sender, UploadStringCompletedEventArgs e)
 {
     if (this._vLayer != null)
     {
         if (flag == 0 || flag.Equals(0))
         {
             this.iMSMap1.RemoveChild(this._vLayer);
         }
     }
     //判断是第一次点击或者是分析成功之后点击
     if (successFlag == 1 || successFlag == 0)
     {
         successFlag = 2;
         this.iMSMap1.Refresh();
         //圆形区域上所有的边界点
         dot = cirObj.GetDots();
         this.CircleClip();
     }
     else
     {
         this.iMSMap1.SetErrorText("正在分析,请在分析成功之后再点击!");
     }
 }
コード例 #5
0
 void Callback(object sender, UploadStringCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null)
         {
         }
         else if (e.Result != null || !string.IsNullOrEmpty(e.Result))
         {
             //getting ProductID in Response
             string finalData = e.Result;
             if (finalData != null)
             {
                 //Deleting Product by ProductID
                 ProductBL.DeleteProduct(Convert.ToInt32(finalData));
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #6
0
        /// <summary>
        /// Get the response of user details web service
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void userdetailswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            LoginResponse objlgresponse = new LoginResponse();


            try
            {
                if (e.Result != null)
                {
                    var response = e.Result.ToString();
                    objlgresponse = Utils.JsonHelper.Deserialize <LoginResponse>(response);
                    if (objlgresponse != null)
                    {
                        if (objlgresponse.status == 0)
                        {
                            if (objlgresponse.payload.status.Equals(RxConstants.userStatusConfirmed))
                            {
                                objVerificationViewModel.IsPopupOpen   = true;
                                objVerificationViewModel.HitVisibility = false;
                            }
                            else
                            {
                                GetUserDetailsWebService();
                            }
                        }
                        else
                        {
                            GetUserDetailsWebService();
                        }
                    }
                }
            }
            catch (Exception)
            {
                objVerificationViewModel.HitVisibility = true;
            }
        }
コード例 #7
0
        private void setFeature(object sender, UploadStringCompletedEventArgs e)
        {
            CLayerSelectAndGetAtt obj = this.IMSCatalog.ActiveLayerObj.OnLayerSelectAndGetAtt(e);

            if (obj == null)
            {
                MessageBox.Show("未获取到要素");
                this.m_graphicsLayer.DrawingType         = DrawingType.Point;
                this.m_graphicsLayer.DrawingOverCallback = new DrawingEventHandler(Drawpoint_callback);
                return;
            }
            CAttDataTable curRltTable = obj.AttDS[this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex].attTables[this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex];

            if (obj.AttDS[this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex].attTables[this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex] != null)
            {
                CAttDataRow[] curRltRows = obj.AttDS[this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex].attTables[this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex].Rows;
                if (curRltRows == null)
                {
                    MessageBox.Show("未获取到要素");
                    this.m_graphicsLayer.DrawingType         = DrawingType.Point;
                    this.m_graphicsLayer.DrawingOverCallback = new DrawingEventHandler(Drawpoint_callback);
                    return;
                }
                CAttDataRow   row    = curRltTable.Rows[0] as CAttDataRow;
                CLayerGetByID getGeo = new CLayerGetByID();
                getGeo.FeatureID  = row.FID;
                getGeo.GdbIndex   = this.IMSCatalog.ActiveLayerObj.ActiveGdbIndex;
                getGeo.LayerIndex = this.IMSCatalog.ActiveLayerObj.ActiveLayerIndex;
                this.IMSCatalog.ActiveLayerObj.GetGeomByFID(getGeo, flashFeature);
            }
            else
            {
                MessageBox.Show("未获取到要素");
                this.m_graphicsLayer.DrawingType         = DrawingType.Point;
                this.m_graphicsLayer.DrawingOverCallback = new DrawingEventHandler(Drawpoint_callback);
            }
        }
コード例 #8
0
        private void sendPostCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            if ((e.Error != null) && (e.Error.GetType().Name == "WebException"))
            {
                WebException    we       = (WebException)e.Error;
                HttpWebResponse response = (System.Net.HttpWebResponse)we.Response;

                switch (response.StatusCode)
                {
                case HttpStatusCode.NotFound:     // 404
                    System.Diagnostics.Debug.WriteLine("no esta usado el mail!");
                    ProgressB.IsIndeterminate = false;
                    Connecting.Visibility     = System.Windows.Visibility.Collapsed;
                    ErrorBlockReg.Visibility  = System.Windows.Visibility.Collapsed;

                    LoggedUser.Instance.userReg.Name       = NombreIngresado.Text;
                    LoggedUser.Instance.userReg.Mail       = MailIngresado.Text;
                    LoggedUser.Instance.userReg.Password   = PassIngresadoReg.Password;
                    LoggedUser.Instance.userReg.FacebookId = "";
                    LoggedUser.Instance.userReg.LinkedInId = "";
                    LoggedUser.Instance.userReg.Id         = "";
                    NavigationService.Navigate(new Uri("/LoggedMainPages/Register2.xaml", UriKind.Relative));
                    break;

                case HttpStatusCode.Unauthorized:     // 401
                    System.Diagnostics.Debug.WriteLine("ya fue usado el mail!");
                    ErrorBlockReg.Text        = AppResources.alreadyUsedEmail;
                    ProgressB.IsIndeterminate = false;
                    Connecting.Visibility     = System.Windows.Visibility.Collapsed;
                    ErrorBlockReg.Visibility  = System.Windows.Visibility.Visible;
                    break;

                default:
                    break;
                }
            }
        }
コード例 #9
0
        private void client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            if (e.Cancelled == false & e.Error == null)
            {
                string[] result = e.Result.ToString().Split('|');
                //*** Check Status
                if (result[0].ToString() == "0")
                {
                    MessageBox.Show(result[1].ToString());
                }
                else
                {
                    MessageBox.Show("Save Data Successfully");
                    this.txtUsername.Text        = "";
                    this.txtPassword.Password    = "";
                    this.txtConPassword.Password = "";
                    this.txtName.Text            = "";
                    this.txtTel.Text             = "";
                    this.txtEmail.Text           = "";
                }

                prog.IsVisible = false;
            }
        }
コード例 #10
0
ファイル: RSService.cs プロジェクト: asmboom/rs-unity
        /**
         * Handles the callback response for normal string data.
         */
        protected void NonRenderCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            if (e.Cancelled || e.Error != null)
            {
                string errorMessage = "Download was cancelled or there was an error.";
                if (e.Error != null)
                {
                    errorMessage += "\n- Error: " + e.Error.ToString();
                }
                Logger.Log("error", errorMessage);
                ErrorAllCallbacks("Null response from server");
                return;
            }

            string s = (string)e.Result;

            if (s == null || s == "")
            {
                Logger.Log("error", "Null or empty result from server.");
                ErrorAllCallbacks("Null response from server");
                return;
            }
            ProcessResponses(s);
        }
コード例 #11
0
        public void uCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            //MessageBox.Show(e.Result); //debug mode

            //butonu aktif ediyoruz
            m_button.IsEnabled = true;

            try
            {
                if (classes.Oauth.ParseXML("result", e.Result) == "1" && classes.Oauth.ParseXML("result_text", e.Result) == "")
                {
                    //MessageBox.Show("Mesaj başarıyla gönderildi.");
                    conv.ConvSend.add_message = 1;
                    NavigationService.GoBack();
                    //NavigationService.Navigate(new Uri("/ForumPost.xaml?forum_id=" + forum_id + "&topic_id=" + topic_id + "&post_count=" + (post_count + 1).ToString() + "&redirected", UriKind.Relative));
                }
                else if (classes.Oauth.ParseXML("result", e.Result) == "0" && classes.Oauth.ParseXML("result_text", e.Result) != "")
                {
                    MessageBox.Show(classes.General.DecodeBase64(classes.Oauth.ParseXML("result_text", e.Result)));
                }
            }
            catch (TargetInvocationException ex)
            {
                //BugSenseHandler.Instance.SendExceptionAsync(ex);

                MessageBox.Show("Lütfen yeniden deneyin.");
                //MessageBox.Show(ex.Message);
            }
            catch (Exception ex)
            {
                //BugSenseHandler.Instance.SendExceptionAsync(ex);

                MessageBox.Show("Bir hata oluştu : c0x011");
                //General.SendBugReport(e.Result, "c0x011", ex.Message, ex.Source, ex.HelpLink);
            }
        }
コード例 #12
0
        void onCreateApplicationCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            if (e.Cancelled || CreateViewerApplicationFromTemplateCompleted == null)
            {
                return;
            }

            Exception error = e.Error;

            if (error == null)
            {
                error = GetErrorIfAny(e.Result);
            }

            Site site = null;

            if (error == null)
            {
                site = getSiteFromString(e.Result);
            }
            else
            {
                // This generic message is displayed because, previously, the message was "not beneficial". The
                // frequent case for failure here is because the size of the request made to the server exceeds
                // a buffer length. Until we can return a more specific error for that case, this generic message
                // must suffice.
                error = new Exception(ESRI.ArcGIS.Mapping.Builder.Resources.Strings.UnableToDeployApplication, error);
            }

            CreateViewerApplicationFromTemplateCompleted(this, new CreateViewerApplicationFromTemplateCompletedEventArgs()
            {
                Site      = site,
                UserState = e.UserState,
                Error     = error,
            });
        }
コード例 #13
0
        /// <summary>
        /// 删除完毕回调
        /// </summary>
        private void OnDeleteFeature(object sender, UploadStringCompletedEventArgs e)
        {
            COperResult rlt = m_catalog.ActiveMapDoc.OnDeleteFeature(e);

            if (rlt.OperResult == true)
            {
                MessageBox.Show("删除成功", "提示", MessageBoxButton.OK);
                if (m_lastSelDataGrid != null && m_lastSelItem != null && m_lastSelDataGrid.ItemsSource is List <BindClass> )
                {
                    (m_lastSelDataGrid.ItemsSource as List <BindClass>).Remove(m_lastSelItem);
                    IEnumerable ie = m_lastSelDataGrid.ItemsSource;
                    m_lastSelDataGrid.ItemsSource = null;
                    m_lastSelDataGrid.ItemsSource = ie;
                }
                //m_catalog.ActiveMapDoc.Refresh();
                m_catalog.ActiveMapDoc.MapContainer.OperType = IMSOperType.Refresh;
            }
            else
            {
                MessageBox.Show("删除失败,错误信息:" + rlt.ErrorInfo, "提示", MessageBoxButton.OK);
            }
            m_lastSelDataGrid = null;
            m_lastSelItem     = null;
        }
コード例 #14
0
        public void yCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            try
            {
                if (classes.Oauth.ParseXML("result", e.Result) == "1" && classes.Oauth.ParseXML("result_text", e.Result) == "")
                {
                    MessageBox.Show("Katılımcı(lar) başarıyla eklendi.");
                    addparticipants.Visibility = Visibility.Collapsed;

                    SetButton(0, (current_page < 2) ? false : true);
                    SetButton(1, (message.Text.Length > 0) ? true : false);
                    SetButton(2, true);
                    SetButton(3, (current_page >= total_page) ? false : true);

                    add_prtcpn.Text = "";
                }
                else if (classes.Oauth.ParseXML("result", e.Result) == "0" && classes.Oauth.ParseXML("result_text", e.Result) != "")
                {
                    MessageBox.Show(classes.General.DecodeBase64(classes.Oauth.ParseXML("result_text", e.Result)));
                }
            }
            catch (TargetInvocationException ex)
            {
                //BugSenseHandler.Instance.SendExceptionAsync(ex);

                MessageBox.Show("Lütfen yeniden deneyin.");
                //MessageBox.Show(ex.Message);
            }
            catch (Exception ex)
            {
                //BugSenseHandler.Instance.SendExceptionAsync(ex);

                MessageBox.Show("Bir hata oluştu : c0x007");
                //General.SendBugReport(e.Result, "c0x007", ex.Message, ex.Source, ex.HelpLink);
            }
        }
コード例 #15
0
        /// <summary>呼出しの完了後イベント(参照処理)</summary>
        void client_Select_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            // レスポンスを ServiceReturnValue 形式に変換
            byte[] byteResponse = Encoding.UTF8.GetBytes(e.Result);
            using (MemoryStream ms = new MemoryStream(byteResponse))
            {
                // XML 形式のレスポンスを復元するための Serializer
                DataContractSerializer serializer  = new DataContractSerializer(typeof(ReturnDataContract));
                ReturnDataContract     returnValue = (ReturnDataContract)serializer.ReadObject(ms);

                if (returnValue.Error != null)
                {
                    // 例外発生時
                    MessageBox.Show("以下のエラーが発生しました\r\nメッセージ : " + returnValue.Error.Message);
                }
                else
                {
                    // 結果(正常系)
                    Dictionary <string, string> dic = returnValue.Info.Dictionary;
                    this.textBox2.Text = dic["CompanyName"].ToString();
                    this.textBox3.Text = dic["Phone"].ToString();
                }
            }
        }
コード例 #16
0
ファイル: YapperServiceProxy.cs プロジェクト: nrag/yapper
        private void NewConversationCreated(object sender, UploadStringCompletedEventArgs e)
        {
            MessageModel message = null;

            if (e.Error == null)
            {
                DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(MessageModel));
                message = (MessageModel)jsonSerializer.ReadObject(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(e.Result)));
            }
            else
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    if (UserSettingsModel.Instance.DebugEnabled == true)
                    {
                        MessageBox.Show(e.Error.Message);
                    }
                });
            }

            Action <MessageModel> callback = e.UserState as Action <MessageModel>;

            callback(message);
        }
コード例 #17
0
ファイル: YapperServiceProxy.cs プロジェクト: nrag/yapper
        private void UpdateUserPublicKeyCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            Action <bool> callback = e.UserState as Action <bool>;

            callback(e.Error == null);
        }
コード例 #18
0
        void OnUploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            Debug.WriteLine(e.Result);

            string noteurl = e.Result;

            Border border = new Border();

            border.BorderBrush     = new SolidColorBrush(Colors.White);
            border.BorderThickness = new Thickness(0.0);

            StackPanel panel1 = new StackPanel();

            panel1.Background = new SolidColorBrush(Colors.Black);
            Button button1 = new Button();

            button1.Content    = "Close";
            button1.FontSize   = 22;
            button1.Margin     = new Thickness(10, 220, 10, 5);
            button1.Click     += new RoutedEventHandler(button1_Click);
            button1.FontFamily = new FontFamily("PhoneFontFamilySemiBold");
            button1.HorizontalContentAlignment = HorizontalAlignment.Left;
            button1.Padding = new Thickness(10.0);

            Button buttonSMS = new Button();

            buttonSMS.Content  = "Send link by SMS";
            buttonSMS.FontSize = 22;
            buttonSMS.HorizontalContentAlignment = HorizontalAlignment.Left;
            buttonSMS.FontFamily = new FontFamily("PhoneFontFamilySemiBold");
            buttonSMS.Margin     = new Thickness(10, 3, 10, 5);
            buttonSMS.Click     += new RoutedEventHandler(buttonSMS_Click);
            buttonSMS.Padding    = new Thickness(10.0);

            Button buttonEmail = new Button();

            buttonEmail.Content    = "Send link by Email";
            buttonEmail.FontSize   = 22;
            buttonEmail.FontFamily = new FontFamily("PhoneFontFamilySemiBold");
            buttonEmail.HorizontalContentAlignment = HorizontalAlignment.Left;
            buttonEmail.Margin  = new Thickness(10, 3, 10, 5);
            buttonEmail.Click  += new RoutedEventHandler(buttonEmail_Click);
            buttonEmail.Padding = new Thickness(10.0);

            Button postTweet = new Button();

            postTweet.Content    = "Share link to Twitter";
            postTweet.FontSize   = 22;
            postTweet.FontFamily = new FontFamily("PhoneFontFamilySemiBold");
            postTweet.HorizontalContentAlignment = HorizontalAlignment.Left;
            postTweet.Margin  = new Thickness(10, 3, 10, 5);
            postTweet.Click  += new RoutedEventHandler(buttonTweet_Click);
            postTweet.Padding = new Thickness(10.0);

            Button postFacebook = new Button();

            postFacebook.Content    = "Share link to Facebook";
            postFacebook.FontSize   = 22;
            postFacebook.FontFamily = new FontFamily("PhoneFontFamilySemiBold");
            postFacebook.HorizontalContentAlignment = HorizontalAlignment.Left;
            postFacebook.Margin  = new Thickness(10, 3, 10, 5);
            postFacebook.Click  += new RoutedEventHandler(buttonFB_Click);
            postFacebook.Padding = new Thickness(10.0);

            TextBlock titleBlock = new TextBlock();

            titleBlock.Text = "Link";
            // titleBlock.FontFamily = new FontFamily("PhoneFontFamilyBold");
            titleBlock.FontSize   = 32;
            titleBlock.Foreground = new SolidColorBrush(Colors.White);
            titleBlock.FontWeight = FontWeights.SemiBold;

            titleBlock.Margin = new Thickness(24, 48, 10, 5);

            TextBlock textblock1 = new TextBlock();

            textblock1.Text         = noteurl;
            textblock1.FontSize     = 24;
            textblock1.FontFamily   = new FontFamily("PhoneFontFamilySemiBold");
            textblock1.Margin       = new Thickness(24, 24, 0, 15);
            textblock1.Foreground   = new SolidColorBrush(Colors.White);
            textblock1.Width        = 460;
            textblock1.TextWrapping = TextWrapping.Wrap;

            panel1.Children.Add(titleBlock);
            panel1.Children.Add(textblock1);
            panel1.Children.Add(buttonEmail);
            panel1.Children.Add(buttonSMS);
            panel1.Children.Add(postTweet);
            panel1.Children.Add(postFacebook);
            panel1.Children.Add(button1);
            border.Child = panel1;

            // Set the Child property of Popup to the border
            // which contains a stackpanel, textblock and button.
            p.Child = border;

            // Set where the popup will show up on the screen.
            p.VerticalOffset   = 0;
            p.HorizontalOffset = 0;


            link = noteurl;

            killProgress();

            // Open the popup.
            p.IsOpen = true;
        }
コード例 #19
0
        void display_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            lock (this)
            {
                string s = e.Result;
                // **** split into different sub strings
                int i = 0;


                for (i = 0; s[i] != '\n'; i++)
                {
                    questionString += s[i];
                }

                i++;

                if (s[i] == '\0')
                {
                    goto end;
                }


                for (; s[i] != '\n'; i++)
                {
                    op1String += s[i];
                }
                i++;


                if (s[i] == '\0')
                {
                    goto end;
                }

                for (; s[i] != '\n'; i++)
                {
                    op2String += s[i];
                }

                i++;


                if (s[i] == '\0')
                {
                    goto end;
                }


                for (; s[i] != '\n'; i++)
                {
                    op3String += s[i];
                }


                i++;


                if (s[i] == '\0')
                {
                    goto end;
                }


                for (; s[i] != '\n'; i++)
                {
                    op4String += s[i];
                }

                i++;


                if (s[i] == '\0')
                {
                    goto end;
                }


                for (; s[i] != '\n'; i++)
                {
                    op5String += s[i];
                }



end:

                mainTextBlock.Text = questionString;
                ans1TextBlock.Text = op1String;
                ans2TextBlock.Text = op2String;
                ans3TextBlock.Text = op3String;
                ans4TextBlock.Text = op4String;
                ans5TextBlock.Text = op5String;
            }
        }
コード例 #20
0
        private async void client_UploadRatingStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            try
            {
                String jsonString = e.Result;
                if (type.Equals("movie"))
                {
                    String imdb;
                    Int16  rating = Int16.Parse(this.selector.DataSource.SelectedItem.ToString());
                    NavigationContext.QueryString.TryGetValue("imdb", out imdb);
                    MovieController controller = new MovieController();
                    TraktMovie      movie      = await controller.getMovieByImdbId(imdb);

                    movie.MyRatingAdvanced = rating;
                    if (rating > 5)
                    {
                        movie.MyRating = "Loved";
                    }
                    else
                    {
                        movie.MyRating = "Hated";
                    }

                    controller.updateMovie(movie);
                }
                else if (type.Equals("show"))
                {
                    String imdb;
                    String tvdb;
                    Int16  rating = Int16.Parse(this.selector.DataSource.SelectedItem.ToString());
                    NavigationContext.QueryString.TryGetValue("imdb", out imdb);
                    NavigationContext.QueryString.TryGetValue("tvdb", out tvdb);
                    ShowController controller = new ShowController();
                    TraktShow      show       = controller.getShowByIMDBID(imdb);

                    if (show == null)
                    {
                        show = await controller.getShowByTVDBID(tvdb);
                    }
                    show.MyRatingAdvanced = rating;
                    if (rating > 5)
                    {
                        show.MyRating = "Loved";
                    }
                    else
                    {
                        show.MyRating = "Hated";
                    }

                    if (App.ShowViewModel != null)
                    {
                        App.ShowViewModel.MyRating         = "true";
                        App.ShowViewModel.MyRatingAdvanced = rating;
                    }
                    controller.updateShow(show);
                }
                else if (type.Equals("episode"))
                {
                    String imdb;
                    String tvdbId;
                    String year;
                    String title;
                    String season;
                    String episode;

                    NavigationContext.QueryString.TryGetValue("imdb", out imdb);
                    NavigationContext.QueryString.TryGetValue("tvdb", out tvdbId);
                    NavigationContext.QueryString.TryGetValue("year", out year);
                    NavigationContext.QueryString.TryGetValue("title", out title);
                    NavigationContext.QueryString.TryGetValue("season", out season);
                    NavigationContext.QueryString.TryGetValue("episode", out episode);

                    Int16 rating = Int16.Parse(this.selector.DataSource.SelectedItem.ToString());

                    EpisodeController controller     = new EpisodeController();
                    ShowController    showController = new ShowController();

                    TraktShow show = await showController.getShowByTVDBID(tvdbId);

                    TraktEpisode traktEpisode = await controller.getEpisodeByTvdbAndSeasonInfo(tvdbId, season, episode, show);

                    traktEpisode.MyRatingAdvanced = rating;
                    if (rating > 5)
                    {
                        traktEpisode.MyRating = "Loved";
                    }
                    else
                    {
                        traktEpisode.MyRating = "Hated";
                    }

                    if (controller.updateEpisode(traktEpisode))
                    {
                        if (App.ShowViewModel != null && !String.IsNullOrEmpty(App.ShowViewModel.Tvdb) && App.ShowViewModel.Tvdb.Equals(show.tvdb_id))
                        {
                            App.ShowViewModel.updateEpisode(traktEpisode);
                        }

                        if (App.EpisodeViewModel != null && !String.IsNullOrEmpty(App.EpisodeViewModel.Tvdb) && App.EpisodeViewModel.Tvdb.Equals(show.tvdb_id))
                        {
                            App.EpisodeViewModel.MyRating         = "true";
                            App.EpisodeViewModel.MyRatingAdvanced = rating;
                        }
                    }
                    else
                    {
                        ErrorManager.ShowConnectionErrorPopup();
                        NavigationService.GoBack();
                    }
                }
                MessageBox.Show("Rated successfull.");
            }
            catch (WebException)
            {
                ErrorManager.ShowConnectionErrorPopup();
            }
            catch (TargetInvocationException) { ErrorManager.ShowConnectionErrorPopup(); }

            NavigationService.GoBack();
        }
コード例 #21
0
 /// <summary>
 /// 删除标记完成
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void wc_DeletionCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     paperGrid_SelectionChanged(null, null);
 }
コード例 #22
0
ファイル: YapperServiceProxy.cs プロジェクト: nrag/yapper
 private void SetLastSyncDateTimeCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     Debug.WriteLine(string.Format("{0} {1} {2}", DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt"), "YapperServiceProxy::SetLastSyncDateTime ", "end"));
 }
コード例 #23
0
 void OnGetBusRlt(object sender, UploadStringCompletedEventArgs e)
 {
     button1.IsEnabled = true;
     if (e.Error == null)
     {
         string response = e.Result;
         if (response == null || response == "")
         {
             MessageBox.Show("没有查到线路!", "提示", MessageBoxButton.OK);
             return;
         }
         else if (response.IndexOf('$') < 0)
         {
             MessageBox.Show(response, "提示", MessageBoxButton.OK);
             return;
         }
         Clear();
         int      _idx       = 0;
         string[] busWayAnly = response.Split('$'); //方案数组
         string[] oneBusWay;                        //一个方案中的所有公交路线
         for (int i = 0; i < busWayAnly.Length; i++)
         {
             string stopInfo = "";
             int    wayRecom = 0;
             string busLin   = "";
             //int busStopsCount			= 0;//一个换乘方案的车站站点计数
             //List<Node> tmpSpecialNodeArray	= new List<Node>();//暂时存放特殊站点的Array,结构为Node
             //List<Node> tmpNormalNodeArray = new List<Node>();//暂时存放普通站点的Array,结构为Node
             int    stopsSeq      = -1;      //标识一个乘车方案的车站站点序列,0为起点序列
             int    isStartWalked = -1;      //标识是否在起点车站步行
             double walkLength    = 0;       //行走距离
             int    hcTimes       = 0;       //换乘次数
             String curtail       = "";      //简略的换乘方案
             String lstStopName   = "";      //记录最后一个站点的名称
             double lstStopX      = -1;
             double lstStopY      = -1;
             if (busWayAnly[i] != null)
             {
                 oneBusWay = busWayAnly[i].Split('#');////一个方案中的所有公交路线
                 Paragraph paragraph    = new Paragraph();
                 Label     busRoadLabel = new Label()
                 {
                     FontWeight = FontWeights.Bold, FontSize = 14
                 };
                 paragraph.Inlines.Add(new InlineUIContainer()
                 {
                     Child = busRoadLabel
                 });
                 busReslut.Blocks.Add(paragraph);
                 Label roadLenInfo = new Label();
                 paragraph = new Paragraph();
                 paragraph.Inlines.Add(new InlineUIContainer()
                 {
                     Child = roadLenInfo
                 });
                 paragraph.Inlines.Add(new Run()
                 {
                     Text = "   "
                 });
                 paragraph.Inlines.Add(GetRoadShowButton(_idx++));
                 busReslut.Blocks.Add(paragraph);
                 _road.Add(new BusRoad(MarkLayer, GraphicsLayer));
                 for (int j = 0; j < oneBusWay.Length; j++)
                 {
                     if (oneBusWay[j] == null || oneBusWay[j] == "" || oneBusWay[j].Split('|')[1] == null || oneBusWay[j].Split('|')[1] == "")
                     {
                         continue;
                     }
                     String oneBusName  = oneBusWay[j].Split('|')[0];               //一条公交路线的名称
                     String oneStopInfo = oneBusWay[j].Split('|')[1].Split('@')[0]; //一条公交路线的所有车站名称及坐标数组
                     if (oneStopInfo == null || oneStopInfo == "")
                     {
                         continue;
                     }
                     string[] tmpStopInfo   = oneStopInfo.Split(',');                   //存放站点名称坐标数组
                     String   oneBusLin     = oneBusWay[j].Split('|')[1].Split('@')[1]; //一条公交线路的坐标
                     String   oneStartStop  = tmpStopInfo[0];
                     double   oneStartStopX = Convert.ToDouble(tmpStopInfo[1]);
                     double   oneStartStopY = Convert.ToDouble(tmpStopInfo[2]);
                     String   oneLastStop   = tmpStopInfo[tmpStopInfo.Length - 3];//一条线路终止站点
                     double   oneLastStopX  = Convert.ToDouble(tmpStopInfo[tmpStopInfo.Length - 2]);
                     double   oneLastStopY  = Convert.ToDouble(tmpStopInfo[tmpStopInfo.Length - 1]);
                     stopInfo += oneStopInfo + "@";                       //一套方案中的所有车站信息
                     wayRecom  = (oneStopInfo.Split(',').Length / 3) - 1; //一条线路经过的车站数
                     busLin   += oneBusLin + ",";
                     string    fx          = CheckDirction(oneStartStopX, oneStartStopY, oneLastStopX, oneLastStopY);
                     Paragraph myParagraph = new Paragraph();
                     string    txt         = "";
                     if (oneBusName == null || oneBusName.Length == 0)
                     {
                         if (j == 0)
                         {   //起点车站需要步行
                             isStartWalked = 1;
                             stopsSeq++;
                             //tmpSpecialNodeArray.Add(new Node(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), stopsSeq, 0)); //起点车站需要步行 只标识其为起点
                             //IMSRoad(this._road[i]).addNode(tmpStopInfo[0],tmpStopInfo[1],tmpStopInfo[2],stopsSeq,"image/bus/walk.png");
                             _road[_road.Count - 1].AddNode(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), "image/bus/walk.png");
                             walkLength = Math.Round(GetLength(oneBusLin), 1);
                             myParagraph.Inlines.Add(GetImage("/images/bus/walk.png"));
                             myParagraph.Inlines.Add(GetLinkButton(oneStartStop, oneStartStopX, oneStartStopY));
                             txt = "出发往|" + fx + "|方向行走约|" + walkLength + "|米";
                             if (oneStartStop == oneLastStop)
                             {
                                 txt += "至附近同名站点";
                             }
                             else
                             {
                                 txt += "至";
                             }
                             GetText(myParagraph, txt);
                             myParagraph.Inlines.Add(GetLinkButton(oneLastStop, oneLastStopX, oneLastStopY));
                         }
                         else if (j == oneBusWay.Length - 2)  //终点车站需要步行
                         {
                             stopsSeq++;
                             //tmpSpecialNodeArray.Add(new Node(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), stopsSeq, 3));
                             //IMSRoad(this._road[i]).addNode(tmpStopInfo[0],tmpStopInfo[1],tmpStopInfo[2],stopsSeq,"image/bus/walk.png");
                             _road[_road.Count - 1].AddNode(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), "/images/bus/walk.png");
                             walkLength = Math.Round(GetLength(oneBusLin), 1);
                             myParagraph.Inlines.Add(GetImage("/images/bus/walk.png"));
                             GetText(myParagraph, "往" + fx + "方向行走约|" + walkLength + "|米至");
                             myParagraph.Inlines.Add(GetLinkButton(oneLastStop, oneLastStopX, oneLastStopY));
                         }
                         else
                         { //换乘车站间需要步行
                             stopsSeq++;
                             //tmpSpecialNodeArray.Add(new Node(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), stopsSeq, 3));
                             //IMSRoad(this._road[i]).addNode(tmpStopInfo[0],tmpStopInfo[1],tmpStopInfo[2],stopsSeq,"image/bus/walk.png");
                             _road[_road.Count - 1].AddNode(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), "/images/bus/walk.png");
                             walkLength = Math.Round(GetLength(oneBusLin), 1);
                             myParagraph.Inlines.Add(GetImage("/images/bus/walk.png"));
                             txt = "从";
                             myParagraph.Inlines.Add(GetLinkButton(oneStartStop, oneStartStopX, oneStartStopY));
                             if (oneStartStop == oneLastStop)
                             {
                                 txt += "出发往" + fx + "方向行走约|" + walkLength + "|米至附近同名站点";
                             }
                             else
                             {
                                 txt += "出发往" + fx + "方向行走约|" + walkLength + "|米至";
                             }
                             GetText(myParagraph, txt);
                             myParagraph.Inlines.Add(GetLinkButton(oneLastStop, oneLastStopX, oneLastStopY));
                         }
                     }
                     else if (j == 0)
                     {
                         hcTimes++;
                         curtail += oneBusName.Split('(')[0] + "路";
                         myParagraph.Inlines.Add(GetImage("/images/bus/qidian.png"));
                         stopsSeq++;
                         //tmpSpecialNodeArray.Add(new Node(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), stopsSeq, 0)); //标识为起点
                         //IMSRoad(this._road[i]).addNode(tmpStopInfo[0],tmpStopInfo[1],tmpStopInfo[2],stopsSeq,"image/bus/qidian.png");
                         _road[_road.Count - 1].AddNode(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), "/images/bus/qidian.png");
                         myParagraph.Inlines.Add(GetLinkButton(oneStartStop, oneStartStopX, oneStartStopY));
                         txt = "乘 |" + oneBusName + "| 经 |" + wayRecom + "| 个站点";
                         for (int k = 3; k < tmpStopInfo.Length - 3; k += 3)
                         {
                             stopsSeq++;
                             //tmpNormalNodeArray.Add(new Node(tmpStopInfo[k], Convert.ToDouble(tmpStopInfo[k + 1]), Convert.ToDouble(tmpStopInfo[k + 2]), stopsSeq, 2));
                             //IMSRoad(this._road[i]).addNode(tmpStopInfo[k],tmpStopInfo[k + 1],tmpStopInfo[k + 2],stopsSeq,"image/bus/stop.png");
                             _road[_road.Count - 1].AddNode(tmpStopInfo[k], Convert.ToDouble(tmpStopInfo[k + 1]), Convert.ToDouble(tmpStopInfo[k + 2]), "/images/bus/stop.png");
                         }
                         GetText(myParagraph, txt + "在");
                         myParagraph.Inlines.Add(GetLinkButton(oneLastStop, oneLastStopX, oneLastStopY));
                         GetText(myParagraph, "下车");
                     }
                     else
                     {
                         hcTimes++;
                         if (isStartWalked == 1)
                         {
                             isStartWalked = -1;
                             stopsSeq++;
                             //tmpSpecialNodeArray.Add(new Node(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), stopsSeq, 1)); //起点车站需要步行 只标识其为乘车点
                             //IMSRoad(this._road[i]).addNode(tmpStopInfo[0],tmpStopInfo[1],tmpStopInfo[2],stopsSeq,"image/bus/bus.png");
                             _road[_road.Count - 1].AddNode(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), "/images/bus/bus.png");
                             myParagraph.Inlines.Add(GetImage("/images/bus/bus.png"));
                             txt = " 乘 |" + oneBusName + "| 经 |" + wayRecom + "| 个站点";
                             for (int k = 3; k < tmpStopInfo.Length - 3; k += 3)
                             {
                                 stopsSeq++;
                                 //tmpNormalNodeArray.Add(new Node(tmpStopInfo[k], Convert.ToDouble(tmpStopInfo[k + 1]), Convert.ToDouble(tmpStopInfo[k + 2]), stopsSeq, 2));
                                 //IMSRoad(this._road[i]).addNode(tmpStopInfo[k],tmpStopInfo[k+1],tmpStopInfo[k+2],stopsSeq,"image/bus/stop.png");
                                 _road[_road.Count - 1].AddNode(tmpStopInfo[k], Convert.ToDouble(tmpStopInfo[k + 1]), Convert.ToDouble(tmpStopInfo[k + 2]), "/images/bus/stop.png");
                             }
                             GetText(myParagraph, txt + "在");
                             myParagraph.Inlines.Add(GetLinkButton(oneLastStop, oneLastStopX, oneLastStopY));
                             GetText(myParagraph, "下车");
                             curtail += oneBusName.Split('(')[0] + "路";
                         }
                         else
                         {
                             myParagraph.Inlines.Add(GetImage("/images/bus/shift.png"));                          //换乘
                             stopsSeq++;
                             //tmpSpecialNodeArray.Add(new Node(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), stopsSeq, 4)); //标识为换乘点
                             //IMSRoad(this._road[i]).addNode(tmpStopInfo[0],tmpStopInfo[1],tmpStopInfo[2],stopsSeq,"image/bus/shift.png");
                             _road[_road.Count - 1].AddNode(tmpStopInfo[0], Convert.ToDouble(tmpStopInfo[1]), Convert.ToDouble(tmpStopInfo[2]), "/images/bus/shift.png");
                             txt = " 换乘 |" + oneBusName + "| 经 |" + wayRecom + "| 个站点";
                             for (int k = 3; k < tmpStopInfo.Length - 3; k += 3)
                             {
                                 stopsSeq++;
                                 //tmpNormalNodeArray.Add(new Node(tmpStopInfo[k], Convert.ToDouble(tmpStopInfo[k + 1]), Convert.ToDouble(tmpStopInfo[k + 2]), stopsSeq, 2));
                                 //IMSRoad(this._road[i]).addNode(tmpStopInfo[k],tmpStopInfo[k+1],tmpStopInfo[k+2],stopsSeq,"image/bus/stop.png");
                                 _road[_road.Count - 1].AddNode(tmpStopInfo[k], Convert.ToDouble(tmpStopInfo[k + 1]), Convert.ToDouble(tmpStopInfo[k + 2]), "/images/bus/stop.png");
                             }
                             GetText(myParagraph, txt + "在");
                             myParagraph.Inlines.Add(GetLinkButton(oneLastStop, oneLastStopX, oneLastStopY));
                             GetText(myParagraph, "下车");
                             curtail += " 转 " + oneBusName.Split('(')[0] + "路";
                         }
                     }
                     int tmpIndex = tmpStopInfo.Length - 1;
                     lstStopName = tmpStopInfo[tmpIndex - 2];
                     lstStopX    = Convert.ToDouble(tmpStopInfo[tmpIndex - 1]);
                     lstStopY    = Convert.ToDouble(tmpStopInfo[tmpIndex]);
                     busReslut.Blocks.Add(myParagraph);
                 }
                 stopsSeq++;
                 //tmpSpecialNodeArray.Add(new Node(lstStopName, lstStopX, lstStopY, stopsSeq, 5)); //标识终点车站
                 //IMSRoad(this._road[i]).addNode(lstStopName,lstStopX,lstStopY,stopsSeq,"image/bus/zhongdian.png");
                 _road[_road.Count - 1].AddNode(lstStopName, lstStopX, lstStopY, "/images/bus/zhongdian.png");
                 //IMSRoad(this._road[i])._roadCoorArr = busLin;
                 _road[_road.Count - 1].RoadCoorArr = busLin.Split(',');
                 String busInfo = hcTimes == 1 ? "[直达]" : ("[换乘" + (hcTimes - 1) + "次]");
                 busRoadLabel.Content = (i + 1).ToString() + ". " + curtail + busInfo;
                 roadLenInfo.Content  = "全程约 " + Math.Round(GetLength(busLin), 1) + " 公里";
             }
         }
         ShowRoad(0);
     }
 }
コード例 #24
0
        public void UploadCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            BoardType list = JsonConvert.DeserializeObject <BoardType>(e.Result);

            BoardCollections.Add(list);
        }
コード例 #25
0
        /// <summary>
        /// Method to get the response for advertisement images
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void pharmacyinfoadvtimageswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            GetPharmacyInformationResponse objPhBrandingInfoResponse = null;

            try
            {
                if (e.Result != null)
                {
                    var response = e.Result.ToString();
                    objPhBrandingInfoResponse = Utils.JsonHelper.Deserialize <GetPharmacyInformationResponse>(response);
                    if ((objPhBrandingInfoResponse.payload != null) && (objPhBrandingInfoResponse.status == 0))
                    {
                        App.ObjBrandingResponse = objPhBrandingInfoResponse;
                        App.DrugDBHash          = objPhBrandingInfoResponse.payload.drugs_hash;
                        App.AdImages            = null;
                        foreach (var item in objPhBrandingInfoResponse.payload.advert_data)
                        {
                            if (App.AdImages == null)
                            {
                                App.AdImages = new List <string>();
                                App.AdImages.Add(item.image_url.Replace("https", "http"));
                            }
                            else
                            {
                                App.AdImages.Add(item.image_url.Replace("https", "http"));
                            }
                        }

                        objYourDetlginViewModel.ProgressBarVisibilty = Visibility.Collapsed;
                        objYourDetlginViewModel.IsSuccessPopupOpen   = true;
                        objYourDetlginViewModel.HitVisibility        = false;
                        objYourDetlginViewModel.SuccessPopupText     = "Patient has been created.";// "Patient created.";
                    }
                }
            }
            catch (Exception)
            {
                objYourDetlginViewModel.ProgressBarVisibilty = Visibility.Collapsed;
                objYourDetlginViewModel.HitVisibility        = true;
                MessageBox.Show("Sorry, Unable to process your request.");
            }
        }
コード例 #26
0
        /// <summary>
        /// Get response from the web service
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void sendNominationswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            SendNominationResponse objSendNominationResponse = null;

            try
            {
                if (e.Result != null)
                {
                    var response = e.Result.ToString();
                    objSendNominationResponse = Utils.JsonHelper.Deserialize <SendNominationResponse>(response);

                    if (objSendNominationResponse.status == 0)
                    {
                        App.LoginPharId           = App.SignUpPharId.ToUpper();
                        App.YourDetailsLoginEmail = objYourDetlginViewModel.EmailId;
                        App.LoginEmailId          = objYourDetlginViewModel.EmailId;
                        App.IsUserRegistered      = true;
                        if (App.ObjLgResponse == null)
                        {
                            App.ObjLgResponse = new LoginResponse();
                        }
                        if (App.ObjLgResponse.payload == null)
                        {
                            App.ObjLgResponse.payload = new Payload();
                        }
                        if (App.ObjLgResponse.payload.surgery == null)
                        {
                            App.ObjLgResponse.payload.surgery = new Surgery();
                        }

                        App.ObjLgResponse.payload.address1        = objSendNominationResponse.payload.address1;
                        App.ObjLgResponse.payload.address2        = objSendNominationResponse.payload.address2;
                        App.ObjLgResponse.payload.birthdate       = objSendNominationResponse.payload.birthdate;
                        App.ObjLgResponse.payload.country         = objSendNominationResponse.payload.country;
                        App.ObjLgResponse.payload.devices         = objSendNominationResponse.payload.devices;
                        App.ObjLgResponse.payload.mail            = objSendNominationResponse.payload.mail;
                        App.ObjLgResponse.payload.mail_confirmed  = objSendNominationResponse.payload.mail_confirmed;
                        App.ObjLgResponse.payload.name            = objSendNominationResponse.payload.name;
                        App.ObjLgResponse.payload.nhs             = objSendNominationResponse.payload.nhs;
                        App.ObjLgResponse.payload.pharmacyid      = objSendNominationResponse.payload.pharmacyid;
                        App.ObjLgResponse.payload.pharmacyname    = objSendNominationResponse.payload.pharmacyname;
                        App.ObjLgResponse.payload.phone           = objSendNominationResponse.payload.phone;
                        App.ObjLgResponse.payload.postcode        = objSendNominationResponse.payload.postcode;
                        App.ObjLgResponse.payload.sex             = objSendNominationResponse.payload.sex;
                        App.ObjLgResponse.payload.sms_confirmed   = objSendNominationResponse.payload.sms_confirmed;
                        App.ObjLgResponse.payload.status          = objSendNominationResponse.payload.status;
                        App.ObjLgResponse.payload.surgery.address = objSendNominationResponse.payload.surgery.address;
                        App.ObjLgResponse.payload.surgery.name    = objSendNominationResponse.payload.surgery.name;
                        App.ObjLgResponse.payload.verifyby        = objSendNominationResponse.payload.verifyby;



                        GetAdvtImages();
                    }

                    else
                    {
                        objYourDetlginViewModel.ProgressBarVisibilty = Visibility.Collapsed;
                        objYourDetlginViewModel.IsPopupOpen          = true;
                        objYourDetlginViewModel.HitVisibility        = false;
                        objYourDetlginViewModel.PopupText            = objSendNominationResponse.message;
                    }
                }
            }
            catch (Exception ex)
            {
                objYourDetlginViewModel.ProgressBarVisibilty = Visibility.Collapsed;
                objYourDetlginViewModel.HitVisibility        = true;
                MessageBox.Show("Sorry, Unable to process your request.");
            }
        }
コード例 #27
0
		protected virtual void OnUploadStringCompleted (
			UploadStringCompletedEventArgs args)
		{
			if (UploadStringCompleted != null)
				UploadStringCompleted (this, args);
		}
コード例 #28
0
        /// <summary>
        /// Response of delete orders webservice
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DeleteWebserviceCallwebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            GetAllOrdersResponse objRemoveOrdersResponse = new GetAllOrdersResponse();

            try
            {
                if (e.Result != null)
                {
                    var response = e.Result.ToString();
                    objRemoveOrdersResponse = Utils.JsonHelper.Deserialize <GetAllOrdersResponse>(response);
                    if (objRemoveOrdersResponse.status == 0)
                    {
                        FillList(objRemoveOrdersResponse);
                    }
                    homePanoramaViewModel.IsRemovePopupOpen = true;
                    homePanoramaViewModel.HitVisibility     = false;
                    homePanoramaViewModel.PopupRemoveText   = "Order(s) removed.";
                }
            }
            catch (Exception)
            {
                homePanoramaViewModel.ProgressBarVisibiltyOrderRepeat = System.Windows.Visibility.Collapsed;
            }
        }
コード例 #29
0
ファイル: YapperServiceProxy.cs プロジェクト: nrag/yapper
        private void ExceptionUploadCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            AutoResetEvent resetEvent = e.UserState as AutoResetEvent;

            resetEvent.Set();
        }
コード例 #30
0
 private static void ReportCrashAsyncCallback(object sender, UploadStringCompletedEventArgs e)
 {
     logger.Error("Crash report server async response: " + e.Result);
 }
コード例 #31
0
ファイル: Logger.cs プロジェクト: mengtest/RewriteFrame
 static void OnUploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     m_canTakeError = true;
 }
コード例 #32
0
        void UploadString(object sender, UploadStringCompletedEventArgs e)
        {
            if (e.Error != null)
            {

                result.Text = "Post to wall failed!";
                return;

            }
            try
            {

                result.Text = "Successfully posted to wall!";

            }
            catch (Exception obj)
            {

                result.Text = "Post to wall failed!" + obj.Message;

            }
        }