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<T>"/> 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<ENUM>"/> class. /// </summary> /// <param name="binder">The binder.</param> public ScreenStateMachine(IScreenBinder binder) { Assert.ArgumentNotNull(binder, nameof(binder)); _binder = binder; }
public void ChangeStateTo(ENUM key, IScreenBinder binder) { _states[key].Process(binder); }