Exemplo n.º 1
0
 public override async Task InteropEventCallback(string id, CallerName name, EventType type)
 {
     if (id == DataId && name.Equals(typeof(ClickForward)) && type == EventType.Click)
     {
         await ToggleAsync();
     }
 }
Exemplo n.º 2
0
 public override async Task InteropEventCallback(string id, CallerName name, EventType type)
 {
     if (DataId == id && name.Equals(this) && type == EventType.TransitionEnd)
     {
         await TransitionEndAsync();
     }
 }
Exemplo n.º 3
0
 public override async Task InteropEventCallback(string id, CallerName name, EventType type)
 {
     if (id == Target && name.Equals(typeof(ClickForward)) && type == EventType.Click)
     {
         await ToggleAsync();
     }
     else if ((name.Equals(typeof(BSModal)) || name.Equals(typeof(BSOffCanvas))) && type == EventType.Toggle)
     {
         await HideAsync();
     }
 }
Exemplo n.º 4
0
 public override async Task InteropEventCallback(string id, CallerName name, EventType type,
                                                 Dictionary <string, string>?classList = null, JavascriptEvent?e = null)
 {
     if (id == Target && name.Equals(this) && type == EventType.Mouseenter)
     {
         await ShowAsync();
     }
     else if (id == Target && name.Equals(this) && type == EventType.Mouseleave)
     {
         await HideAsync();
     }
 }
Exemplo n.º 5
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Id != null ? Id.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Subject != null ? Subject.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Location != null ? Location.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LocationProposition != null ? LocationProposition.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AdditionalInformation != null ? AdditionalInformation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ StartTime.GetHashCode();
         hashCode = (hashCode * 397) ^ LaunchTime.GetHashCode();
         hashCode = (hashCode * 397) ^ EndTime.GetHashCode();
         hashCode = (hashCode * 397) ^ Status;
         hashCode = (hashCode * 397) ^ (AlarmStation != null ? AlarmStation.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ AlarmLevel;
         hashCode = (hashCode * 397) ^ (CallerName != null ? CallerName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CallerTelephoneNumber != null ? CallerTelephoneNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SirenProgram != null ? SirenProgram.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FireBrigades.GetHashCode();
         return(hashCode);
     }
 }
Exemplo n.º 6
0
        public override async Task InteropEventCallback(string id, CallerName name, EventType type,
                                                        Dictionary <string, string>?classList, JavascriptEvent?e)
        {
            // The if statement was getting hard to read so split into parts
            if (id == DataRefId && name.Equals(this) && type == EventType.Click)
            {
                // If this dropdown toggle return
                if (e?.Target.ClassList.Any(q => q.Value == "dropdown-toggle") == true &&
                    e.Target.TargetId == DataId)
                {
                    return;
                }

                // If click element is inside this dropdown return
                // if (e?.Target.ChildrenId?.Any(q => q == DataId) == true && AllowItemClick) return;
                // If is Manual Return
                if (IsManual)
                {
                    return;
                }
                await HideAsync();
            }
        }
Exemplo n.º 7
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = Key != null?Key.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (AlarmStation != null ? AlarmStation.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ReceiveTime != null ? ReceiveTime.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ AlarmLevel;
                hashCode = (hashCode * 397) ^ (CallerName != null ? CallerName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (CallerTelephoneNumber != null ? CallerTelephoneNumber.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Subject != null ? Subject.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Location != null ? Location.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (AdditionalInformation != null ? AdditionalInformation.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (StatusText != null ? StatusText.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (WatchOutTime != null ? WatchOutTime.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (SirenProgram != null ? SirenProgram.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (FinishedTime != null ? FinishedTime.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (FireBrigades != null ? FireBrigades.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Index;
                return(hashCode);
            }
        }
Exemplo n.º 8
0
 /// <summary>
 /// Add [JSInvokable] above your override
 /// </summary>
 public virtual Task InteropEventCallback(string id, CallerName name, EventType type)
 => Task.CompletedTask;
Exemplo n.º 9
0
        // ReSharper disable once NullableWarningSuppressionIsUsed

        // [Inject] public IJSRuntime Js { get; set; } = null!;

        /// <summary>
        /// Add [JSInvokable] above your override
        /// </summary>
        public virtual Task InteropEventCallback(string id, CallerName name, EventType type, Dictionary <string, string>?classList, JavascriptEvent?e)
        => Task.CompletedTask;