Ejemplo n.º 1
0
        public override string GetRegistrationScript()
        {
            string options = string.Empty;

            if (MinOpacity != 0.3M)
            {
                options += string.Format("minOpacity:{0}", MinOpacity.ToString(System.Globalization.CultureInfo.InvariantCulture));
            }
            if (MaxOpacity != 1.0M)
            {
                if (options != string.Empty)
                {
                    options += ",";
                }
                options += string.Format("maxOpacity:{0}", MaxOpacity.ToString(System.Globalization.CultureInfo.InvariantCulture));
            }
            if (Duration != 500)
            {
                if (options != string.Empty)
                {
                    options += ",";
                }
                options += string.Format("duration:{0}", Duration.ToString(System.Globalization.CultureInfo.InvariantCulture));
            }
            if (options != string.Empty)
            {
                options = ",{" + options + "}";
            }

            return(string.Format("new Ra.BUnveil('{0}'{1})", this.ClientID, options));
        }
Ejemplo n.º 2
0
        protected override void SetToIni()
        {
            var section = Ini["GHOST_CAR"];

            section.Set("COLOR", Color);
            section.Set("MAX_MINUTES_RECORDING", MaxMinutesRecording);
            section.Set("MIN_DISTANCE", MinDistance);
            section.Set("MAX_DISTANCE", MaxDistance);
            section.Set("MAX_OPACITY", MaxOpacity.ToDoublePercentage());
            section.Set("TIME_DIFF_ENABLED", TimeDifferenceEnabled);
            section.Set("PLAYER_NAME_ENABLED", PlayerNameEnabled);
        }