SIL.FieldWorks.Common.Framework.DetailControls.PictureSlice.InstallPicture C# (CSharp) Méthode

InstallPicture() private méthode

private InstallPicture ( PictureBox pb ) : void
pb System.Windows.Forms.PictureBox
Résultat void
		private void InstallPicture(PictureBox pb)
		{
			try
			{
				pb.Image = Image.FromFile(FileUtils.ActualFilePath(m_picture.PictureFileRA.AbsoluteInternalPath));
				m_aspectRatio = (float)pb.Image.Height / (float) pb.Image.Width;
				if (m_aspectRatio == 0.0)
					m_aspectRatio = 0.0001F; // avoid divide by zero.
			}
			catch
			{
				// If we can't get the image for some reason, just ignore?
			}
		}