Код: Выделить всё
if ((store as StiImage).Image != null)
(store as StiImage).Height = (store as StiImage).Width / ((double)((store as StiImage).ImageToDraw.Width) / (double)((store as StiImage).ImageToDraw.Height));
Может не то добавил?
Код: Выделить всё
if ((store as StiImage).Image != null)
(store as StiImage).Height = (store as StiImage).Width / ((double)((store as StiImage).ImageToDraw.Width) / (double)((store as StiImage).ImageToDraw.Height));
Код: Выделить всё
if (store != null)
{
StiImage img = store as StiImage;
img.Height = img.Width / ((double)(img.ImageToDraw.Width) / (double)(img.ImageToDraw.Height));
}
Код: Выделить всё
StiImage img = store as StiImage;
if (img.ImageToDraw != null)
img.Height = img.Width / ((double)(img.ImageToDraw.Width) / (double)(img.ImageToDraw.Height));