private void CanalFlowServiceOnCanalSimulationCompleted(object sender, ActionCompletedEventArgs <CanalData> eventArgs)
 {
     if (canalSimulationPendingRequests.TryRemove(eventArgs.CorrelationId,
                                                  out TaskCompletionSource <CanalData> runningTask))
     {
         runningTask.TrySetResult(eventArgs.Result);
     }
 }
예제 #2
0
파일: OrderHelper.cs 프로젝트: JuRogn/OA
 void OrderHelper_InitOrderInfoCompleted(object sender, ActionCompletedEventArgs<string> e)
 {
     OrderHelper.InitOrderInfoCompleted -= new EventHandler<ActionCompletedEventArgs<string>>(OrderHelper_InitOrderInfoCompleted);
     if (InitCompleted != null)
     {
         InitCompleted(this, null);
     }
 }        
예제 #3
0
 void dGrid_LoadRowDetailComplete(object sender, ActionCompletedEventArgs <UIElement> e)
 {
     if (this.EditForm.OperationType == OperationTypes.Audit)
     {
         IControlAction form = e.Result as IControlAction;
         form.InitControl(OperationTypes.Edit);
     }
 }
예제 #4
0
 void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs <bool> e)
 {
     if (e.Result)
     {
         CommonFunction.NotifySuccessfulSaving(string.Empty);
         InitData();
     }
     this.CloseProcess();
 }
예제 #5
0
 void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs <bool> e)
 {
     if (e.Result)
     {
         InitData();
         CommonFunction.NotifySelection("保存成功");
         CloseProcess();
     }
 }
예제 #6
0
        private void ExecuteCanalSimulationCompleted(ActionCompletedEventArgs <CanalData> eventArgs)
        {
            ActionCompletedEventHandler <CanalData> handler =
                CanalSimulationCompleted;

            if (handler != null)
            {
                handler(this, eventArgs);
            }
        }
예제 #7
0
 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)));
     //    }
     //}
 }
예제 #9
0
 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());
     }
 }
예제 #10
0
파일: FBBasePage.cs 프로젝트: JuRogn/OA
 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());
     }
 }
예제 #11
0
 void OrderSource_SaveListCompleted(object sender, ActionCompletedEventArgs<bool> e)
 {
     GetOrders();
 }
예제 #12
0
        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
            }
            
        }
예제 #13
0
파일: ServiceHelper.cs 프로젝트: JuRogn/OA
 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);
     }
 }
예제 #14
0
        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);
            }
        }
예제 #15
0
 private void selectedDataManager_GetUnSelectedItemsCompleted(object sender, ActionCompletedEventArgs<List<FBEntity>> e)
 {
     this.SelectedGrid.ItemsSource = e.Result;
     this.OriginalItems = e.Result;
     CloseProcess();
 }
예제 #16
0
 void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs<bool> e)
 {
     if (e.Result)
     {
         CommonFunction.NotifySelection("保存成功");
         InitData();
     }
     CloseProcess();
 }
예제 #17
0
        void orderEntityService_SaveListCompleted(object sender, ActionCompletedEventArgs<bool> e)
        {
            if (e.Result)
            {
                CommonFunction.NotifySuccessfulSaving(string.Empty);
                InitData();
            }
            this.CloseProcess();

        }
예제 #18
0
 private void OnGetUnSelectedItems()
 {
     if (GetUnSelectedItemsCompleted != null)
     {
         List<FBEntity> listInActive = this.OriginalItems.ToList();
         ActionCompletedEventArgs<List<FBEntity>> args = new ActionCompletedEventArgs<List<FBEntity>>(listInActive);
         GetUnSelectedItemsCompleted(this, args);
     }
 }
예제 #19
0
파일: ServiceHelper.cs 프로젝트: JuRogn/OA
        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);

            }
        }
예제 #20
0
 public void NotifyActionCompleted(BuddyAction sender, ActionCompletedEventArgs e)
 {
     ActionCompleted(sender, e);
 }