private void CanalFlowServiceOnCanalSimulationCompleted(object sender, ActionCompletedEventArgs <CanalData> eventArgs) { if (canalSimulationPendingRequests.TryRemove(eventArgs.CorrelationId, out TaskCompletionSource <CanalData> runningTask)) { runningTask.TrySetResult(eventArgs.Result); } }
void OrderHelper_InitOrderInfoCompleted(object sender, ActionCompletedEventArgs<string> e) { OrderHelper.InitOrderInfoCompleted -= new EventHandler<ActionCompletedEventArgs<string>>(OrderHelper_InitOrderInfoCompleted); if (InitCompleted != null) { InitCompleted(this, null); } }
void dGrid_LoadRowDetailComplete(object sender, ActionCompletedEventArgs <UIElement> e) { if (this.EditForm.OperationType == OperationTypes.Audit) { IControlAction form = e.Result as IControlAction; form.InitControl(OperationTypes.Edit); } }
void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs <bool> e) { if (e.Result) { CommonFunction.NotifySuccessfulSaving(string.Empty); InitData(); } this.CloseProcess(); }
void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs <bool> e) { if (e.Result) { InitData(); CommonFunction.NotifySelection("保存成功"); CloseProcess(); } }
private void ExecuteCanalSimulationCompleted(ActionCompletedEventArgs <CanalData> eventArgs) { ActionCompletedEventHandler <CanalData> handler = CanalSimulationCompleted; if (handler != null) { handler(this, eventArgs); } }
private void OnActionCompleted(Object p_sender, ActionCompletedEventArgs p_args) { if (LegacyLogic.Instance.WorldManager.AchievementManager.IsActionClaimed(p_args.ActionID - 1)) { return; } if (p_args.Online) { ShowOverlayOnline(p_args.ActionID); } else { ShowOverlayOffline(p_args.ActionID); } }
static void ActionCompleted(Object source, ActionCompletedEventArgs e) { //if (e.Action.AsyncTask.IsFaulted) //{ // Debug.WriteLine(String.Format("Action failed: {0:s} => {1:s}", e.Action.Command, e.Action.Response.ToString())); //} //else //{ // string cmd = e.Action.Command; // string rsp = e.Action.Response.ToString(); // string msg = String.Format("Action completed: {0:s} => {1:s}", cmd, rsp); // Debug.WriteLine(msg); // if (!e.Action.Response.IsSingleLine) // { // ((MultiLineResponse)e.Action.Response).Content.ForEach(action: (line) => Debug.WriteLine(String.Format("{0:s}", line))); // } //} }
void OrderHelper_InitOrderInfoCompleted(object sender, ActionCompletedEventArgs <string> e) { try { OrderHelper.InitOrderInfoCompleted -= new EventHandler <ActionCompletedEventArgs <string> >(OrderHelper_InitOrderInfoCompleted); if (e != null) { throw new Exception(e.Result); } if (FBBasePageLoaded != null) { FBBasePageLoaded(this, null); } CloseProcess(); } catch (Exception ex) { CloseProcess(); MessageBox.Show(ex.ToString()); } }
void OrderHelper_InitOrderInfoCompleted(object sender, ActionCompletedEventArgs<string> e) { try { OrderHelper.InitOrderInfoCompleted -= new EventHandler<ActionCompletedEventArgs<string>>(OrderHelper_InitOrderInfoCompleted); if (e != null) { throw new Exception(e.Result); } if (FBBasePageLoaded != null) { FBBasePageLoaded(this, null); } CloseProcess(); } catch (Exception ex) { CloseProcess(); MessageBox.Show(ex.ToString()); } }
void OrderSource_SaveListCompleted(object sender, ActionCompletedEventArgs<bool> e) { GetOrders(); }
private void SetRowDetailTemplate() { if (this.orderDetailGridInfo.RowDetailDataPanel != null) { #region RowDetailTemplate DataTemplate dt = DataTemplateHelper.GetEmptyGrid(); this.ADGrid.RowDetailsTemplate = dt; this.ADGrid.LoadingRowDetails += (o, e) => { IDataPanel panel = this.orderDetailGridInfo.RowDetailDataPanel; IControlAction control = panel.GetUIElement(); Grid grid = e.DetailsElement as Grid; grid.Background = e.Row.Background; if (grid.Children.Count == 0) { Border border = new Border(); border.Style = (Style)Application.Current.Resources["DetailShow_1"]; grid.Children.Add(border); if (control.GetType() == typeof(DetailGrid)) { DetailGrid dgrid = control as DetailGrid; border.Child = dgrid; // dgrid.Margin = new Thickness(80, 0, 0, 0); control.InitControl(this.operationType); } else { border.Child = (control as UIElement); OperationTypes cOpType = this.operationType; if (this.operationType == OperationTypes.Audit) { cOpType = OperationTypes.Edit; } control.InitControl(cOpType); } } DependencyObject dObj = VisualTreeHelper.GetChild(e.DetailsElement,0); UIElement curControl = (dObj as Border).Child; if (curControl.GetType() == typeof(DetailGrid)) { DetailGrid dgrid = curControl as DetailGrid; string entityType = dgrid.OrderDetailGridInfo.OrderDetailEntityInfo.Entity.Type; FBEntity source = e.Row.DataContext as FBEntity; ; if (source != null) { ObservableCollection<FBEntity> list = source.GetRelationFBEntities(entityType); if (list.Count > 0) { dgrid.ItemsSource = list; } else { dgrid.Visibility = Visibility.Collapsed; } } } if (LoadRowDetailComplete != null) { ActionCompletedEventArgs<UIElement> args = new ActionCompletedEventArgs<UIElement>(curControl); LoadRowDetailComplete(o, args); } }; #endregion } }
void fbService_GetFBEntityCompleted(object sender, GetFBEntityCompletedEventArgs e) { FBBaseControl fb = new FBBaseControl(); if (e.Error != null) { CommonFunction.ShowErrorMessage("操作失败, " + e.Error.Message); } if (e.Result == null) { CommonFunction.ShowErrorMessage("无可用数据"); fb.CloseProcess(); } if (GetEntityCompleted != null) { OrderEntity entityAdapter = new OrderEntity(e.Result); ActionCompletedEventArgs<OrderEntity> se = new ActionCompletedEventArgs<OrderEntity>(entityAdapter); GetEntityCompleted(this, se); } }
private void OnGetUnSelectedItems() { if (GetUnSelectedItemsCompleted != null) { List<FBEntity> listInActive = this.OriginalItems.Where(item => { FBEntity sameEntity = GetSameItem(this.SelectedItems, item); return sameEntity == null; }).ToList(); ActionCompletedEventArgs<List<FBEntity>> args = new ActionCompletedEventArgs<List<FBEntity>>(listInActive); GetUnSelectedItemsCompleted(this, args); } }
private void selectedDataManager_GetUnSelectedItemsCompleted(object sender, ActionCompletedEventArgs<List<FBEntity>> e) { this.SelectedGrid.ItemsSource = e.Result; this.OriginalItems = e.Result; CloseProcess(); }
void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs<bool> e) { if (e.Result) { CommonFunction.NotifySelection("保存成功"); InitData(); } CloseProcess(); }
void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs<bool> e) { if (e.Result) { CommonFunction.NotifySuccessfulSaving(string.Empty); InitData(); } this.CloseProcess(); }
private void OnGetUnSelectedItems() { if (GetUnSelectedItemsCompleted != null) { List<FBEntity> listInActive = this.OriginalItems.ToList(); ActionCompletedEventArgs<List<FBEntity>> args = new ActionCompletedEventArgs<List<FBEntity>>(listInActive); GetUnSelectedItemsCompleted(this, args); } }
void fbService_SaveCompleted(object sender, SaveCompletedEventArgs e) { FBEntity fbEntity = null; if (e.Error != null) { CommonFunction.ShowErrorMessage("操作失败, " + e.Error.Message); } else if (e.Result.Exception != null) { CommonFunction.ShowErrorMessage(e.Result.Exception); } fbEntity = e.Result.FBEntity; if (SaveCompleted != null) { OrderEntity entityAdapter = null; if (fbEntity != null) { entityAdapter = new OrderEntity(e.Result.FBEntity); } ActionCompletedEventArgs<OrderEntity> se = new ActionCompletedEventArgs<OrderEntity>(entityAdapter); SaveCompleted(this, se); } }
public void NotifyActionCompleted(BuddyAction sender, ActionCompletedEventArgs e) { ActionCompleted(sender, e); }