public static ParamContainer CreateParamContainer(ILogger loggerController, IActionExecuter actionExecuter)
        {
            ILogReader         logReader         = Logger.GetLogReader();
            IAppSettingService appSettingService = AppSettingService.Instance;
            ParamContainer     paramContainer    = new ParamContainer();

            IDBService       dbService       = ApplicationConfig.DependencyResolver.GetInstance <IDBService>();
            IPingService     pingService     = ApplicationConfig.DependencyResolver.GetInstance <IPingService>();
            IViewEngine      viewEngine      = ApplicationConfig.DependencyResolver.GetInstance <IViewEngine>();
            IEncryption      encryption      = ApplicationConfig.DependencyResolver.GetInstance <IEncryption>();
            IKeyValueStorage keyValueStorage = ApplicationConfig.DependencyResolver.GetInstance <IKeyValueStorage>();

            ISMSService   smsService   = new SMSService(loggerController, dbService, actionExecuter, viewEngine, paramContainer);
            IEmailService emailService = new EmailService(loggerController, dbService, actionExecuter, viewEngine, paramContainer);
            IOTPService   otpService   = new OTPService(loggerController, dbService, smsService, emailService, appSettingService);

            paramContainer.AddKey(CommonConst.CommonValue.PARAM_DBPROXY, () => { return(dbService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_LOGGER, () => { return(loggerController); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_ACTIONEXECUTER, () => { return(actionExecuter); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_PING_SERVICE, () => { return(pingService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_PING_SERVICE, () => { return(pingService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_APP_SETTING, () => { return(appSettingService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_VIEW_ENGINE, () => { return(viewEngine); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_OTP_SERVICE, () => { return(otpService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_SMS_SERVICE, () => { return(smsService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_EMAIL_SERVICE, () => { return(emailService); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_ENCRYPTION_SERVICE, () => { return(encryption); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_KEY_VALUE_STORAGE, () => { return(keyValueStorage); });
            paramContainer.AddKey(CommonConst.CommonValue.PARAM_HTTP_CLIENT, () => { return(new HttpRestClient()); });

            return(paramContainer);
        }
Beispiel #2
0
        public ActionResult AddContacterDialog()
        {
            IAppSettingService appSetService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();

            ViewData["ParentNode"] = appSetService.SelectNodeItemByParentCode("LianXiRenLeiXingGuanLi");
            return(View());
        }
Beispiel #3
0
 // public ActionService(ISelectedFileService selectedFileService, IAudioPlaybackService audioPlaybackService, IAppSettingService appSettingService)
 public ActionService()
 {
     this.selectedFileService   = UnityHandler.UnityContainer.Resolve <ISelectedFileService>();
     this.appSettingService     = UnityHandler.UnityContainer.Resolve <IAppSettingService>();
     this.audioPlaybackService  = UnityHandler.UnityContainer.Resolve <IAudioPlaybackService>();
     this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>();
 }
Beispiel #4
0
        public MainViewModel(
            ICoreViewModel coreViewModel,
            IFileDialogService fileDialogService,
            IAppSettingService appSettingService,
            IEventAggregator eventService)
            : base(eventService)
        {
            m_Lock              = new object();
            m_CoreViewModel     = coreViewModel ?? throw new ArgumentNullException(nameof(coreViewModel));
            m_FileDialogService = fileDialogService ?? throw new ArgumentNullException(nameof(fileDialogService));
            m_AppSettingService = appSettingService ?? throw new ArgumentNullException(nameof(appSettingService));
            m_EventService      = eventService ?? throw new ArgumentNullException(nameof(eventService));

            m_NotificationInteractionRequest              = new InteractionRequest <Notification>();
            m_ConfirmationInteractionRequest              = new InteractionRequest <Confirmation>();
            m_ResourceSettingsManagerInteractionRequest   = new InteractionRequest <ResourceSettingsManagerConfirmation>();
            m_ArrowGraphSettingsManagerInteractionRequest = new InteractionRequest <ArrowGraphSettingsManagerConfirmation>();
            m_AboutInteractionRequest = new InteractionRequest <Notification>();

            ResetProject();

            ShowDates = false;
            UseBusinessDaysWithoutPublishing = true;
            AutoCompile = true;
            InitializeCommands();

            SubscribePropertyChanged(m_CoreViewModel, nameof(m_CoreViewModel.ProjectStart), nameof(ProjectStart), ThreadOption.BackgroundThread);
            SubscribePropertyChanged(m_CoreViewModel, nameof(m_CoreViewModel.IsProjectUpdated), nameof(IsProjectUpdated), ThreadOption.BackgroundThread);
            SubscribePropertyChanged(m_CoreViewModel, nameof(m_CoreViewModel.ShowDates), nameof(ShowDates), ThreadOption.BackgroundThread);
            SubscribePropertyChanged(m_CoreViewModel, nameof(m_CoreViewModel.UseBusinessDays), nameof(UseBusinessDays), ThreadOption.BackgroundThread);
        }
Beispiel #5
0
        private void HandleFirstStartAndUpdates(IActionService actionService, IAppSettingService appSettingService, IApplicationHotkeyService hotkeyService, bool firstTimeUser)
        {
            if (appSettingService.CheckForUpdateOnStart)
            {
                Task.Run(() => { actionService.CheckForUpdates(showMessages: false); });
            }

            var     currentFileVersion   = new Version(ThisAssembly.AssemblyFileVersion);
            Version lastInstalledVersion = appSettingService.LastInstalledVersion;

            appSettingService.LastInstalledVersion = currentFileVersion;
            hotkeyService.ResetAndReadHotkeysFromConfig();

            if (firstTimeUser)
            {
                actionService.ShowNewToApplicationWindow();
            }
            else if (currentFileVersion.CompareTo(lastInstalledVersion) > 0)
            {
                actionService.ShowNewToVersionDialog(currentFileVersion, lastInstalledVersion);
            }
            else if (appSettingService.ShowTipsAtApplicationStart)
            {
                actionService.ShowRandomApplicationTip();
            }
        }
Beispiel #6
0
 public FileKeyValueFileStorage(IEncryption encryption, IAppSettingService appSettingService, ILogger logger)
 {
     _logger            = logger;
     _encryption        = encryption;
     _appSettingService = appSettingService;
     _storageBasePath   = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ZNxtApp", appSettingService.GetAppSettingData("DataBaseName"));
 }
Beispiel #7
0
        public List <CategoryItems> QueryAllAppSetting()
        {
            IAppSettingService   appSetService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();
            List <CategoryItems> items         = appSetService.QueryAll();

            return(items);
        }
Beispiel #8
0
 public SysController(IAppSettingService appSettingService, ISession session, OpHelper opHelper, ILogger logger)
 {
     _appSettingService = appSettingService;
     _session           = session;
     _opHelper          = opHelper;
     _logger            = logger;
 }
        public AboutWindow()
        {
            DataContext = this;
            InitializeComponent();

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                this.appSettingService = new DesignerAppSettingService();
                this.actionService     = new DesignerActionService();
                return;
            }
            else
            {
                // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime)
                this.Resources = null;

                this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>();
                this.actionService     = UnityHandler.UnityContainer.Resolve <IActionService>();
            }

            var assemblyInformationalVersion = appSettingService.RuntimeInformalVersionString;
            var assemblyFileVersion          = new Version(appSettingService.RuntimeVersionString);

            AppNameAndVersion.Text = string.Format("RecNForget {0}", string.Format("{0}.{1}.{2}", assemblyFileVersion.Major, assemblyFileVersion.Minor, assemblyFileVersion.Build));
            VersionLabel.Text      = string.Format("{0} - v{1}", "Chili Garlic Shrimps", assemblyInformationalVersion);
        }
Beispiel #10
0
        public RecordingAndPlaybackControl()
        {
            DataContext = this;
            InitializeComponent();

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                this.actionService     = new DesignerActionService();
                this.appSettingService = new DesignerAppSettingService();

                AudioPlaybackService  = new DesignerAudioPlaybackService();
                AudioRecordingService = new DesignerAudioRecordingService();
                SelectedFileService   = new DesignerSelectedFileService();
            }
            else
            {
                // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime)
                this.Resources = null;

                this.actionService     = UnityHandler.UnityContainer.Resolve <IActionService>();
                this.appSettingService = UnityHandler.UnityContainer.Resolve <IAppSettingService>();
                AudioPlaybackService   = UnityHandler.UnityContainer.Resolve <IAudioPlaybackService>();
                AudioRecordingService  = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>();
                SelectedFileService    = UnityHandler.UnityContainer.Resolve <ISelectedFileService>();

                AudioPlaybackService.PropertyChanged  += AudioPlaybackService_PropertyChanged;
                AudioRecordingService.PropertyChanged += AudioRecordingService_PropertyChanged;
            }
        }
Beispiel #11
0
        public OutputPathControl()
        {
            DataContext = this;
            InitializeComponent();

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                this.actionService         = new DesignerActionService();
                this.appSettingService     = new DesignerAppSettingService();
                this.audioRecordingService = new DesignerAudioRecordingService();
                this.selectedFileService   = new DesignerSelectedFileService();

                OutputPathWithFilePattern = audioRecordingService.GetTargetPathTemplateString();
                return;
            }
            else
            {
                // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime)
                this.Resources = null;

                this.actionService         = UnityHandler.UnityContainer.Resolve <IActionService>();
                this.appSettingService     = UnityHandler.UnityContainer.Resolve <IAppSettingService>();
                this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>();

                SelectedFileService = UnityHandler.UnityContainer.Resolve <ISelectedFileService>();

                appSettingService.PropertyChanged += AppSettingService_PropertyChanged;

                UpdateOutputPathWithFileNamePattern();
            }
        }
Beispiel #12
0
        public NewToApplicationWindow(IApplicationHotkeyService hotkeyService, IAppSettingService settingService, IActionService actionService)
        {
            InitializeComponent();

            this.Title = "New to RecNForget?";

            if (DesignerProperties.GetIsInDesignMode(this))
            {
                this.hotkeyService = new DesignerApplicationHotkeyService();
                this.actionService = new DesignerActionService();
                SettingService     = new DesignerAppSettingService();
                return;
            }
            else
            {
                // ToDo: Evil Hack to have the cake (see actual design in design mode) and eat it too (have different styles at runtime)
                this.Resources = null;

                this.hotkeyService = hotkeyService;
                SettingService     = settingService;
                this.actionService = actionService;

                this.KeyDown += Window_KeyDown;
            }
        }
Beispiel #13
0
 public OrderService(
     IRepository <Order> orderRepository,
     IRepository <Product> productRepo,
     IRepository <Cart> cartRepository,
     IRepository <CartItem> cartItemRepository,
     IRepository <UserAddress> userAddressRepository,
     ICouponService couponService,
     ITaxService taxService,
     IShippingPriceService shippingPriceService,
     IMediaService mediaService,
     IPaymentProviderService paymentProviderService,
     IWorkContext workContext,
     IHttpContextAccessor httpContextAccessor,
     IAppSettingService appSettingService)
 {
     _orderRepository        = orderRepository;
     _productRepo            = productRepo;
     _cartRepository         = cartRepository;
     _cartItemRepository     = cartItemRepository;
     _userAddressRepository  = userAddressRepository;
     _couponService          = couponService;
     _taxService             = taxService;
     _shippingPriceService   = shippingPriceService;
     _mediaService           = mediaService;
     _paymentProviderService = paymentProviderService;
     _workContext            = workContext;
     _httpContextAccessor    = httpContextAccessor;
     _appSettingService      = appSettingService;
 }
Beispiel #14
0
        public List <CategoryItems> QueryAppSettingList(string parentCode)
        {
            IAppSettingService   appSetService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();
            List <CategoryItems> items         = appSetService.SelectNodeItemByParentCode(parentCode);

            return(items);
        }
Beispiel #15
0
 public SystemApiController(
     IAppSettingService appSettingService,
     IHttpContextAccessor httpContextAccessor)
 {
     _appSettingService   = appSettingService;
     _httpContextAccessor = httpContextAccessor;
 }
Beispiel #16
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="logger">Logger</param>
 /// <param name="resourceService">Resource service</param>
 /// <param name="themeService">Theme service</param>
 /// <param name="fileService">File service</param>
 /// <param name="appSettingService">App setting service</param>
 /// <param name="gameSettingService">Game setting service</param>
 /// <param name="dialogCoordinator">Dialog coordinator</param>
 public MainModel(
     ILogger <MainModel> logger,
     IResourceService resourceService,
     IThemeService themeService,
     IFileService fileService,
     IAppSettingService appSettingService,
     IGameSettingService gameSettingService,
     IDialogCoordinator dialogCoordinator)
     : base(resourceService, themeService)
 {
     this.logger             = logger;
     this.fileService        = fileService;
     this.appSettingService  = appSettingService;
     this.gameSettingService = gameSettingService;
     this.itemHistory        = new HistoryCollection <Item>();
     this.DialogCoordinator  = dialogCoordinator;
     this.Title            = "ERG Launcher";
     this.Top              = double.NaN;
     this.Left             = double.NaN;
     this.Height           = 450;
     this.Width            = 800;
     this.WindowState      = WindowState.Normal;
     this.IsEnabledBack    = false;
     this.IsEnabledForward = false;
     this.Items            = new ObservableCollection <Item>();
     this.currentBrand     = string.Empty;
 }
        public EarnedValueChartManagerViewModel(
            ICoreViewModel coreViewModel,
            IFileDialogService fileDialogService,
            IAppSettingService appSettingService,
            IDateTimeCalculator dateTimeCalculator,
            IEventAggregator eventService)
            : base(eventService)
        {
            m_Lock               = new object();
            m_CoreViewModel      = coreViewModel ?? throw new ArgumentNullException(nameof(coreViewModel));
            m_FileDialogService  = fileDialogService ?? throw new ArgumentNullException(nameof(fileDialogService));
            m_AppSettingService  = appSettingService ?? throw new ArgumentNullException(nameof(appSettingService));
            m_DateTimeCalculator = dateTimeCalculator ?? throw new ArgumentNullException(nameof(dateTimeCalculator));
            m_EventService       = eventService ?? throw new ArgumentNullException(nameof(eventService));

            m_NotificationInteractionRequest = new InteractionRequest <Notification>();

            m_EarnedValueChartPointSet   = new List <EarnedValuePoint>();
            EarnedValueChartPlotModel    = null;
            EarnedValueChartOutputWidth  = 1000;
            EarnedValueChartOutputHeight = 500;

            InitializeCommands();
            SubscribeToEvents();

            SubscribePropertyChanged(m_CoreViewModel, nameof(m_CoreViewModel.HasStaleOutputs), nameof(HasStaleOutputs), ThreadOption.BackgroundThread);
        }
Beispiel #18
0
 public OrderApiController(
     IRepository <Order> orderRepository,
     IRepository <User> userRepository,
     IRepository <UserAddress> userAddressRepository,
     IRepository <Product> productRepository,
     IRepository <OrderAddress> orderAddressRepository,
     IWorkContext workContext,
     ICountryService countryService,
     IMediator mediator,
     IRepository <Stock> stockRepository,
     IRepository <StockHistory> stockHistoryRepository,
     IRepository <Shipment> shipmentRepository,
     IOrderService orderService,
     IAppSettingService appSettingService)
 {
     _orderRepository        = orderRepository;
     _userRepository         = userRepository;
     _userAddressRepository  = userAddressRepository;
     _productRepository      = productRepository;
     _orderAddressRepository = orderAddressRepository;
     _workContext            = workContext;
     _countryService         = countryService;
     _mediator               = mediator;
     _stockRepository        = stockRepository;
     _stockHistoryRepository = stockHistoryRepository;
     _shipmentRepository     = shipmentRepository;
     _orderService           = orderService;
     _appSettingService      = appSettingService;
 }
Beispiel #19
0
 public SmStorageService(
     IRepository <Media> mediaRepository,
     IAppSettingService appSettingService)
 {
     _mediaRepository   = mediaRepository;
     _appSettingService = appSettingService;
 }
Beispiel #20
0
 public LocalStorageService(
     IRepository <Media> mediaRepository,
     IAppSettingService appSettingService)
 {
     host             = appSettingService.Get(ShopKeys.ApiHost).Result;
     _mediaRepository = mediaRepository;
 }
Beispiel #21
0
        public JsonResult QueryNodes(string parenCode)
        {
            Common.Data.JsonData json          = new JsonData();
            IAppSettingService   appSetService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();

            json = appSetService.SelectNodesByParent(parenCode);
            return(Json(json));
        }
Beispiel #22
0
 public HomeController(IApprovalService approvalService, IProjectService projectService, IBaseDataService baseDataService, IUnitOfWorkAsync unitOfWork, IAppSettingService appSettingService)
 {
     _projectService    = projectService;
     _appSettingService = appSettingService;
     _approvalService   = approvalService;
     _baseDataService   = baseDataService;
     _unitOfWork        = unitOfWork;
 }
Beispiel #23
0
 public AppSettingController(IAppSettingService appSettingService, IAppSetting2AppSettingGroupService appSetting2AppSettingGroupService, IAppSettingGroupService appSettingGroupService, IMapper mapper, ILog4Net logger)
 {
     _appSettingService = appSettingService;
     _appSetting2AppSettingGroupService = appSetting2AppSettingGroupService;
     _appSettingGroupService            = appSettingGroupService;
     _mapper = mapper;
     _logger = logger;
 }
 public AppSettingController(IAppSettingQueryService appSettingQueryService,
                             IAppSettingService appSettingService,
                             IBusinessManagerService businessManagerService) : base(businessManagerService)
 {
     this._appSettingQueryService = appSettingQueryService;
     this._appSettingService      = appSettingService;
     this._businnesManagerService = businessManagerService;
 }
Beispiel #25
0
 public PaymentService(
     ILogger <PaymentService> logger,
     IWeChatPayClient client,
     IAppSettingService appSettingService)
 {
     _logger            = logger;
     _client            = client;
     _appSettingService = appSettingService;
 }
Beispiel #26
0
 public GitHubStorageService(
     //IOptionsMonitor<GitHubUploadOptions> options,
     IRepository <Media> mediaRepository,
     IAppSettingService appSettingService)
 {
     //_options = options;
     _mediaRepository   = mediaRepository;
     _appSettingService = appSettingService;
 }
Beispiel #27
0
 public EmployeesController(IMapper mapper, IUnitOfWork unitOfWork, IEmployeeService employeeService,
                            IVestingRulesService vestingRulesService, IAppSettingService appSettingService)
 {
     this.mapper          = mapper;
     this.unitOfWork      = unitOfWork;
     this.employeeService = employeeService;
     _vestingRulesService = vestingRulesService;
     _appSettingService   = appSettingService;
 }
Beispiel #28
0
        public static Dictionary <string, string> QueryAllAppSetting(IAppSettingService service)
        {
            Dictionary <string, string> app = new Dictionary <string, string>();

            foreach (var item in service.QueryAll())
            {
                app.Add(item.Code, item.ItemValue);
            }
            return(app);
        }
Beispiel #29
0
        // public ActionService(ISelectedFileService selectedFileService, IAudioPlaybackService audioPlaybackService, IAppSettingService appSettingService)
        public ActionService()
        {
            this.selectedFileService   = UnityHandler.UnityContainer.Resolve <ISelectedFileService>();
            this.appSettingService     = UnityHandler.UnityContainer.Resolve <IAppSettingService>();
            this.audioPlaybackService  = UnityHandler.UnityContainer.Resolve <IAudioPlaybackService>();
            this.audioRecordingService = UnityHandler.UnityContainer.Resolve <IAudioRecordingService>();
            this.hotkeyService         = UnityHandler.UnityContainer.Resolve <IApplicationHotkeyService>();

            hotkeyService.ResetAndReadHotkeysFromConfig(this);
        }
Beispiel #30
0
 public AuthController(IAuthLoginService authLoginService, IConfiguration configuration, IRoleUserService roleUserService, IRoleService roleService, IUserService userService, IAppSettingService appSettingService, IGeneralSettingService generalSettingService)
 {
     this._authLoginService      = authLoginService;
     this._configuration         = configuration;
     this._roleUserService       = roleUserService;
     this._roleService           = roleService;
     this._userService           = userService;
     this._appSettingService     = appSettingService;
     this._generalSettingService = generalSettingService;
 }