Download WestwoodPaletteLoader.zip, last updated 26/12/2017 (27.76 KB)

Download
  • md5: da29ba80301e3fa413c90a973afdaec9
  • sha1: 362ce84dba11d8047dc3c1dc3e44ee2f0edee602
  • sha256: 2e31cc54ea412623684856d331851c8b213bc6369629c620a2fc2d44aedae2bd
using System;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;

// Loading the color palette from a BBM/LBM image file using C
// http://cyotek.com/blog/loading-the-color-palette-from-a-bbm-lbm-image-file-using-csharp

namespace Cyotek.Demonstrations.Rgb18BitPalette
{
  internal partial class AboutDialog : Form
  {
    #region Constructors

    public AboutDialog()
    {
      this.InitializeComponent();
    }

    #endregion

    #region Methods

    protected override void OnFontChanged(EventArgs e)
    {
      base.OnFontChanged(e);

      nameLabel.Font = new Font(this.Font, FontStyle.Bold);
    }

    protected override void OnLoad(EventArgs e)
    {
      FileVersionInfo versionInfo;

      if (!this.DesignMode)
      {
        this.Font = SystemFonts.DialogFont;
      }

      versionInfo = FileVersionInfo.GetVersionInfo(typeof(MainForm).Assembly.Location);
      nameLabel.Text = versionInfo.ProductName;
      copyrightLabel.Text = versionInfo.LegalCopyright;

      base.OnLoad(e);
    }

    private void closeButton_Click(object sender, EventArgs e)
    {
      this.Close();
    }

    private void webLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
      try
      {
        Process.Start("http://www.cyotek.com");
      }
      catch (Exception ex)
      {
        MessageBox.Show(ex.GetBaseException().
                           Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
    }

    #endregion
  }
}

Donate

Donate