private void Start() { string path = $"{ Application.dataPath}/勤務データ"; fileManager = new DateManager(path); Screen.SetResolution(540, 960, false, 10); Show(); TimeShow(); TextTime = DateTime.Now; ButtonActiveControl(); }
public DateController(IDateManager dateManager) { _dateManager = dateManager; }
public UserAndProjectTimeSlotsForm(ISqlHelper sqlHelper, IDateManager dateManager) { _sqlHelper = sqlHelper ?? throw new ArgumentNullException(nameof(sqlHelper)); _dateManager = dateManager ?? throw new ArgumentNullException(nameof(dateManager)); InitializeComponent(); }
public DashboardForm(ISqlHelper sqlHelper, IDateManager dateManager) { _sqlHelper = sqlHelper; _dateManager = dateManager; InitializeComponent(); }
async Task Init() { try { await _apiService.Login(); } catch (Exception ex) { _logger.LogException(new Exception("apiService.Login Failed")); _logger.LogException(ex); initSuccess = false; return; } try { var holidays = await _apiService.GetHolidays(); this._dateManager = Factories.CreateDateManager(holidays); if (!IsDevelopment) { if (!IsBusinessDay) { this.Close(); return; } } var stocks = await _apiService.GetStocks(); stocks = stocks.Where(s => !s.ignore).ToList(); string tickFileFolder = _settingsManager.GetSettingValue(AppSettingsKey.TickFile); var tickDBService = ServiceFactory.CreateTickDBService(stocks.Select(s => s.code), tickFileFolder); string baseStock = _settingsManager.GetSettingValue(AppSettingsKey.BaseStock); _stockService = ServiceFactory.CreateStockService(stocks, baseStock, tickDBService); _futuresService = ServiceFactory.CreateFuturesService(tickDBService); var indicatorDataList = await _apiService.GetIndicators(); foreach (var item in indicatorDataList) { this._indicators.Add(IndicatorFactory.Create(item.entity, _stockService, _futuresService)); } _source.SymbolCodes = _stockService.GetStockCodes(); _source.Connect(); } catch (Exception ex) { _logger.LogException(ex); initSuccess = false; return; } initSuccess = true; }