Click here to Skip to main content
15,896,063 members
Articles / Programming Languages / C#

Universal Framework for Science and Engineering - Part 4: Space elevator

Rate me:
Please Sign up or sign in to vote.
4.56/5 (6 votes)
14 Aug 20066 min read 36.6K   2.2K   37  
An article on framework applications to the space elevator.
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace OfficePickers.Util
{
    /// <summary>
    /// Provides custom colors members to use in the OfficeColorPicker.
    /// </summary>
    class CustomColors
    {      
        internal static Color ButtonHoverLight = Color.FromArgb(255, 240, 207);

        internal static Color ButtonHoverDark = Color.FromArgb(249, 179, 48);

        internal static Color SelectedAndHover = Color.FromArgb(254, 128, 62);
     
        internal static Color ButtonBorder = Color.FromArgb(172, 168, 153);

        internal static Color FocusDashedBorder = Color.FromArgb(83, 87, 102);

        internal static Color SelectedBorder = Color.FromArgb(0, 0, 128);

        internal static Color ColorPickerBackgroundDocked = Color.FromArgb(248, 248, 248);

        #region Color Picker Colors

        // ------------------ First Row -----------------------------
        internal static Color Black = Color.Black;
        internal static Color Brown = Color.FromArgb(153, 51, 0);
        internal static Color OliveGreen = Color.FromArgb(51, 51, 0);
        internal static Color DarkGreen = Color.FromArgb(0, 51, 0);

        internal static Color DarkTeal = Color.FromArgb(0, 51, 102);
        internal static Color DarkBlue = Color.FromArgb(0, 0, 128);
        internal static Color Indigo = Color.FromArgb(51, 51, 153);
        internal static Color Gray80 = Color.FromArgb(51, 51, 51);
        // ------------------ Second Row ----------------------------
        internal static Color DarkRed = Color.FromArgb(128, 0, 0);
        internal static Color Orange = Color.FromArgb(255, 102, 0);
        internal static Color DarkYellow = Color.FromArgb(128, 128, 0);
        internal static Color Green = Color.Green;

        internal static Color Teal = Color.Teal;
        internal static Color Blue = Color.Blue;
        internal static Color BlueGray = Color.FromArgb(102, 102, 153);
        internal static Color Gray50 = Color.FromArgb(128, 128, 128);
        // ------------------ Third Row -----------------------------       
        internal static Color Red = Color.Red;
        internal static Color LightOrange = Color.FromArgb(255, 153, 0);
        internal static Color Lime = Color.FromArgb(153, 204, 0);
        internal static Color SeaGreen = Color.FromArgb(51, 153, 102);

        internal static Color Aqua = Color.FromArgb(51, 204, 204);
        internal static Color LightBlue = Color.FromArgb(51, 102, 255);
        internal static Color Violet = Color.FromArgb(128, 0, 128);
        internal static Color Gray40 = Color.FromArgb(153, 153, 153);
        // ----------------- Forth Row ------------------------------
        internal static Color Pink = Color.FromArgb(255, 0, 255);
        internal static Color Gold = Color.FromArgb(255, 204, 0);
        internal static Color Yellow = Color.FromArgb(255, 255, 0);
        internal static Color BrightGreen = Color.FromArgb(0, 255, 0);

        internal static Color Turquoise = Color.FromArgb(0, 255, 255);
        internal static Color SkyBlue = Color.FromArgb(0, 204, 255);
        internal static Color Plum = Color.FromArgb(153, 51, 102);
        internal static Color Gray25 = Color.FromArgb(192, 192, 192);     
        // ----------------- Fifth Row ------------------------------
        internal static Color Rose = Color.FromArgb(255, 153, 204);
        internal static Color Tan = Color.FromArgb(255, 204, 153);
        internal static Color LightYellow = Color.FromArgb(255, 255, 153);
        internal static Color LightGreen = Color.FromArgb(204, 255, 204);

        internal static Color LightTurquoise = Color.FromArgb(204, 255, 255);
        internal static Color PaleBlue = Color.FromArgb(153, 204, 255);
        internal static Color Lavender = Color.FromArgb(204, 153, 255);
        internal static Color White = Color.White;


        internal static Color[] SelectableColors =
            {
                CustomColors.Black, CustomColors.Brown, CustomColors.OliveGreen, CustomColors.DarkGreen, 
                CustomColors.DarkTeal, CustomColors.DarkBlue, CustomColors.Indigo, CustomColors.Gray80, 

                CustomColors.DarkRed, CustomColors.Orange, CustomColors.DarkYellow, CustomColors.Green,
                CustomColors.Teal, CustomColors.Blue, CustomColors.BlueGray, CustomColors.Gray50,

                CustomColors.Red, CustomColors.LightOrange, CustomColors.Lime, CustomColors.SeaGreen, 
                CustomColors.Aqua, CustomColors.LightBlue, CustomColors.Violet, CustomColors.Gray40,

                CustomColors.Pink, CustomColors.Gold, CustomColors.Yellow, CustomColors.BrightGreen, 
                CustomColors.Turquoise, CustomColors.SkyBlue, CustomColors.Plum, CustomColors.Gray25,

                CustomColors.Rose, CustomColors.Tan, CustomColors.LightYellow, CustomColors.LightGreen, 
                CustomColors.LightTurquoise, CustomColors.PaleBlue, CustomColors.Lavender, CustomColors.White,
            };

        /// <summary>
        /// Provides a list of color names that matches the SelectableColors array.
        /// </summary>
        internal static string[] SelectableColorsNames =
            {
                "Black", "Brown" , "Olive Green" , "Dark Green", 
                "Dark Teal" , "Dark Blue" , "Indigo" , "Gray-80%", 

                "Dark Red", "Orange", "Dark Yellow", "Green",
                "Teal", "Blue", "Blue-Gray", "Gray-50%",

                "Red", "Light Orange", "Lime", "Sea Green", 
                "Aqua", "Light Blue", "Violet", "Gray-40%",

                "Pink", "Gold", "Yellow", "Bright Green", 
                "Turquoise", "Sky Blue", "Plum", "Gray-25%",

                "Rose", "Tan", "Light Yellow", "Light Green", 
                "Light Turquoise", "Pale Blue", "Lavender", "White",
                 
                "More Colors"

            };


        #endregion 
        
        /// <summary>
        /// Compare 2 colors by their RGB properties.
        /// </summary>
        /// <param name="color1"></param>
        /// <param name="color2"></param>
        /// <returns>True when R,G and B properties of both colors are equals</returns>
        internal static bool ColorEquals(Color color1, Color color2)
        {
            return 
                color1.R == color2.R && color1.G == color2.G && color1.B == color2.B;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect
Russian Federation Russian Federation
Ph. D. Petr Ivankov worked as scientific researcher at Russian Mission Control Centre since 1978 up to 2000. Now he is engaged by Aviation training simulators http://dinamika-avia.com/ . His additional interests are:

1) Noncommutative geometry

http://front.math.ucdavis.edu/author/P.Ivankov

2) Literary work (Russian only)

http://zhurnal.lib.ru/editors/3/3d_m/

3) Scientific articles
http://arxiv.org/find/all/1/au:+Ivankov_Petr/0/1/0/all/0/1

Comments and Discussions