Example #1
0
        private void PopupViewerTif(Int32 pIndex)
        {
            string fileName    = docList[pIndex];
            bool   isDocExists = false;

            foreach (frmViewerTif viewTif in viewerTifList)
            {
                if (viewTif.FileName == fileName)
                {
                    if (!viewTif.Visible)
                    {
                        viewTif.Show();
                    }
                    else
                    {
                        viewTif.Focus();
                    }
                    viewTif.Show();
                    isDocExists = true;
                    break;
                }
            }

            if (!isDocExists)
            {
                frmViewerTif tifViewerForm = new frmViewerTif();
                tifViewerForm.FileName = fileName;
                tifViewerForm.Text     = docTipList[pIndex];

                Image img = Image.FromFile(fileName);
                tifViewerForm.pictureEdit.Image = img;

                viewerTifList.Add(tifViewerForm);

                tifViewerForm.Show();
            }
        }
Example #2
0
        private void PopupViewerTif(Int32 pIndex)
        {
            string fileName = docList[pIndex];
            bool isDocExists = false;

            foreach (frmViewerTif viewTif in viewerTifList)
            {
                if (viewTif.FileName == fileName)
                {
                    if (!viewTif.Visible)
                    {
                        viewTif.Show();
                    }
                    else
                    {
                        viewTif.Focus();
                    }
                    viewTif.Show();
                    isDocExists = true;
                    break;
                }
            }

            if (!isDocExists)
            {
                frmViewerTif tifViewerForm = new frmViewerTif();
                tifViewerForm.FileName = fileName;
                tifViewerForm.Text = docTipList[pIndex];

                Image img = Image.FromFile(fileName);
                tifViewerForm.pictureEdit.Image = img;

                viewerTifList.Add(tifViewerForm);

                tifViewerForm.Show();
            }
        }