示例#1
0
        private void panel_Paint(object sender, PaintEventArgs e)
        {
            myImage.getXView = panel.Width;  // -panel.Margin.Right;
            myImage.getYView = panel.Height; // -panel.Margin.Bottom;
            e.Graphics.Clear(Color.White);
            if (isZoomAll)
            {
                myImage.zoomExtent(e.Graphics);
            }
            else
            {
                myImage.zoomImage(e.Graphics, IIF(needZoomOut, 0, 1));
                needZoomOut = true;
            }
            this.statusStrip.Refresh();

            string imageType = "";

            if (myImage.MyImageType == 0)
            {
                imageType = "8Bits";
            }
            if (myImage.MyImageType == 1)
            {
                imageType = "24Bits";
            }
            gTransForm.onMainRefresh       += new GrayTransForm.mainRefresh(dataRefresh);
            palForm.onMainRefresh2         += new PaletteForm.mainRefreshPal(dataRefresh2);
            this.toolStripStatusLabel2.Text = myImage.MWidth.ToString() + "(w) x" + myImage.MHeight.ToString() + "(H) x" + " " + imageType;
        }