コード例 #1
0
 private void bBasePalette_Click(object sender, EventArgs e)
 {
     if (_choice != PaletteChoice.BASE)
     {
         _choice = PaletteChoice.BASE;
         ImportImageData();
     }
 }
コード例 #2
0
 private void bResetPalette_Click(object sender, EventArgs e)
 {
     if (_choice != PaletteChoice.EXISTING)
     {
         _choice = PaletteChoice.EXISTING;
         ImportImageData();
     }
 }
コード例 #3
0
 public void Reset()
 {
     _bitmap           = null;
     ResourceElement   = new ResourceElement();
     pbPreview.Preview = null;
     pbPalette.Palette = default;
     cb8Bit.Checked    = false;
     _choice           = PaletteChoice.EXISTING;
 }
コード例 #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();
            }
        }