public DependencyServiceManager()
        {
            var device = Resolver.Resolve <IDevice>();

            MediaPicker    = DependencyService.Get <IMediaPicker>() ?? device.MediaPicker;
            PictureManager = DependencyService.Get <IPictureManager>() ?? Resolver.Resolve <IPictureManager>();
        }
 public OrderAppService(IOrderManager orderAppService,
                        IProductManager productManager,
                        IProductAttributeManager productAttributeManager,
                        IStoreManager storeManager,
                        ILocalizationManager localizationManager,
                        IPictureManager pictureManager,
                        IProductAttributeParser productAttributeParser,
                        IStateManager stateManager,
                        IProductAttributeFormatter productAttributeFormatter,
                        IOrderExcelExporter orderExcelExporter,
                        ICacheManager cacheManager,
                        IAppNotifier appNotifier)
 {
     this._orderManager              = orderAppService;
     this._storeManager              = storeManager;
     this._localizationManager       = localizationManager;
     this._cacheManager              = cacheManager;
     this._pictureManager            = pictureManager;
     this._productAttributeParser    = productAttributeParser;
     this._stateManager              = stateManager;
     this._productAttributeFormatter = productAttributeFormatter;
     this._productManager            = productManager;
     this._productAttributeManager   = productAttributeManager;
     this._orderExcelExporter        = orderExcelExporter;
     this._appNotifier = appNotifier;
 }
Пример #3
0
 public CategoryAppService(ICategoryManager catalogyManager,
                           ICacheManager cacheManager,
                           IPictureManager pictureManager)
 {
     this._catalogyManager = catalogyManager;
     this._cacheManager    = cacheManager;
     this._pictureManager  = pictureManager;
 }
Пример #4
0
 public StoreAppService(IStoreManager storeManager,
                        ICacheManager cacheManager,
                        IPictureManager pictureManager)
 {
     this._storeManager   = storeManager;
     this._cacheManager   = cacheManager;
     this._pictureManager = pictureManager;
 }
Пример #5
0
 public UserController(IUserManager um, IPictureManager pm, ILocationManager locmng,IEmailService es,IAdressManager amng)
 {
     this.um = um;
     this.pm = pm;
     this.locmng = locmng;
     this.es = es;
     this.amng = amng;
 }
 public CustomerAppService(ICustomerManager customerManager,
                           ICacheManager cacheManager,
                           IPictureManager pictureManager)
 {
     this._customerManager = customerManager;
     this._cacheManager    = cacheManager;
     this._pictureManager  = pictureManager;
 }
        public ConfirmViewModel(MediaFile file)
        {
            _media = file;
            var service = new DependencyServiceManager();

            _mediaPicker    = service.MediaPicker;
            _pictureManager = service.PictureManager;
            _image          = ImageSource.FromStream(() => file.Source);
        }
        public ConfirmPage(MediaFile file)
        {
            _mediFile = file;
            var service = new DependencyServiceManager();

            _pictureManager     = service.PictureManager;
            _api                = new RestApi();
            this.BindingContext = new ConfirmViewModel(file);
            InitializeComponent();
        }
Пример #9
0
 public TenantInfoAppService(UserManager userManager,
                             RoleManager roleManager,
                             IUnitOfWorkManager unitOfWorkManager,
                             IPictureManager pictureManager)
 {
     this._userManager       = userManager;
     this._roleManager       = roleManager;
     this._unitOfWorkManager = unitOfWorkManager;
     this._pictureManager    = pictureManager;
 }
Пример #10
0
 public SessionAppService(IPictureManager pictureManager,
                          ISubscribableEditionCache subscribableEditionCache,
                          IUserNotificationManager userNotificationManager,
                          VappsTenantCache tenantCache)
 {
     this._pictureManager           = pictureManager;
     this._subscribableEditionCache = subscribableEditionCache;
     this._userNotificationManager  = userNotificationManager;
     this._tenantCache = tenantCache;
 }
Пример #11
0
 public TenantSettingsAppService(
     IMultiTenancyConfig multiTenancyConfig,
     ITimeZoneService timeZoneService,
     IEmailSender emailSender,
     IBinaryObjectManager binaryObjectManager,
     IPictureManager pictureManager) : base(emailSender)
 {
     _multiTenancyConfig  = multiTenancyConfig;
     _timeZoneService     = timeZoneService;
     _binaryObjectManager = binaryObjectManager;
     _pictureManager      = pictureManager;
 }
Пример #12
0
 public ProductAppService(IProductManager productManager,
                          ICategoryManager categoryManager,
                          ICacheManager cacheManager,
                          IPictureManager pictureManager,
                          IProductAttributeManager productAttributeManager)
 {
     this._productManager          = productManager;
     this._categoryManager         = categoryManager;
     this._cacheManager            = cacheManager;
     this._pictureManager          = pictureManager;
     this._productAttributeManager = productAttributeManager;
 }
Пример #13
0
 public FileAppService(IPictureManager pictureManager,
                       IStorageProvider storageProvider,
                       IAppFolders appFolders,
                       IHttpContextAccessor contextAccessor,
                       IMultiTenancyConfig multiTenancyConfig)
 {
     this._pictureManager     = pictureManager;
     this._storageProvider    = storageProvider;
     this._contextAccessor    = contextAccessor;
     this._appFolders         = appFolders;
     this._multiTenancyConfig = multiTenancyConfig;
 }
        /// <summary>
        /// Creator: Robert Holmes
        /// Created: 04/29/2020
        /// Approver:
        ///
        /// Constroctor for view/edit operations.
        /// </summary>
        /// <remarks>
        /// Updater: Robert Holmes
        /// Updated: 5/5/2020
        /// Update: Migrated edit functionality from other tab.
        ///
        /// </remarks>
        /// <param name="frame"></param>
        /// <param name="inventoryItem"></param>
        /// <param name="editMode"></param>
        public pgAddEditViewProduct(Frame frame, InventoryItems inventoryItem, bool editMode = false)
        {
            _frame          = frame;
            _productManager = new ProductManager();
            _pictureManager = new PictureManager();
            _inventoryItem  = inventoryItem;
            _editMode       = editMode;
            try
            {
                _product  = _productManager.RetrieveProductByID(inventoryItem.ProductID);
                _picture  = _pictureManager.RetrieveMostRecentPictureByProductID(_product.ProductID);
                _products = _productManager.RetrieveAllProductsByType();
            }
            catch (Exception ex)
            {
                WPFErrorHandler.ErrorMessage("There was a problem loading product data:\n\n" + ex.Message);
            }
            InitializeComponent();
            setItemFields(_product);
            initializeComboBoxes();
            if (_picture == null)
            {
                _picture = new Picture();
            }

            try
            {
                using (var stream = new MemoryStream(_picture.ImageData))
                {
                    imgPicture.Source = BitmapFrame.Create(stream, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
                }
            }
            catch (Exception ex)
            {
                WPFErrorHandler.ErrorMessage("There was a problem loading the picture.\n\n" + ex.Message);
            }

            if (!editMode)
            {
                lblHeading.Content   = "View Product";
                btnAction.Content    = "Done";
                btnCancel.Visibility = Visibility.Hidden;
                makeReadOnly();
            }
            else
            {
                lblHeading.Content = "Edit Product";
                btnAction.Content  = "Update";
                makeEditable();
                txtProductID.IsReadOnly = true;
            }
        }
Пример #15
0
        /// <summary>
        /// 获取产品图片
        /// </summary>
        /// <param name="product">产品</param>
        /// <param name="attributesJson">属性json字符串</param>
        /// <param name="pictureManager"></param>
        /// <param name="productAttributeParser"></param>
        /// <returns>Picture</returns>
        public static async Task <string> GetProductDefaultPictureUrl(this Product product, string attributesJson,
                                                                      IPictureManager pictureManager,
                                                                      IProductAttributeParser productAttributeParser)
        {
            if (product == null)
            {
                throw new AbpException("product");
            }
            if (pictureManager == null)
            {
                throw new AbpException("pictureManager");
            }
            if (productAttributeParser == null)
            {
                throw new AbpException("productAttributeParser");
            }

            long pictureId = 0;

            if (!attributesJson.IsNullOrEmpty())
            {
                var jsonAttributeList = JsonConvert.DeserializeObject <List <JsonProductAttribute> >(attributesJson);

                var pvaValues = await productAttributeParser.ParseProductAttributeValuesAsync(product.Id, jsonAttributeList);

                if (pvaValues != null && pvaValues.Any())
                {
                    pictureId = pvaValues.First().PictureId;
                }
            }

            if (pictureId == 0)
            {
                var pPicture = product.Pictures.FirstOrDefault();

                if (pPicture != null)
                {
                    pictureId = pPicture.PictureId;
                }
            }

            return(await pictureManager.GetPictureUrlAsync(pictureId));;
        }
Пример #16
0
 public ProfileAppService(
     IAppFolders appFolders,
     IBinaryObjectManager binaryObjectManager,
     ITimeZoneService timezoneService,
     IPictureManager pictureManager,
     IVerificationCodeManager verificationCodeManager,
     IUserAccountManager userAccountManager,
     IAccountCache accountCache,
     UserManager userManager)
 {
     _appFolders              = appFolders;
     _binaryObjectManager     = binaryObjectManager;
     _timeZoneService         = timezoneService;
     _pictureManager          = pictureManager;
     _verificationCodeManager = verificationCodeManager;
     _userAccountManager      = userAccountManager;
     _accountCache            = accountCache;
     _userManager             = userManager;
 }
 /// <summary>
 /// Creator: Robert Holmes
 /// Created: 2020/03/18
 /// Approver: Jaeho Kim
 ///
 /// Constructor used for adding a new product.
 /// </summary>
 /// <remarks>
 /// Updater:
 /// Updated:
 /// Update:
 ///
 /// </remarks>
 /// <param name="frame">Frame used for navigation.</param>
 /// <param name="productManager">ProductManager passed from previous screen to avoid having to instantiate a new one.</param>
 /// <param name="item">Item selected from previous screen.</param>
 public pgAddEditViewProduct(Frame frame, IProductManager productManager, Item item)
 {
     _frame          = frame;
     _productManager = productManager;
     _pictureManager = new PictureManager();
     _product        = new Product();
     _picture        = new Picture();
     InitializeComponent();
     setItemFields(item);
     initializeComboBoxes();
     lblHeading.Content = "Add a New Product";
     btnAction.Content  = "Save";
     try
     {
         _products = _productManager.RetrieveAllProductsByType();
     }
     catch (Exception ex)
     {
         WPFErrorHandler.ErrorMessage("Failed to load product list.");
     }
 }
Пример #18
0
 public PictureAppService(IPictureManager pictureManager)
 {
     _pictureManager = pictureManager;
 }
Пример #19
0
 /// <summary>
 /// Creator: Robert Holmes
 /// Created: 04/29/2020
 /// Approver: Jaeho Kim
 ///
 /// Default Constructor, intitializes class level variables.
 /// </summary>
 /// <remarks>
 /// Updater:
 /// Updated:
 /// Update:
 /// </remarks>
 public ProductController()
 {
     _productManager = new ProductManager();
     _pictureManager = new PictureManager();
 }
Пример #20
0
 public PicturesController(IPictureManager pictureManager)
 {
     _pictureManager = pictureManager;
 }
 /// <summary>
 /// Creator: Rasha Mohammed
 /// Created: 4/1/2020
 /// Approver: Ethan Holmes
 ///
 /// This is the default constructor
 /// </summary>
 /// <remarks>
 /// Updater: NA
 /// Updated: NA
 /// Update: NA
 ///
 /// </remarks>
 public FilterItem()
 {
     InitializeComponent();
     _pictureManager = new PictureManager();
 }
Пример #22
0
 public PicturesController(IPictureManager pictureManager)
 {
     _pictureManager = pictureManager;
 }
Пример #23
0
 public PictureController(IFileRepository pictureRepository, IPictureManager pictureManager)
 {
     _pictureRepository = pictureRepository;
     _pictureManager    = pictureManager;
 }
 public PictureController()
 {
     _context        = new DataContext();
     _pictureManager = new PictureManager(new PictureRepository(_context));
 }
Пример #25
0
 public MediaController(IAsyncDocumentSession documentSession, IPictureManager pictureManager)
     : base(documentSession)
 {
     _pictureManager = pictureManager;
 }
 public RestApi()
 {
     _pictureManager = DependencyService.Get <IPictureManager>();
 }