private static double GetAspectRatio(ScheduleDirect.ImageData i) { int width = 0; int height = 0; if (!string.IsNullOrWhiteSpace(i.width)) { int.TryParse(i.width, out width); } if (!string.IsNullOrWhiteSpace(i.height)) { int.TryParse(i.height, out height); } if (height == 0 || width == 0) { return(0); } double result = width; result /= height; return(result); }
private static int GetSizeOrder(ScheduleDirect.ImageData image) { if (int.TryParse(image.height, out int value)) { return(value); } return(0); }
private static int GetSizeOrder(ScheduleDirect.ImageData image) { if (!string.IsNullOrWhiteSpace(image.height) && int.TryParse(image.height, out int value)) { return(value); } return(0); }