public SpAlertMessage(AlertMessageType messageType, MenuResetType menuResetType, bool kick = false) { msg.Write(OpCode.SendPacket[GetType()]); msg.Write((int)messageType); msg.Write((int)menuResetType); msg.Write((kick) ? 1 : 0); }
public MessageWindowOptions (AlertMessageType type) { InitializeComponent(); //TODO: see if I can move conditional logic elsewhere switch (type) { case AlertMessageType.Balloon: _cSize.Enabled = false; _cIsSticky.Enabled = false; _cIsModal.Enabled = false; _cDuration.Enabled = false; _lblDuration.Enabled = false; _cAppearanceOptions.EnableExtendedMode = false; _cAnimationOptions.Enabled = false; break; case AlertMessageType.Dialog: _lblDuration.Enabled = false; _cDuration.Enabled = false; _cIsSticky.Enabled = false; _cAnimationOptions.Enabled = false; break; case AlertMessageType.Notification: _cIsModal.Enabled = false; break; } }
public AlertMessage(string contents, AlertMessageType type) { switch (type) { case AlertMessageType.Error: cssClass = "alert-danger"; heading = "Error!"; break; case AlertMessageType.Success: cssClass = "alert-success"; heading = "Success!"; break; case AlertMessageType.Warning: cssClass = "alert-warning"; heading = "Warning!"; break; default: cssClass = "alert-info"; heading = "Information!"; break; } this.contents = contents; }
private void Disconnect(IConnection connection, AlertMessageType alertMessageType) { var msg = new SpAlertMessage(alertMessageType, MenuResetType.Login); msg.Send(connection); connection.Disconnect(); }
public void TriggerAlert(AlertMessageType messageType) { if (!isActive) { alertText.text = DetermineMessage(messageType); StartCoroutine(FadeAlertIn()); } }
public void SetMessage(string message, string strongMessage, bool closable, AlertMessageType type) { Messages.Add(new AlertMessage() { Message = message, StrongMessage = strongMessage, Closable = closable, AlertType = type }); }
private Brush GetBrush(AlertMessageType type) { switch (type) { case AlertMessageType.Invalid: return(InvalidBrush); case AlertMessageType.Info: return(InfoBrush); case AlertMessageType.Warning: return(WarningBrush); case AlertMessageType.Danger: return(DangerBrush); case AlertMessageType.Success: return(SuccessBrush); } throw new NotImplementedException(); }
string DetermineMessage(AlertMessageType messageType) { switch (messageType) { case AlertMessageType.NoTarget: message = "No target selected."; break; case AlertMessageType.TargetNotInRange: message = "Target not in range."; break; case AlertMessageType.TargetNotInLineOfSight: message = "Target not in line of sight."; break; case AlertMessageType.TargetNotAlive: message = "Target is dead."; break; case AlertMessageType.CharacterNotAlive: message = "You are dead."; break; case AlertMessageType.CorrectWeaponNotEquipped: message = "Correct weapon not equipped."; break; case AlertMessageType.AbilityOnCooldown: message = "Ability is on cooldown."; break; default: break; } return(message); }
/// <summary>Display a predefined status bar alert message.</summary> /// <param name="typeOfAlert">Sets predefined message that should be displayed.</param> public static void ShowAlert(AlertMessageType typeOfAlert) { switch (typeOfAlert) { case AlertMessageType.DeleteWasSuccessful: NotificationAlert.ShowAlert( alertMessage: AileronCaption.DeleteWasSuccessful, alertImage: AileronImage.GetImageSource( name: ImageName.StatusFlagGreen, size: ImageSize.Size32)); break; case AlertMessageType.InternetIsOffline: NotificationAlert.ShowAlert( alertMessage: AileronCaption.InternetIsOffline, alertImage: AileronImage.GetImageSource( name: ImageName.GlobeError, size: ImageSize.Size16)); break; case AlertMessageType.InternetIsOnline: NotificationAlert.ShowAlert( alertMessage: AileronCaption.InternetIsOnline, alertImage: AileronImage.GetImageSource( name: ImageName.GlobeConnected, size: ImageSize.Size16)); break; case AlertMessageType.SaveWasSuccessful: NotificationAlert.ShowAlert( alertMessage: AileronCaption.SaveWasSuccessful, alertImage: AileronImage.GetImageSource( name: ImageName.StatusFlagGreen, size: ImageSize.Size32)); break; } }
public CombatCheck(bool combatCheck, AlertMessageType messageType) { this.combatCheck = combatCheck; this.messageType = messageType; }
protected bool PerformCombatChecks(out AlertMessageType messageType, List <CombatCheck> combatChecks) { messageType = AlertMessageType.None; for (int i = 0; i < combatChecks.Count; i++) { if (combatChecks[i].messageType == AlertMessageType.NoTarget && NoTarget) { messageType = AlertMessageType.NoTarget; return(false); } if (combatChecks[i].messageType == AlertMessageType.TargetNotInRange && TargetNotInRange) { messageType = AlertMessageType.TargetNotInRange; return(false); } if (combatChecks[i].messageType == AlertMessageType.TargetNotInLineOfSight && TargetNotInLineOfSight) { messageType = AlertMessageType.TargetNotInLineOfSight; return(false); } if (combatChecks[i].messageType == AlertMessageType.TargetNotAlive && TargetNotAlive) { messageType = AlertMessageType.TargetNotAlive; return(false); } if (combatChecks[i].messageType == AlertMessageType.CharacterNotAlive && CharacterNotAlive) { messageType = AlertMessageType.CharacterNotAlive; return(false); } if (combatChecks[i].messageType == AlertMessageType.CorrectWeaponNotEquipped && CorrectWeaponNotEquipped) { messageType = AlertMessageType.CorrectWeaponNotEquipped; return(false); } if (combatChecks[i].messageType == AlertMessageType.AbilityOnCooldown && AbilityOnCooldown) { messageType = AlertMessageType.AbilityOnCooldown; return(false); } if (combatChecks[i].messageType == AlertMessageType.IsAttacking && IsAttacking) { return(false); } if (combatChecks[i].messageType == AlertMessageType.IsMoving && IsMoving) { return(false); } } return(true); }
public void AddAlert(AlertMessageType messageType, string message, string userName) { Alerts.Add(new AlertModel { MessageType = messageType, Message = message, UserName = userName }); }
/// <summary> /// Sets the alert message to be show for the user. /// </summary> /// <param name="message">Message to be shown.</param> public void ShowAlertMessage(string title, string msg, AlertMessageType messageType = AlertMessageType.Info) { SnuffoSettings.ShowMessage(TempData, title, msg, messageType); }
private static void AddAlertMessage(this ITempDataDictionary tempData, AlertMessageType alertMessageType, string message) { tempData[AlertPrefix + alertMessageType] = message; }
public AlertMessage(AlertMessageType type, string message) { this.Type = type; this.Message = message; }
private void Message(AlertMessageType type, string message, bool raw) { TempData["Message"] = JsonConvert.SerializeObject(new AlertMessage(type, message, raw)); }
public static void ShowMessage(TempDataDictionary tempData, string title, string msg, AlertMessageType messageType = AlertMessageType.Info) { tempData["WEB_ALERT_MESSASGE"] = msg; tempData["ALERT_MESSAGE_TYPE"] = messageType.ToString().ToLower(); tempData["WEB_ALERT_TITLE"] = title; }
public PopupAlertMessage(CompositeSpriteText title, CompositeSpriteText message, AlertMessageType alertMessageType = AlertMessageType.AcceptCancel) : base(true) { Background = new Sprite("Interface/Popup/Blue/Alert/Background", layerDepth: DepthParameter.InterfacePopupMessageBackground); compositeSpriteTextList.Add(title); compositeSpriteTextList.Add(message); title.PositionOffset = Background.Position - new Vector2(186, 50); message.PositionOffset = Background.Position - new Vector2(186, 50 - title.ElementDimensions.Y - 5); buttonList.Add(new Button(ButtonType.Cancel, DepthParameter.InterfacePopupMessageButtons, CloseAction, PositionOffset + new Vector2(160, 65))); if (alertMessageType != AlertMessageType.Cancel) { buttonList.Add(new Button(ButtonType.Accept, DepthParameter.InterfacePopupMessageButtons, (sender) => { OnConfirm?.Invoke(sender); }, PositionOffset + new Vector2(125, 65))); } ShouldRender = true; UpdateAttatchmentPosition(); }
public AlertMessage(string message, AlertMessageType messageType) { Message = message; MessageType = messageType; }