static public void ShowImagePreview(string imgFile, int delayTime, IWin32Window owner) { if (_imagePreview == null) { _imagePreview = new ImagePreview(); } _imagePreview.ShowImage(imgFile, delayTime, owner); }
public override bool ExecuteAction(string callModuleName, ISysDesign callModule, object sender, string actName, string tag, IBizDataItems bizDatas, object eventArgs = null) { switch (actName) { case ImgActionDefine.OpenImageProcess: //打开单张图像 if (bizDatas == null) { return(false); } _applyId = DataHelper.GetItemValueByApplyId(bizDatas[0]); _selectImgId = DataHelper.GetItemValueByImageId(bizDatas[0]); OpenImageProcess(); break; case ImgActionDefine.OpenImagePreview: //打开单图预览 if (bizDatas == null) { return(false); } string file = DataHelper.GetItemValueByFile(bizDatas[0]); if (File.Exists(file) == false) { return(false); } ImagePreview.ShowImagePreview(file, 3000, this); break; case ImgActionDefine.CloseImagePreview: ImagePreview.CloseImagePreview(); break; default: break; } return(true); }
private void frmImagePreview_FormClosed(object sender, FormClosedEventArgs e) { _imagePreview = null; }