Exemplo n.º 1
0
        public static DateChangeTrigger GetTigger(TimeZoneInfo info = null)
        {
            if (info == null) info = TimeZoneInfo.Utc;

            DateChangeTrigger trigger;
            if (!Triggers.TryGetValue(info, out trigger))
            {
                trigger = new DateChangeTrigger(info);
                Triggers.Add(info, trigger);
            }

            return trigger;
        }
Exemplo n.º 2
0
        public DetailViewModel()
        {
            this.UpdateAction += this.UpdateSlotTypes;

            var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time");
            this._dayTrigger = DateChangeTrigger.GetTigger(timeZone);
            this._dayTrigger
                .Subscribe(nameof(DateChangeTrigger.Today), () => this.CurrentDay = this._dayTrigger.Today.DayOfWeek, false)
                .AddTo(this);

            this._currentDay = this._dayTrigger.Today.DayOfWeek;

            this.Update();
        }
Exemplo n.º 3
0
        public static DateChangeTrigger GetTigger(TimeZoneInfo info = null)
        {
            if (info == null)
            {
                info = TimeZoneInfo.Utc;
            }

            DateChangeTrigger trigger;

            if (!Triggers.TryGetValue(info, out trigger))
            {
                trigger = new DateChangeTrigger(info);
                Triggers.Add(info, trigger);
            }

            return(trigger);
        }