本文整理汇总了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);
}
}
示例2: OnRegionDataEvent
private void OnRegionDataEvent(EventParameters<RegionData> obj)
{
if (IsPortrait && obj.Topic == EventTopicNames.RegionActivated && obj.Value.RegionName == RegionNames.PosSubRegion)
{
Grid2.SelectedIndex = 1;
}
}
示例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();
}
}
}
}
}
}
}
示例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);
}
示例5: OnWorkPeriodEvent
private void OnWorkPeriodEvent(EventParameters<WorkPeriod> obj)
{
if (obj.Topic == EventTopicNames.DisplayTicketExplorer)
{
DisplayTicketExplorerScreen();
}
}
示例6: OnUserLoginEvent
private void OnUserLoginEvent(EventParameters<User> obj)
{
if (obj.Topic == EventTopicNames.UserLoggedOut)
{
CloseTicket();
}
}
示例7: OnWorkperiodStatusChanged
private void OnWorkperiodStatusChanged(EventParameters<WorkPeriod> obj)
{
if (obj.Topic == EventTopicNames.WorkPeriodStatusChanged)
{
_timer.Change(1, 60000);
}
}
示例8: OnAutomationCommandEvent
private void OnAutomationCommandEvent(EventParameters<AutomationCommand> obj)
{
if (obj.Topic == EventTopicNames.SelectAutomationCommandValue)
{
DisplayAutomationCommandValueSelector();
}
}
示例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");
}
}
示例10: OnWarehouseEvent
private void OnWarehouseEvent(EventParameters<Warehouse> obj)
{
if (obj.Topic == EventTopicNames.DisplayInventory)
{
_warehouseInventoryViewModel.Refresh(obj.Value.Id);
ActivateInventoryView();
}
}
示例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();
}
}
示例12: OnEventGenerated
private void OnEventGenerated(EventParameters<EventAggregator> obj)
{
if (obj.Topic == EventTopicNames.ResetCache)
{
_paymentScreenValues = null;
RaisePropertyChanged(() => PaymentScreenValues);
}
}
示例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();
}
}
示例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);
}
示例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);
}
}