protected void openPCX_Ref(string filePath, PictureBox pictureBox)
        {
            fileName = filePath;
            MyPCX thePCX = new MyPCX();

            if (!thePCX.from(filePath))
            {
                MessageBox.Show(filePath, "開啟失敗");
                return;
            }
            if (pictureBox.Image != null)
            {
                pictureBox.Image.Dispose();
                pictureBox.Image = null;
            }
            refView          = thePCX.getView();
            pictureBox.Image = refView;
            MessageBox.Show(filePath, "開啟成功");
        }
示例#2
0
 protected void openPCX(string filePath)
 {
     fileName = filePath;
     if (!thePCX.from(filePath))
     {
         MessageBox.Show(filePath, "開啟失敗");
         return;
     }
     //if (pictureBox1.Image != null)
     //{
     //    pictureBox1.Image.Dispose();
     //    pictureBox1.Image = null;
     //}
     imgView = thePCX.getView();
     mode = (int)imgMode.ORI;
     MessageBox.Show(filePath, "開啟成功");
     foreach (ToolStripMenuItem item in modeToolStripMenuItem.DropDownItems)// unlock image mode 
     {
         item.Enabled = true;
     }
 }
示例#3
0
 private void openPCX(string filePath)
 {
     fileName = filePath;
     if (!thePCX.from(filePath))
     {
         MessageBox.Show(filePath, "開啟失敗");
         return;
     }
     if (pictureBox1.Image != null)
     {
         pictureBox1.Image.Dispose();
         pictureBox1.Image = null;
     }
     textBox1.Lines = PCXinfo(thePCX);
     imgView        = thePCX.getView();
     palView        = thePCX.getPalette();
     mode           = (int)imgMode.ORI;
     MessageBox.Show(filePath, "開啟成功");
     foreach (ToolStripMenuItem item in modeToolStripMenuItem.DropDownItems)// unlock image mode
     {
         item.Enabled = true;
     }
 }