Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            pictureBox1.Image = null;
            TIMFile timFile = new TIMFile(textBox2.Text);

            pictureBox1.Image = timFile.GetBitmap();
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            TIMEncodingSettings settings = new TIMEncodingSettings();
            TIMFile             timFile  = new TIMFile(textBox2.Text);

            timFile.SetBitmap(new Bitmap(textBox1.Text), settings);
        }
Exemplo n.º 3
0
 public void Update(TIMFile timFile)
 {
     _timFile = timFile;
     pictureBox_Image.Image = timFile.GetBitmap();
     textBox_BPP.Text       = timFile.TIMHeader.BPP.ToString();
     textBox_Width.Text     = timFile.TIMHeader.ImageWidthPixels + " Pixels";
     textBox_Height.Text    = timFile.TIMHeader.ImageHeight + " Pixels";
 }
Exemplo n.º 4
0
        public void Update(BaseFile baseFile)
        {
            if (baseFile == null)
            {
                if (EnabledLZB)
                {
                    lzbControl.Visible = false;
                }
                if (EnabledTIM)
                {
                    timControl.Visible = false;
                }
                if (EnabledPB)
                {
                    pbControl.Visible = false;
                }
                if (EnabledBG)
                {
                    bgControl.Visible = false;
                }
                textControl.Visible = false;
                return;
            }
            if (baseFile.GetType() == typeof(TIMFile) && EnabledTIM)
            {
                TIMFile timFile = (TIMFile)baseFile;
                timControl.Update(timFile);
                timControl.Visible = true;
                if (EnabledLZB)
                {
                    lzbControl.Visible = false;
                }
                if (EnabledPB)
                {
                    pbControl.Visible = false;
                }
                if (EnabledBG)
                {
                    bgControl.Visible = false;
                }
                textControl.Visible = false;
                return;
            }
            if (baseFile.GetType() == typeof(LZBFile) && EnabledLZB)
            {
                LZBFile lzbFile = (LZBFile)baseFile;
                lzbControl.Update(lzbFile);
                lzbControl.Visible = true;
                if (EnabledTIM)
                {
                    timControl.Visible = false;
                }
                if (EnabledPB)
                {
                    pbControl.Visible = false;
                }
                if (EnabledBG)
                {
                    bgControl.Visible = false;
                }
                textControl.Visible = false;
                return;
            }
            if (baseFile.GetType() == typeof(PBFile) && EnabledPB)
            {
                PBFile pbFile = (PBFile)baseFile;
                pbControl.Update(pbFile);
                pbControl.Visible = true;
                if (EnabledTIM)
                {
                    timControl.Visible = false;
                }
                if (EnabledLZB)
                {
                    lzbControl.Visible = false;
                }
                if (EnabledBG)
                {
                    bgControl.Visible = false;
                }
                textControl.Visible = false;
                return;
            }
            if (baseFile.GetType() == typeof(BGFile) && EnabledBG)
            {
                BGFile bgFile = (BGFile)baseFile;
                bgControl.Update(bgFile);
                bgControl.Visible = true;
                if (EnabledTIM)
                {
                    timControl.Visible = false;
                }
                if (EnabledLZB)
                {
                    lzbControl.Visible = false;
                }
                if (EnabledPB)
                {
                    pbControl.Visible = false;
                }
                textControl.Visible = false;
                return;
            }

            textControl.Update(baseFile);
            textControl.Visible = true;
            if (EnabledLZB)
            {
                lzbControl.Visible = false;
            }
            if (EnabledTIM)
            {
                timControl.Visible = false;
            }
            if (EnabledPB)
            {
                pbControl.Visible = false;
            }
            if (EnabledBG)
            {
                bgControl.Visible = false;
            }
        }