/// <summary> /// Handles notifications from instrnic behaviors /// </summary> protected override void OnBehaviorEvent(BehaviorEventArgs e) { if (e.Phase == Phase.Bubbling && e.BehaviorEvent == BehaviorEventType.ButtonPress) { OnClick(EventArgs.Empty); } base.OnBehaviorEvent(e); }
/// <summary> /// Handles notifications from instrnic behaviors /// </summary> protected override void OnBehaviorEvent(BehaviorEventArgs e) { if (e.Phase == Phase.Bubbling && e.BehaviorEvent == BehaviorEventType.ButtonStateChanged) { OnValueChanged(EventArgs.Empty); } base.OnBehaviorEvent(e); }
/// <summary> /// Handles notifications from instrnic behaviors /// </summary> protected override void OnBehaviorEvent(BehaviorEventArgs e) { base.OnBehaviorEvent(e); if (e.Phase == Phase.Bubbling && e.BehaviorEvent == BehaviorEventType.ButtonStateChanged) { OnCheckedChanged(EventArgs.Empty); e.Handled = true; } }
/// <summary> /// Handles notifications from instrnic behaviors /// </summary> protected override void OnBehaviorEvent(BehaviorEventArgs e) { if (e.Phase == Phase.Bubbling && e.BehaviorEvent == BehaviorEventType.EditValueChanged) { _text = Element.Text; OnTextChanged(EventArgs.Empty); } base.OnBehaviorEvent(e); }
/// <summary> /// Handles <see cref="SciterBehavior.BehaviorEvent"/> /// </summary> protected override void OnBehaviorEvent(BehaviorEventArgs e) { base.OnBehaviorEvent(e); if (e.Phase == Phase.Bubbling && e.BehaviorEvent == BehaviorEventType.SelectSelectionChanged) { var container = GetItemsContainer(); var index = container.IndexOf(e.Source); DataManager.Position = index; } }
/// <summary> /// Handles <see cref="Behavior"/> events /// </summary> protected override void OnBehaviorEvent(BehaviorEventArgs e) { if (e.Phase == Phase.Bubbling && (e.BehaviorEvent == BehaviorEventType.ActivateChild)) { var item = FindTargetItem(e.Element, e.Target); if (item != null) { SetCurrentItem(e.Element, item); e.Handled = true; } } base.OnBehaviorEvent(e); }
/// <summary> /// Handles behavior event /// </summary> unsafe static partial void Behavior_HandleBehaviorEvent(ISciterBehavior behavior, IntPtr he, IntPtr prms, ref bool handled) { var datantf = (BEHAVIOR_EVENT_PARAMS *)prms; var e = new BehaviorEventArgs(Element.Create(he), (Phase)datantf->cmd & Phase.All) { Source = Element.Create(datantf->he), Target = Element.Create(datantf->heTarget), BehaviorEvent = (BehaviorEventType)datantf->cmd & (BehaviorEventType) ~Phase.All, Reason = (BehaviorEventReason)datantf->reason }; behavior.ProcessBehaviorEvent(e); handled = e.Handled; }