using DevExpress.XtraEditors;
using HL_FristAidPlatform_Public;
using System;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
namespace HL_FristAidPlatform_Frame
{
public partial class Form_Index : XtraForm
{
public Form_Index()
{
InitializeComponent();
}
///
/// 加载
///
///
///
private void Form_Index_Load(object sender, EventArgs e)
{
try
{
//判断医院LogoImageData是否为空
if (!string.IsNullOrEmpty(Information.Hospital.BgImageData))
{
MemoryStream ms = new MemoryStream(Convert.FromBase64String(Information.Hospital.BgImageData));
Image img = Image.FromStream(ms);
BackgroundImage = img;
}
//为空表示没有上传图片 则默认为系统项目中文件
else
{
BackgroundImage = Properties.Resources.indexbg;
}
BackgroundImageLayout = ImageLayout.Stretch;
}
catch (Exception ex)
{
PublicClass.WriteErrorLog(this.Text, "加载:\r\n" + ex);
}
}
}
}