Beispiel #1
0
        /// <summary>
        /// Loads default options for TileView screen.
        /// </summary>
        protected internal override void LoadControl0Options()
        {
            string desc = String.Empty;

            foreach (string specialType in Enum.GetNames(typeof(SpecialType)))
            {
                int i = (int)Enum.Parse(typeof(SpecialType), specialType);
                _brushesSpecial[specialType] = new SolidBrush(TileColors[i]);

                switch (i)
                {
                case  0: desc = "Color of (standard tile)";
                    break;

                case  1: desc = "Color of (entry point)";
                    break;

                case  2: desc = "Color of UFO Power Source - UFO" + Environment.NewLine
                                + "Color of Ion-beam Accelerators - TFTD";
                    break;

                case  3: desc = "Color of UFO Navigation - UFO" + Environment.NewLine
                                + "Color of (destroy objective) (alias of Magnetic Navigation) - TFTD";
                    break;

                case  4: desc = "Color of UFO Construction - UFO" + Environment.NewLine
                                + "Color of Magnetic Navigation (alias of Alien Sub Construction) - TFTD";
                    break;

                case  5: desc = "Color of Alien Food - UFO" + Environment.NewLine
                                + "Color of Alien Cryogenics - TFTD";
                    break;

                case  6: desc = "Color of Alien Reproduction - UFO" + Environment.NewLine
                                + "Color of Alien Cloning - TFTD";
                    break;

                case  7: desc = "Color of Alien Entertainment - UFO" + Environment.NewLine
                                + "Color of Alien Learning Arrays - TFTD";
                    break;

                case  8: desc = "Color of Alien Surgery - UFO" + Environment.NewLine
                                + "Color of Alien Implanter - TFTD";
                    break;

                case  9: desc = "Color of Examination Room - UFO" + Environment.NewLine
                                + "Color of (unknown) (alias of Examination Room) - TFTD";
                    break;

                case 10: desc = "Color of Alien Alloys - UFO" + Environment.NewLine
                                + "Color of Aqua Plastics - TFTD";
                    break;

                case 11: desc = "Color of Alien Habitat - UFO" + Environment.NewLine
                                + "Color of Examination Room (alias of Alien Re-animation Zone) - TFTD";
                    break;

                case 12: desc = "Color of (dead tile)";
                    break;

                case 13: desc = "Color of (exit point)";
                    break;

                case 14: desc = "Color of (must destroy tile)" + Environment.NewLine
                                + "Alien Brain - UFO" + Environment.NewLine
                                + "T'leth Power Cylinders - TFTD";
                    break;
                }

                // NOTE: The colors of these brushes get overwritten by the
                // Option settings somewhere/how between here and their actual
                // use in TilePanel.OnPaint(). That is, this only sets default
                // colors and might not even be very useful other than as
                // perhaps for placeholder-key(s) for the actual values that
                // are later retrieved from Options ....
                //
                // See OnSpecialPropertyColorChanged() below_
                Options.AddOption(
                    specialType,
                    ((SolidBrush)_brushesSpecial[specialType]).Color,
                    desc,                                                               // appears as a tip at the bottom of the Options screen.
                    "TileBackgroundColors",                                             // this identifies what Option category the setting appears under.
                    OnSpecialPropertyColorChanged);
            }
            TilePanel.SetSpecialPropertyBrushes(_brushesSpecial);

            VolutarSettingService.LoadOptions(Options);
        }