Ejemplo n.º 1
0
        private void importAllBtn_Click(object sender, EventArgs e)
        {
            GraphicsSet gs = createGraphicsSet();

            if (gs == null)
            {
                return;
            }

            gs.import();
            try
            {
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private GraphicsSet createGraphicsSet()
        {
            GraphicsSet gs  = new GraphicsSet();
            bool        err = false;

            foreach (object o in imageListBox.Items)
            {
                if (o is PixelPalettedImage)
                {
                    gs.imgs.Add(o as PixelPalettedImage);
                }
                else
                {
                    err = true;
                }
            }

            foreach (object o in paletteListBox.Items)
            {
                if (o is Palette)
                {
                    gs.pals.Add(o as Palette);
                }
            }

            gs.win = this;

            if (err)
            {
                if (MessageBox.Show(LanguageManager.Get("ImageManager", "incompatible"), LanguageManager.Get("ImageManager", "incompatibleTitle"), MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
                {
                    return(null);
                }
            }

            return(gs);
        }