Exemplo n.º 1
0
        /// <summary>
        /// 文字列からアクセントを取得します。coded by nqdior.
        /// </summary>
        public static Accent GetAccentFromString(string name)
        {
            var specifiedColor = new SpecifiedColor();

            if (Enum.TryParse(name, out specifiedColor))
            {
                return(new Accent(specifiedColor));
            }
            else
            {
                throw new IndexOutOfRangeException();
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var colorManager = new ColorManager();

            colorManager["red"]   = new Color(255, 0, 0);
            colorManager["light"] = new SpecifiedColor(1000);

            var color1 = colorManager["red"].Clone() as Color;
            var color2 = colorManager["light"].Clone() as SpecifiedColor;

            color1.Show();
            color2.Show();
        }
Exemplo n.º 3
0
 private Accent(SpecifiedColor specified)
 {
     this.Specified = specified;
     this.Color     = null;
 }
Exemplo n.º 4
0
 private Theme(SpecifiedColor color) : this()
 {
     this.Specified = color;
 }