ASU.UI.MainForm.SetColoursBasedOnBackground(System.Drawing.Color)

Here are the examples of the csharp api class ASU.UI.MainForm.SetColoursBasedOnBackground(System.Drawing.Color) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: Alferd-Spritesheet-Unpacker
Source File: MainForm.cs
private void CheckForUnpackFinishTimer_Tick(object sender, System.EventArgs e)
        {
            BO.ImageUnpacker unpacker;

            try
            {
                if (this.unpackers.Count == 1)
                {
                    unpacker = this.unpackers[0];
                }
                else
                {
                    int counter = 0;
                    do
                    {
                        unpacker = this.unpackers[this.Random.Next(0, this.unpackers.Count)];
                        counter += 1;
                    } while ((unpacker.IsUnpacked() | !unpacker.IsUnpacking()) & counter < 100);
                }

                if (unpacker.IsBackgroundColourSet())
                {
                    this.SetColoursBasedOnBackground(unpacker.GetBackgroundColour());
                    this.MainPanel.BackColor = unpacker.GetBackgroundColour();
                }

                if (this.AreAllUnpacked())
                {
                    this.ResetFormPostUnpack(unpacker);
                }
            }
            catch (Exception ex)
            {
                CheckForUnpackFinishTimer.Stop();
                MessageBox.Show(ex.Message + ". CheckForUnpackFinishTimer has been stopped, you may need to restart application", "Error during timer");
            }
        }