private static void CheckBadDirection(SimpleDirObject dirobject) { if (dirobject.Direction == SimpleDirObject.Directions.auto) { string message = String.Format("The {0} at x={1} y={2} has direction set to auto. Setting the direction of {0} objects to auto is a bad idea.", dirobject.GetType().Name, dirobject.X, dirobject.Y); MessageDialog md = new MessageDialog(null, DialogFlags.DestroyWithParent, MessageType.Warning, ButtonsType.Close, message); md.Run(); md.Destroy(); } }