示例#1
0
 private void nextWaveCB_CheckedChanged(object sender, EventArgs e)
 {
     if (nextWaveCB.Checked)
     {
         imageFormNext = new ImageForm(nextWaveCB);
         imageFormNext.Show();
         int index = parser.wave + (drawHalfsCB.Checked ? 1 : 0);
         if (parser.inBrawl)
         {
             imageFormNext.updateImage(ImageDrawer.createImage(Resources.map_small, waves[index], waves[index + 1], drawHalfsCB.Checked));
         }
     }
     else
     {
         if (imageFormNext == null)
         {
             return;
         }
         imageFormNext.Close();
     }
 }
示例#2
0
        private void updateImage()
        {
            if (parser.inBrawl)
            {
                pictureBox1.Image.Dispose();
                int index = parser.wave - (parser.convoy ? 0 : 1);
                pictureBox1.Image = ImageDrawer.createImage(Resources.map_small, waves[index], waves[index + 1], drawHalfsCB.Checked);
            }
            else
            {
                pictureBox1.Image = Resources.map_small;
            }

            if (imageWindowCB.Checked && imageFormCurrent != null)
            {
                imageFormCurrent.updateImage(pictureBox1.Image);
            }
            if (nextWaveCB.Checked && imageFormNext != null)
            {
                int index = parser.wave + (drawHalfsCB.Checked ? 1 : 0);
                imageFormNext.updateImage(parser.inBrawl ? ImageDrawer.createImage(Resources.map_small, waves[index], waves[index + 1], drawHalfsCB.Checked) : pictureBox1.Image);
            }
        }