public SellMedicines() { InitializeComponent(); this.ViewModel = new SellMedicinesViewModel(); this.DataContext = this.ViewModel; }
/// <summary> /// Creates new instance of <see cref="QrDecoderService"/> /// </summary> /// <param name="vm">Sell Medicines page viewmodel</param> /// <param name="dispatcher">Dispatcher</param> public QrDecoderService(SellMedicinesViewModel vm) { // setting fields this._vm = vm; // initializing components var filterInfo = new FilterInfoCollection(FilterCategory.VideoInputDevice); var device = filterInfo[0]; this._finalFrame = new VideoCaptureDevice(device.MonikerString); }
/// <summary> /// Creates new instance of <see cref="AddRecipeHistoryCommand"/> /// </summary> /// <param name="sellMedicinesViewModel">Sell medicines view model.</param> /// <param name="executeMethod">Execute method.</param> /// <param name="canExecuteMethod">CanExecute method.</param> public AddRecipeHistoryCommand(SellMedicinesViewModel sellMedicinesViewModel, Func <RecipeHistory, Task <ResponseMessage <string> > > executeMethod, Func <RecipeHistory, bool> canExecuteMethod) : base(executeMethod, canExecuteMethod) { this.viewModel = sellMedicinesViewModel; this._isDoneAvailable = true; }
/// <summary> /// Creates new instance of <see cref="FindRecipeCommand"/> /// </summary> /// <param name="viewModel">Viewmodel</param> /// <param name="executeMethod">Execute method</param> /// <param name="canExecuteMethod">CanExecute method</param> public FindRecipeCommand(SellMedicinesViewModel viewModel, Func <string, Task <ResponseMessage <RecipeClient.Recipe> > > executeMethod, Func <string, bool> canExecuteMethod) : base(executeMethod, canExecuteMethod) { this._viewModel = viewModel; this._isFindAvailable = true; }