/// <summary> /// 图片按钮弹起事件 /// </summary> /// <param Name="sender"></param> /// <param Name="e"></param> private void picBtnUp_Click(object sender, System.EventArgs e) { SVBitmapManagerWindow window = new SVBitmapManagerWindow(); if (window.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { String file = Path.Combine(SVProData.IconPath, window.SvBitMap.ImageFileName); setButtonBackGd(picBtnUp, file); _button.Attrib.BtnUpPic = window.SvBitMap; } }
/// <summary> /// 选择为真时的图片 /// </summary> /// <param oldName="sender"></param> /// <param oldName="e"></param> void truePic_Click(object sender, EventArgs e) { SVBitmapManagerWindow window = new SVBitmapManagerWindow(); if (window.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { String file = Path.Combine(SVProData.IconPath, window.SvBitMap.ImageFileName); _binary.Attrib.CustomTrueText = window.SvBitMap.ImageFileName; setButtonBackGd(truePic, file); } }
/// <summary> /// 设置出错背景图片 /// </summary> /// <param Name="sender"></param> /// <param Name="e"></param> private void errBtn_Click(object sender, System.EventArgs e) { SVBitmapManagerWindow window = new SVBitmapManagerWindow(); if (window.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { String file = Path.Combine(SVProData.IconPath, window.SvBitMap.ImageFileName); _gif.Attrib.PicError = window.SvBitMap; if (!File.Exists(file)) { return; } SVPixmapFile pixmapFile = new SVPixmapFile(); pixmapFile.readPixmapFile(file); errBtn.BackgroundImageLayout = ImageLayout.Zoom; errBtn.BackgroundImage = pixmapFile.getBitmapFromData(); } }