private void ShowPopUpExecute() { // Sends a notification message with a string content. Messenger.Default.Send(new NotificationMessage("GotoDetailsPage")); if (CurrentTabItemsGroup.SelectedTabIndex == CurrentTabItemsGroup.TabItems.Count - 1) { CurrentTabItemsGroup.NewTab(); } ParameterInterpreter pi = new ParameterInterpreter(); Requester rq = new Requester(CurrentTabItemsGroup.CurrentItem, option, pi); try { CurrentTabItemsGroup.CurrentItem.IsRequesting = true; CurrentTabItemsGroup.CurrentItem.ResponseContent = "....."; if(CurrentTabItemsGroup.CurrentItem.Times == 0) { CurrentTabItemsGroup.CurrentItem.Times = 1; } if (CurrentTabItemsGroup.CurrentItem.ReqMethod.Equals(RequestMethod.SOAP)) { backgroundWorker.RunWorkerAsync(new SOAP(CurrentTabItemsGroup.CurrentItem)); } else { backgroundWorker.RunWorkerAsync(rq); } } catch (Exception e) { //MessageBox.Show(e.Message); Console.WriteLine(e.StackTrace); logger.logWithTime(e.Message); } }
public Requester(TabItem _tabItem, Option _option, ParameterInterpreter _pi) { tabItem = _tabItem; option = _option; pi = _pi; }