public MainWindow(IHrResourceService hrResourceService, ILoggerReader loggerReader,
                          IAppConfiguration appConfiguration)
        {
            _hrResourceService = hrResourceService;
            _loggerReader      = loggerReader;
            _appConfiguration  = appConfiguration;
            _hrResourceService.Init();


            _notifyIcon = new TaskbarIcon();
            InitIcon();
            InitializeComponent();
        }
Beispiel #2
0
        public MainWindow()
        {
            _notifyIcon = new NotifyIcon
            {
                BalloonTipText  = @"已經最小化,點擊查看選項",
                BalloonTipTitle = $@"自動打卡系統 v{_curAssembly.GetName().Version}"
            };
            _notifyIcon.Text  = _curAssembly.GetName().Version.ToString();
            _loggerReader     = new Logger();
            _logger           = (ILogger)_loggerReader;
            _appConfiguration = new AppConfiguration();
            var service = new NueIpService(_logger, _appConfiguration);

            _hrResourceService = new HrResourceService(_logger, service);
            _hrResourceService.Init();
            InitIcon();
            MinizeIcon();
            InitializeComponent();
            SystemEvents.SessionEnding    += SystemEvents_SessionEnding;
            SystemEvents.PowerModeChanged += OnPowerChange;
        }