当前位置: 首页>>代码示例>>C#>>正文


C# EventParameters类代码示例

本文整理汇总了C#中EventParameters的典型用法代码示例。如果您正苦于以下问题:C# EventParameters类的具体用法?C# EventParameters怎么用?C# EventParameters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EventParameters类属于命名空间,在下文中一共展示了EventParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnWorkPeriodChanged

 private void OnWorkPeriodChanged(EventParameters<WorkPeriod> obj)
 {
     if (obj.Topic == EventTopicNames.WorkPeriodStatusChanged)
     {
         RaisePropertyChanged(() => CanChangeDepartment);
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:DepartmentSelectorViewModel.cs

示例2: OnRegionDataEvent

 private void OnRegionDataEvent(EventParameters<RegionData> obj)
 {
     if (IsPortrait && obj.Topic == EventTopicNames.RegionActivated && obj.Value.RegionName == RegionNames.PosSubRegion)
     {
         Grid2.SelectedIndex = 1;
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:PosView.xaml.cs

示例3: OnWorkperiodStatusChanged

 private static void OnWorkperiodStatusChanged(EventParameters<WorkPeriod> obj)
 {
     if (obj.Topic == EventTopicNames.WorkPeriodStatusChanged)
     {
         using (var ws = WorkspaceFactory.Create())
         {
             if (ws.Count<Recipe>() > 0)
             {
                 if (!AppServices.MainDataContext.IsCurrentWorkPeriodOpen)
                 {
                     var pc = InventoryService.GetCurrentPeriodicConsumption(ws);
                     if (pc.Id == 0) ws.Add(pc);
                     ws.CommitChanges();
                 }
                 else
                 {
                     if (AppServices.MainDataContext.PreviousWorkPeriod != null)
                     {
                         var pc = InventoryService.GetPreviousPeriodicConsumption(ws);
                         if (pc != null)
                         {
                             InventoryService.CalculateCost(pc, AppServices.MainDataContext.PreviousWorkPeriod);
                             ws.CommitChanges();
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:hpbaotho,项目名称:sambapos,代码行数:30,代码来源:InventoryModule.cs

示例4: OnTicketCommandAdded

 private static void OnTicketCommandAdded(EventParameters<ICaptionCommand> obj)
 {
     if(obj.Topic==EventTopicNames.AddCustomTicketCommand)
         TicketCommands.Add(obj.Value);
     if (obj.Topic == EventTopicNames.AddCustomOrderCommand)
         OrderCommands.Add(obj.Value);
 }
开发者ID:betology,项目名称:SambaPOS-3,代码行数:7,代码来源:PresentationServices.cs

示例5: OnWorkPeriodEvent

 private void OnWorkPeriodEvent(EventParameters<WorkPeriod> obj)
 {
     if (obj.Topic == EventTopicNames.DisplayTicketExplorer)
     {
         DisplayTicketExplorerScreen();
     }
 }
开发者ID:hpbaotho,项目名称:sambapos,代码行数:7,代码来源:TicketEditorViewModel.cs

示例6: OnUserLoginEvent

 private void OnUserLoginEvent(EventParameters<User> obj)
 {
     if (obj.Topic == EventTopicNames.UserLoggedOut)
     {
         CloseTicket();
     }
 }
开发者ID:hpbaotho,项目名称:sambapos,代码行数:7,代码来源:TicketEditorViewModel.cs

示例7: OnWorkperiodStatusChanged

 private void OnWorkperiodStatusChanged(EventParameters<WorkPeriod> obj)
 {
     if (obj.Topic == EventTopicNames.WorkPeriodStatusChanged)
     {
         _timer.Change(1, 60000);
     }
 }
开发者ID:neapolis,项目名称:SambaPOS-3,代码行数:7,代码来源:WorkPeriodStatusView.xaml.cs

示例8: OnAutomationCommandEvent

 private void OnAutomationCommandEvent(EventParameters<AutomationCommand> obj)
 {
     if (obj.Topic == EventTopicNames.SelectAutomationCommandValue)
     {
         DisplayAutomationCommandValueSelector();
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:ModifierModule.cs

示例9: OnTicketViewModelEvent

        private void OnTicketViewModelEvent(EventParameters<TicketViewModel> obj)
        {
            if (obj.Topic == EventTopicNames.SelectTicketTag)
            {
                ResetValues(obj.Value);
                _showFreeTagEditor = SelectedTicket.LastSelectedTicketTag.FreeTagging;

                List<TicketTag> tags;
                if (_showFreeTagEditor)
                {
                    tags = Dao.Query<TicketTagGroup>(x => x.Id == SelectedTicket.LastSelectedTicketTag.Id,
                                                 x => x.TicketTags).SelectMany(x => x.TicketTags).OrderBy(x => x.Name).ToList();
                }
                else
                {
                    tags = AppServices.MainDataContext.SelectedDepartment.TicketTagGroups.Where(
                           x => x.Name == obj.Value.LastSelectedTicketTag.Name).SelectMany(x => x.TicketTags).ToList();
                }
                tags.Sort(new AlphanumComparator());
                TicketTags.AddRange(tags);

                if (SelectedTicket.IsTaggedWith(SelectedTicket.LastSelectedTicketTag.Name)) TicketTags.Add(TicketTag.Empty);
                if (TicketTags.Count == 1 && !_showFreeTagEditor) obj.Value.UpdateTag(SelectedTicket.LastSelectedTicketTag, TicketTags[0]);
                RaisePropertyChanged("TagColumnCount");
                RaisePropertyChanged("IsFreeTagEditorVisible");
                RaisePropertyChanged("FilteredTextBoxType");
            }

            if (obj.Topic == EventTopicNames.SelectVoidReason)
            {
                ResetValues(obj.Value);
                Reasons.AddRange(AppServices.MainDataContext.Reasons.Values.Where(x => x.ReasonType == 0));
                if (Reasons.Count == 0) obj.Value.VoidSelectedItems(0);
                RaisePropertyChanged("ReasonColumnCount");
            }

            if (obj.Topic == EventTopicNames.SelectGiftReason)
            {
                ResetValues(obj.Value);
                Reasons.AddRange(AppServices.MainDataContext.Reasons.Values.Where(x => x.ReasonType == 1));
                if (Reasons.Count == 0) obj.Value.GiftSelectedItems(0);
                RaisePropertyChanged("ReasonColumnCount");
            }

            if (obj.Topic == EventTopicNames.SelectExtraProperty)
            {
                ResetValues(obj.Value);
                _showExtraPropertyEditor = true;
                RaisePropertyChanged("IsExtraPropertyEditorVisible");
                RaisePropertyChanged("IsPortionsVisible");
            }

            if (obj.Topic == EventTopicNames.EditTicketNote)
            {
                ResetValues(obj.Value);
                _showTicketNoteEditor = true;
                RaisePropertyChanged("IsTicketNoteEditorVisible");
            }
        }
开发者ID:hpbaotho,项目名称:sambapos,代码行数:59,代码来源:SelectedTicketItemsViewModel.cs

示例10: OnWarehouseEvent

 private void OnWarehouseEvent(EventParameters<Warehouse> obj)
 {
     if (obj.Topic == EventTopicNames.DisplayInventory)
     {
         _warehouseInventoryViewModel.Refresh(obj.Value.Id);
         ActivateInventoryView();
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:8,代码来源:InventoryModule.cs

示例11: OnTicketTagDataSelected

 private void OnTicketTagDataSelected(EventParameters<TicketTagData> obj)
 {
     if (obj.Topic == EventTopicNames.SelectTicketTag)
     {
         var isTagSelected = _ticketTagEditorViewModel.TicketTagSelected(obj.Value.Ticket, obj.Value.TicketTagGroup);
         if (!isTagSelected) DisplayTicketTagEditor();
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:8,代码来源:ModifierModule.cs

示例12: OnEventGenerated

 private void OnEventGenerated(EventParameters<EventAggregator> obj)
 {
     if (obj.Topic == EventTopicNames.ResetCache)
     {
         _paymentScreenValues = null;
         RaisePropertyChanged(() => PaymentScreenValues);
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:8,代码来源:NumberPadViewModel.cs

示例13: OnResourceEvent

 private void OnResourceEvent(EventParameters<Entity> obj)
 {
     if (obj.Topic == EventTopicNames.DisplayInventory)
     {
         var warehouse = _cacheService.GetWarehouses().Single(x => x.Id == obj.Value.WarehouseId);
         _warehouseInventoryViewModel.Refresh(warehouse.Id);
         ActivateInventoryView();
     }
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:9,代码来源:InventoryModule.cs

示例14: OnDocumentCreation

 private void OnDocumentCreation(EventParameters<DocumentCreationData> obj)
 {
     SelectedAccount = obj.Value.Account;
     DocumentTemplate = obj.Value.DocumentTemplate;
     Description = _accountService.GetDescription(obj.Value.DocumentTemplate, obj.Value.Account);
     Amount = _accountService.GetDefaultAmount(obj.Value.DocumentTemplate, obj.Value.Account);
     RaisePropertyChanged(() => Description);
     RaisePropertyChanged(() => Amount);
     RaisePropertyChanged(() => AccountName);
 }
开发者ID:yemreguney,项目名称:SambaPOS-3,代码行数:10,代码来源:DocumentCreatorViewModel.cs

示例15: OnEditResource

 private void OnEditResource(EventParameters<EntityOperationRequest<Resource>> obj)
 {
     if (obj.Topic == EventTopicNames.EditResourceDetails)
     {
         _operationRequest = obj.Value;
         var resourceTemplate = _cacheService.GetResourceTemplateById(obj.Value.SelectedEntity.ResourceTemplateId);
         SelectedResource = new ResourceSearchResultViewModel(obj.Value.SelectedEntity, resourceTemplate);
         CustomDataViewModel = new ResourceCustomDataViewModel(obj.Value.SelectedEntity, resourceTemplate);
         RaisePropertyChanged(() => CustomDataViewModel);
     }
 }
开发者ID:betology,项目名称:SambaPOS-3,代码行数:11,代码来源:ResourceEditorViewModel.cs


注:本文中的EventParameters类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。