本文整理汇总了C#中InteractionRequest类的典型用法代码示例。如果您正苦于以下问题:C# InteractionRequest类的具体用法?C# InteractionRequest怎么用?C# InteractionRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InteractionRequest类属于命名空间,在下文中一共展示了InteractionRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegionOnPopupWindowContentControlViewModel
public RegionOnPopupWindowContentControlViewModel( Model model )
{
Model = model;
ShowConfirmationCommand = new DelegateCommand( OnShowConfirmation );
ConfirmationRequest = new InteractionRequest<INotification>();
}
示例2: ReferenceDataAddViewModel
public ReferenceDataAddViewModel(IEventAggregator eventAggregator, IReferenceDataService entityService)
{
this.eventAggregator = eventAggregator;
this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
this.entityService = entityService;
this.ReferenceData = new ReferenceDataViewModel(null, null, this.eventAggregator);
}
示例3: MultipleReversalReAllocationViewModel
public MultipleReversalReAllocationViewModel(int batchID, int reason, List<DishonourReversalReceiptSummary> receipts)
{
receiptBatchID = batchID;
reasonSelected = reason;
reversalReceipts = receipts;
try
{
SetReceiptDefaults(receiptBatchID);
Save = new DelegateCommand<string>(OnSave);
ReAllocationSearch = new DelegateCommand(OnReAllocationSearch);
Popup = new InteractionRequest<PopupWindow>();
UIConfirmation = new InteractionRequest<ConfirmationWindowViewModel>();
IconFileName = "ReAllocation.jpg";
}
catch (Exception ex)
{
ExceptionLogger.WriteLog(ex);
ShowErrorMessage("Error occurred while initializing Reversal Receipts Re-Allocation Screen", "Receipt Reallocation - Error");
}
finally
{
IsBusy = false;
}
}
示例4: CategoriesViewModel
public CategoriesViewModel(Client client)
{
_client = client;
Categories = new ObservableCollection<Category>(
_client.Context.Categories.ToList());
AddNewCategoryRequest = new InteractionRequest<IConfirmation>();
AddCategoryCommand = new DelegateCommand(() =>
AddNewCategoryRequest.Raise(
new Confirmation()
{
Title = "Nowa kategoria",
Content = new System.Windows.Controls.TextBox()
{
VerticalAlignment = System.Windows.VerticalAlignment.Top
}
},
AddCategory));
ConfirmDeleteCategoryRequest = new InteractionRequest<IConfirmation>();
DeleteCategoryCommand = new DelegateCommand(() =>
ConfirmDeleteCategoryRequest.Raise(
new Confirmation()
{
Title = "Potwierdź",
Content = "Czy na pewno usunąć wybraną kategorię?"
},
DeleteCategory)
, CanDeleteCategory);
}
示例5: DishonourReversalExcelImportViewModel
public DishonourReversalExcelImportViewModel(ReceiptBatchType receiptBatchType, int receiptBatchId)
{
batchType = receiptBatchType;
receiptBatchID = receiptBatchId;
reasonCodes = DishonourReversalFunctions.GetReasonCodes(batchType);
Browse = new DelegateCommand(OnBrowse);
Upload = new DelegateCommand(OnUpload);
Save = new DelegateCommand(OnSave);
Delete = new DelegateCommand(OnDelete);
OpenExcelTemplate = new DelegateCommand(OnOpenExcelTemplate);
Title = batchType.ToString() + " Receipts Excel Import";
IconFileName = "Excel.jpg";
UIConfirmation = new InteractionRequest<ConfirmationWindowViewModel>();
if (batchType == ReceiptBatchType.Dishonour)
{
excelTemplateFileName = "DishonourReceiptImportTemplate.xlsx";
}
else
{
excelTemplateFileName = "ReversalReceiptImportTemplate.xlsx";
}
}
示例6: Initialize
private void Initialize()
{
CancelCommand = new DelegateCommand<object>(x => Cancel(), x => !_cancelled || IsValid);
CancelConfirmRequest = new InteractionRequest<Confirmation>();
InitStepsAndViewTitle();
}
示例7: ChatViewModel
public ChatViewModel(IChatService chatService)
{
this.contacts = new ObservableCollection<Contact>();
this.contactsView = new CollectionView(this.contacts);
this.sendMessageRequest = new InteractionRequest<SendMessageViewModel>();
this.showReceivedMessageRequest = new InteractionRequest<ReceivedMessage>();
this.showDetailsCommand = new DelegateCommand<bool?>(this.ExecuteShowDetails, this.CanExecuteShowDetails);
this.contactsView.CurrentChanged += this.OnCurrentContactChanged;
this.chatService = chatService;
this.chatService.Connected = true;
this.chatService.ConnectionStatusChanged += (s, e) => this.OnPropertyChanged(() => this.ConnectionStatus);
this.chatService.MessageReceived += this.OnMessageReceived;
this.chatService.GetContacts(
result =>
{
if (result.Error == null)
{
foreach (var item in result.Result)
{
this.contacts.Add(item);
}
}
});
}
示例8: RegionWithPopupWindowActionExtensionsViewModel
public RegionWithPopupWindowActionExtensionsViewModel( Model model )
{
Model = model;
ShowConfirmationCommand = new DelegateCommand( OnShowConfirmation );
ConfirmationRequest = new InteractionRequest<INotification>();
}
示例9: ComplexCustomViewViewModel
public ComplexCustomViewViewModel( Model model )
{
Model = model;
ShowConfirmationCommand = new DelegateCommand( OnShowConfirmation );
ConfirmationRequest = new InteractionRequest<INotification>();
}
示例10: TaskCollectionsViewModel
public TaskCollectionsViewModel(
INavigationService navigationService,
IRtmServiceClient rtmServiceClient,
ITaskStoreLocator taskStoreLocator,
IListStoreLocator listStoreLocator,
ILocationStoreLocator locationStoreLocator,
ISynchronizationService synchronizationService)
: base(navigationService)
{
this._rtmServiceClient = rtmServiceClient;
this._taskStoreLocator = taskStoreLocator;
this._listStoreLocator = listStoreLocator;
this._locationStoreLocator = locationStoreLocator;
this._synchronizationService = synchronizationService;
this.submitErrorInteractionRequest = new InteractionRequest<Notification>();
this.submitNotificationInteractionRequest = new InteractionRequest<Notification>();
this.StartSyncCommand = new DelegateCommand(
() => { this.StartSync(); },
() => !this.IsSyncing && !this.SettingAreNotConfigured);
this.ViewTaskCollectionCommand = new DelegateCommand(
() => { this.NavigationService.Navigate(new Uri("/Views/TaskCollectionView.xaml", UriKind.Relative)); },
() => !this.IsSyncing);
this.AppSettingsCommand = new DelegateCommand(
() => { this.NavigationService.Navigate(new Uri("/Views/AppSettingsView.xaml", UriKind.Relative)); },
() => !this.IsSyncing);
this.IsBeingActivated();
}
示例11: AddReceiptsViewModel
public AddReceiptsViewModel(int receiptbatchType, int batchID)
{
BatchType batch;
try
{
batchType = receiptbatchType;
ReceiptBatch = ReceiptBatchFunctions.Get(batchID);
ReceiptDate = ReceiptBatch.ReceiptDate;
Save = new DelegateCommand(OnSave);
SearchCommand = new DelegateCommand(OnSearch);
ReceiptSelectedCommand = new DelegateCommand<ObservableCollection<object>>(ReceiptSelected);
UIConfirmation = new InteractionRequest<ConfirmationWindowViewModel>();
Popup = new InteractionRequest<PopupWindow>();
SelectList = BatchTypeFunctions.GetSelectList(batchType);
SetReceiptBatchDefaults();
IconFileName = "AddMultiple.jpg";
}
catch (Exception ex)
{
ExceptionLogger.WriteLog(ex);
ShowErrorMessage("Error encountered while initializing Add Receipts.", "Add Receipts - Error");
}
finally
{
IsBusy = false;
}
}
示例12: PropertyEditViewModel
public PropertyEditViewModel(
IViewModelsFactory<IPickAssetViewModel> pickAssetVmFactory,
IViewModelsFactory<ISearchCategoryViewModel> searchCategoryVmFactory,
DynamicContentItemProperty item)
{
_pickAssetVmFactory = pickAssetVmFactory;
_searchCategoryVmFactory = searchCategoryVmFactory;
InnerItem = item;
var itemValueType = (PropertyValueType)InnerItem.ValueType;
IsShortStringValue = itemValueType == PropertyValueType.ShortString;
IsLongStringValue = itemValueType == PropertyValueType.LongString;
IsDecimalValue = itemValueType == PropertyValueType.Decimal;
IsIntegerValue = itemValueType == PropertyValueType.Integer;
IsBooleanValue = itemValueType == PropertyValueType.Boolean;
IsDateTimeValue = itemValueType == PropertyValueType.DateTime;
IsAssetValue = itemValueType == PropertyValueType.Image;
IsCategoryValue = itemValueType == PropertyValueType.Category;
if (IsAssetValue)
SelectedAssetDisplayName = InnerItem.LongTextValue;
if (IsCategoryValue)
SelectedCategoryName = InnerItem.Alias;
AssetPickCommand = new DelegateCommand(RaiseItemPickInteractionRequest);
CategoryPickCommand = new DelegateCommand(RaiseCategoryPickInteractionRequest);
CommonConfirmRequest = new InteractionRequest<Confirmation>();
}
示例13: FilesViewModel
public FilesViewModel(IFilesRepository filesRepository, IAuthStore authStore, IProductsRepository productsRepository,
Func<CreateFileViewModel> createFactory, Func<EditFileViewModel> editFactory)
{
this.filesRepository = filesRepository;
this.productsRepository = productsRepository;
this.createFactory = createFactory;
this.editFactory = editFactory;
var token = authStore.LoadToken();
if (token != null)
{
IsEditor = token.IsEditor();
IsAdmin = token.IsAdmin();
}
cvs = new CollectionViewSource();
items = new ObservableCollection<FileDescription>();
cvs.Source = items;
cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
cvs.SortDescriptions.Add(new SortDescription("Id", ListSortDirection.Ascending));
editRequest = new InteractionRequest<IConfirmation>();
BrowseCommand = new DelegateCommand(Browse);
EditCommand = new DelegateCommand<FileDescription>(Edit);
deleteCommand = new DelegateCommand(PromtDelete, HasSelectedItems);
deleteRequest = new InteractionRequest<Confirmation>();
}
示例14: BrokerAddViewModel
public BrokerAddViewModel(IEventAggregator eventAggregator, IMdmService entityService)
{
this.eventAggregator = eventAggregator;
this.confirmationFromViewModelInteractionRequest = new InteractionRequest<Confirmation>();
this.entityService = entityService;
this.Broker = new BrokerViewModel(this.eventAggregator);
}
示例15: EditViewModel
public EditViewModel( IDataService dataService )
{
_dataService = dataService;
// Initialize the Navigation Interaction Request .
navigationInteractionRequest = new InteractionRequest<Confirmation>();
}