public void Init(Config config) { _config = config; InitHourLines(); InitTargetLine(_config.TargetTimeNum); InitMinTimes(_config.MinTimeStartNum); }
public WorkTime(DateTime? startDateTime) { _config = Config.GetInstance(); _clock = new SystemClock(); if (startDateTime.HasValue) { Init((DateTime)startDateTime); } }
public WorkTime(IClock clock, string startTimeString, DateTime? startDate) { _config = Config.GetInstance(); _clock = clock; // unit testing var validStartTime = ValidateStartTimeFormat(startTimeString); var startDateTime = InitStartDateTime(validStartTime, startDate); Init(startDateTime); }
public void Init(Config config) { _config = config; _defaultBackground = gbTimes.Background; datePickerStartDate.Text = DateTime.Today.ToShortDateString(); var now = DateTime.Now; var dt = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, 0); dateTimePicker1.Value = dt; }
public void Init(WorkTime workTime, Config config) { if (workTime == null || config == null) { throw new ArgumentException("bla"); } _startTime = workTime.StartTime; _config = config; InitStartTime(workTime); InitTargetTime(workTime, RadiusTargetTime); InitMinTime(workTime, RadiusMinTime); InitMaxTime(workTime, RadiusMaxTime); }
public void Init(Config config) { _config = config; }
public WorkTime(IClock clock, DateTime startDateTime) { _config = Config.GetInstance(); _clock = clock; // unit testing Init(startDateTime); }
private void Window_Loaded(object sender, RoutedEventArgs e) { _config = Config.GetInstance(); ucTimeAsText.Init(_config); ucProgress.Init(_config); ucTimeCheckboxes.Init(_config); ucTimeCheckboxes.CheckChanged += ucTimeCheckboxes_CheckChanged; }
public static Config GetInstance() { return _instance ?? (_instance = new Config()); }