private Color GetStateColor(HMIButton bt, UnhangState st) { Color backColor = HMI.Presentation.AUrr.UI.VisualStyle.ButtonColor; switch (st) { case UnhangState.Out: backColor = HMI.Presentation.AUrr.UI.VisualStyle.Colors.Blue; break; case UnhangState.Set: case UnhangState.Conf: backColor = HMI.Presentation.AUrr.UI.VisualStyle.Colors.Green; break; case UnhangState.Hold: case UnhangState.RemoteHold: backColor = _SlowBlinkOn ? HMI.Presentation.AUrr.UI.VisualStyle.Colors.Green : HMI.Presentation.AUrr.UI.VisualStyle.ButtonColor; _SlowBlinkList[bt] = HMI.Presentation.AUrr.UI.VisualStyle.Colors.Green; _SlowBlinkTimer.Enabled = true; break; case UnhangState.Busy: backColor = HMI.Presentation.AUrr.UI.VisualStyle.Colors.Red; break; case UnhangState.Congestion: case UnhangState.OutOfService: backColor = _SlowBlinkOn ? HMI.Presentation.AUrr.UI.VisualStyle.Colors.Red : HMI.Presentation.AUrr.UI.VisualStyle.ButtonColor; _SlowBlinkList[bt] = HMI.Presentation.AUrr.UI.VisualStyle.Colors.Red; _SlowBlinkTimer.Enabled = true; break; case UnhangState.NotAllowed: backColor = _SlowBlinkOn ? HMI.Presentation.AUrr.UI.VisualStyle.Colors.Yellow : HMI.Presentation.AUrr.UI.VisualStyle.ButtonColor; _SlowBlinkList[bt] = HMI.Presentation.AUrr.UI.VisualStyle.Colors.Yellow; _SlowBlinkTimer.Enabled = true; break; } return(backColor); }
public void CheckTlfStChanged(TlfDst dst) { if (_AssociatePosition == dst.Id) { switch (dst.State) { case TlfState.Unavailable: case TlfState.Idle: case TlfState.PaPBusy: if (_State != UnhangState.Idle) { // Puede ocurrir que antes realizar la llamada por acceso indirecto // tengamos que colgar una ya existente. De ahí la comprobación _AssociatePosition = -1; State = UnhangState.Idle; } break; case TlfState.Out: State = UnhangState.Out; break; case TlfState.Set: State = UnhangState.Set; break; case TlfState.Conf: State = UnhangState.Conf; break; case TlfState.Busy: State = UnhangState.Busy; break; case TlfState.RemoteHold: State = UnhangState.RemoteHold; break; case TlfState.Hold: State = UnhangState.Hold; break; case TlfState.Congestion: State = UnhangState.Congestion; break; case TlfState.OutOfService: State = UnhangState.OutOfService; break; case TlfState.NotAllowed: State = UnhangState.NotAllowed; break; default: _AssociatePosition = -1; State = UnhangState.Idle; break; } } }
public void NewCall(bool ia) { _AssociatePosition = ia ? Tlf.IaMappedPosition : -1; State = UnhangState.Idle; }
public void Reset() { _AssociatePosition = -1; State = UnhangState.Idle; }