Пример #1
0
        protected override void OnDeactivate(bool close)
        {
            //re-enable underlying event handling
            _root.IfHasValueThenDo(ui => ui.IsHitTestVisible = true);

            // reset the application bar
            _scope.IfHasValueThenDo(scope => scope.Dispose());
        }
Пример #2
0
        protected void UpdateApplicationBar(Action <ApplicationBar> builder)
        {
            _applicationBar.IfHasValueThenDo(bar =>
            {
                var previous = bar.Instance;
                _scope       = Disposable
                               .Create(() => bar.Update(previous))
                               .Maybe();

                bar.UpdateWith(config => config.Setup(builder));
            });
        }
Пример #3
0
        public May <T> Set <T>(string key, May <T> value)
        {
            value.IfHasValueThenDo(x =>
            {
                var existing = Get <T>(key);
                if (!existing.HasValue || IsDifferent(existing.ForceGetValue(), x))
                {
                    Store(key, x);
                }
            });

            return(value);
        }
Пример #4
0
 protected override void OnActivate()
 {
     // disable underlying event handling
     _root.IfHasValueThenDo(ui => ui.IsHitTestVisible = false);
 }