public static void ZeroIDWarning(clsMap.clsUnit IDUnit, uint NewID, clsResult Output) { string text = "An object's ID has been changed from 0 to " + modIO.InvariantToString_uint(NewID) + ". Zero is not a valid ID. The object is of type " + IDUnit.Type.GetDisplayTextCode() + " and is at map position " + IDUnit.GetPosText() + "."; Output.WarningAdd(text); }
public static void ErrorIDChange(uint IntendedID, clsMap.clsUnit IDUnit, string NameOfErrorSource) { if ((ShowIDErrorMessage && (IDUnit.ID != IntendedID)) && (Interaction.MsgBox("An object's ID has been changed unexpectedly. The error was in \"" + NameOfErrorSource + "\".\r\n\r\nThe object is of type " + IDUnit.Type.GetDisplayTextCode() + " and is at map position " + IDUnit.GetPosText() + ". It's ID was " + modIO.InvariantToString_uint(IntendedID) + ", but is now " + modIO.InvariantToString_uint(IDUnit.ID) + ".\r\n\r\nClick Cancel to stop seeing this message. Otherwise, click OK.", MsgBoxStyle.OkCancel, null) == MsgBoxResult.Cancel)) { ShowIDErrorMessage = false; } }