Exemplo n.º 1
0
        private void imageView1_OnItemClick(object sender, TileItemEventArgs e)
        {
            try
            {
                if (e.Item == null)
                {
                    return;
                }

                TileImageInfo imageInfo = e.Item.Tag as TileImageInfo;

                if (imageInfo == null)
                {
                    return;
                }

                if (imageInfo.MediaType != "图像")
                {
                    MessageBox.Show("音视频不能进行处理。", "提示");
                    return;
                }

                imageEditor1.Image = ImageEx.LoadFile(imageInfo.File);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
Exemplo n.º 2
0
        private void BindStudyMedia()
        {
            if (_images == null)
            {
                _images = new List <TileImageInfo>();
            }
            imageView1.Clear();

            if (string.IsNullOrEmpty(_applyId))
            {
                return;
            }

            DataTable dtMedias = _studyMediaModel.GetApplyMedia(_applyId);

            if (dtMedias == null || dtMedias.Rows.Count <= 0)
            {
                return;
            }

            dtMedias.DefaultView.Sort = "序号 Desc";

            StudySerialData serialData = null;

            foreach (DataRowView dr in dtMedias.DefaultView)
            {
                StudyMediaData smd = new StudyMediaData();
                smd.BindRowData(dr.Row);

                if (serialData == null || serialData.序列ID.Equals(smd.序列ID) == false)
                {
                    serialData = _studyMediaModel.GetApplySerialInfoById(smd.序列ID);
                }

                TileImageInfo imgInfo = new TileImageInfo();
                imgInfo.MediaId       = smd.媒体ID;
                imgInfo.SerialId      = smd.序列ID;
                imgInfo.ApplyId       = smd.申请ID;
                imgInfo.StorageId     = serialData.存储ID;
                imgInfo.Order         = smd.序号.ToString();
                imgInfo.IsReportImage = smd.媒体信息.是否报告图;
                imgInfo.IsKeyImage    = smd.媒体信息.是否关键图;
                imgInfo.MediaName     = smd.媒体信息.媒体名称;
                imgInfo.MediaType     = smd.媒体信息.媒体类型;
                imgInfo.VPath         = Convert.ToDateTime(serialData.序列信息.申请日期).ToString("yyyyMMdd") + @"\" + serialData.申请ID + @"\images";
                imgInfo.File          = Dir.GetAppTempDir()
                                        + @"\" + Convert.ToDateTime(serialData.序列信息.申请日期).ToString("yyyyMMdd")
                                        + @"\" + serialData.申请ID
                                        + @"\images"
                                        + @"\" + smd.媒体信息.媒体名称;

                _images.Add(imgInfo);
            }

            imageView1.ViewCount = _imgViewCount;
            splitPage1.BindList <TileImageInfo>(_images, _imgViewCount);
        }
Exemplo n.º 3
0
        public void CopyFrom(TileImageInfo sourceImgInfo)
        {
            this.ApplyId       = sourceImgInfo.ApplyId;
            this.File          = sourceImgInfo.File;
            this.IsKeyImage    = sourceImgInfo.IsKeyImage;
            this.IsReportImage = sourceImgInfo.IsReportImage;
            this.MediaId       = sourceImgInfo.MediaId;
            this.MediaName     = sourceImgInfo.MediaName;
            this.MediaType     = sourceImgInfo.MediaType;
            this.SerialId      = sourceImgInfo.SerialId;
            this.StorageId     = sourceImgInfo.StorageId;
            this.VPath         = sourceImgInfo.VPath;

            this.Order = sourceImgInfo.Order;
        }