Ejemplo n.º 1
0
 private void bBasePalette_Click(object sender, EventArgs e)
 {
     if (_choice != PaletteChoice.BASE)
     {
         _choice = PaletteChoice.BASE;
         ImportImageData();
     }
 }
Ejemplo n.º 2
0
 private void bResetPalette_Click(object sender, EventArgs e)
 {
     if (_choice != PaletteChoice.EXISTING)
     {
         _choice = PaletteChoice.EXISTING;
         ImportImageData();
     }
 }
Ejemplo n.º 3
0
 public void Reset()
 {
     _bitmap           = null;
     ResourceElement   = new ResourceElement();
     pbPreview.Preview = null;
     pbPalette.Palette = default;
     cb8Bit.Checked    = false;
     _choice           = PaletteChoice.EXISTING;
 }
Ejemplo n.º 4
0
        private void bImportPalette_Click(object sender, EventArgs e)
        {
            if (ofdImportPalette.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    PaletteFile paletteFile = new PaletteFile();
                    paletteFile.ReadFromFile(ofdImportPalette.FileName);
                    UserPalette = paletteFile.Palette;
                }
                catch
                {
                    MessageBox.Show("Unable to load new palette.");
                }

                _choice = PaletteChoice.USER;
                ImportImageData();
            }
        }