Exemplo n.º 1
0
        public void TestMethod1()
        {


            AppStatusManager appStatu = new AppStatusManager(DirectoryHelper.CombineWithCurrentExeDir("settting"));
            appStatu.AddOrUpdate("joke_index","0");
            appStatu.SaveToFile();

        }
Exemplo n.º 2
0
        public ProductListViewModel( IEventAggregator eventAggregator,
            ProductService productService,
            ProductVMContainer productVMContainer,
            IUnityContainer container,
            ProductExportToPdfService productExportToPdfService,
            DomainProductSrcriptExecuter scriptExecuter,
            AppStatusManager status
            )
        {

            this.container = container;
            this.scriptExecuter = scriptExecuter;
            this.productExportToPdfService = productExportToPdfService;
            this.eventAggregator = eventAggregator;
            this.productService = productService;
            this.productVMContainer = productVMContainer;
            this.status = status;

            this.cleanFilterTxtCommand = new DelegateCommand(() => this.FilterTxt = string.Empty);
            
            var dmProductList = productService.GetAllProduct();

            var list= dmProductList.Select(x =>
               CreateVM(container, x)
               ).ToList().OrderBy(x => x.DomainProduct.Brand).ThenBy(x => x.DomainProduct.Name);

            this.ProductList = new ObservableCollection<ProductItemViewModel>(list);
       
            this.ProductListCollectionView = CollectionViewSource.GetDefaultView(this.ProductList);
            this.ProductListCollectionView.Filter = FilterFunction;

            this.ScriptText = this.status.Get("DomainProduct.ScriptText", "");
            this.eventAggregator.GetEvent<ProductSellPriceChangedEvent>().Subscribe(ProductSellPriceChangedEventHandler);
             
        }
Exemplo n.º 3
0
        public JokeProvide(AppStatusManager status)
        {
            this.status = status;

        }