Beispiel #1
0
        public void Process(IScreenBinder binder)
        {
            binder.InsideLatch(
                delegate
            {
                foreach (Control control in _allControls.AllControls)
                {
                    IScreenElement element = binder.FindElementForControl(control);
                    if (element == null)
                    {
                        control.Hide();
                    }
                    else
                    {
                        element.Hide();
                    }
                }

                foreach (Control control in _controls.AllControls)
                {
                    IScreenElement element = binder.FindElementForControl(control);
                    if (element == null)
                    {
                        control.Show();
                    }
                    else
                    {
                        element.Show();
                    }
                }
            });
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyBindingExpression"/> class.
        /// </summary>
        /// <param name="binder">The binder.</param>
        /// <param name="accessor">The accessor.</param>
        public PropertyBindingExpression([NotNull] IScreenBinder binder,
                                         [NotNull] IPropertyAccessor accessor)
        {
            Assert.ArgumentNotNull(binder, nameof(binder));
            Assert.ArgumentNotNull(accessor, nameof(accessor));

            _binder   = binder;
            _accessor = accessor;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ChildScreenBinder&lt;T&gt;"/> class.
        /// </summary>
        /// <param name="innerBinder">The inner binder.</param>
        /// <param name="property">The property.</param>
        public ChildScreenBinder([NotNull] IScreenBinder innerBinder,
                                 [NotNull] PropertyInfo property)
        {
            Assert.ArgumentNotNull(innerBinder, nameof(innerBinder));
            Assert.ArgumentNotNull(property, nameof(property));

            InnerBinder = innerBinder;
            _property   = property;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ScreenStateMachine&lt;ENUM&gt;"/> class.
        /// </summary>
        /// <param name="binder">The binder.</param>
        public ScreenStateMachine(IScreenBinder binder)
        {
            Assert.ArgumentNotNull(binder, nameof(binder));

            _binder = binder;
        }
Beispiel #5
0
 public void ChangeStateTo(ENUM key, IScreenBinder binder)
 {
     _states[key].Process(binder);
 }