/// <summary> /// بازیابی لیست آرشیوها /// </summary> /// <returns></returns> public bool LoadDataFromArchive() { JArchiveDocument archive = new JArchiveDocument(SubjectCode, PlaceCode); try { if (ClassName == null) { ClassName = ""; } archive.GetData(_ArchiveCode); JFile image = archive.RetrieveContent(archive.ArchiveCode); if (image == null) { return(false); } ClassName = archive.ClassName; ObjectCode = archive.ObjectCode; this.Image = System.Drawing.Image.FromStream(image.Stream); object tObject = this.Image; JSystem.AddObject(ref tObject); return(true); } catch (Exception ex) { JSystem.Except.AddException(ex); return(false); } finally { archive.Dispose(); } }
public JArchiveList() { try { InitializeComponent(); object t1Object = pictureBox1.Image; JSystem.AddObject(ref t1Object); object t2Object = pictureBox2.Image; JSystem.AddObject(ref t2Object); } catch { } finally { } }
private void ThumbLineClick(object sender, EventArgs e) { Image image = (Image)((PictureBox)(sender)).Tag; object tObject = image; JSystem.AddObject(ref tObject); Image.GetThumbnailImageAbort ImageAbort = new Image.GetThumbnailImageAbort(ThumbnailCallback); CurrentDataRow = (DataRow)image.Tag; pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox1.Height = image.Height; pictureBox1.Width = image.Width; pictureBox1.Image = image;//.GetThumbnailImage(panelBigImage.Width, image.Height * panelBigImage.Width / image.Width, ImageAbort, IntPtr.Zero); }
private void SetPreviewImage(JFile pContent) { try { Image image = System.Drawing.Image.FromStream(pContent.Stream); object tObject = image; JSystem.AddObject(ref tObject); pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox2.Height = image.Height; pictureBox2.Width = image.Width; pictureBox2.Image = image; } catch { pictureBox1.Image = null; } }
private void CreateThumbLine(JFile pContent, DataRow DR) { try { Panel P = new Panel(); P.BorderStyle = BorderStyle.FixedSingle; ThumbLinepanel.Controls.Add(P); P.Parent = ThumbLinepanel; P.Width = ThumbLinepanel.Width - 50; P.Height = (int)(P.Width * 1.5); P.Left = 25; P.Top = _OldTop + 25; _OldTop = P.Top + P.Height; PictureBox PB = new PictureBox(); P.Controls.Add(PB); PB.Parent = P; PB.Dock = DockStyle.Fill; Image image; if (pContent.Stream != null) { image = System.Drawing.Image.FromStream(pContent.Stream); object t1Object = image; JSystem.AddObject(ref t1Object); image.Tag = DR; PB.Tag = image; Image.GetThumbnailImageAbort ImageAbort = new Image.GetThumbnailImageAbort(ThumbnailCallback); PB.Image = image.GetThumbnailImage(P.Width, P.Height, ImageAbort, IntPtr.Zero); object t2Object = PB.Image; JSystem.AddObject(ref t2Object); PB.Click += new EventHandler(ThumbLineClick); Array.Resize(ref ImagePanelList, ImagePanelList.Length + 1); ImagePanelList[ImagePanelList.Length - 1] = P; } } catch { } }