Beispiel #1
0
 public Dictionary <string, object> _toMap()
 {
     return(new Dictionary <string, object> {
         { "systemNavigationBarColor", systemNavigationBarColor?.value },
         { "systemNavigationBarDividerColor", systemNavigationBarDividerColor?.value },
         { "statusBarColor", statusBarColor?.value },
         { "statusBarBrightness", statusBarBrightness?.ToString() },
         { "statusBarIconBrightness", statusBarIconBrightness?.ToString() },
         { "systemNavigationBarIconBrightness", systemNavigationBarIconBrightness?.ToString() }
     });
 }
Beispiel #2
0
        public void CreateConfigurationFile(string path)
        {
            XmlTextWriter xWriter = new XmlTextWriter(@path + @"\HueSettings.xml", Encoding.UTF8)
            {
                Formatting = Formatting.Indented
            };

            AverageColor = true;
            ColorPalette = false;
            Brightness   = 10;
            IsEnabled    = true;
            xWriter.WriteStartElement("HueSettings");
            xWriter.WriteStartElement("appConfig");
            xWriter.WriteElementString("APIKey", "");
            xWriter.WriteStartElement("HueLights");
            xWriter.WriteElementString("HueLights", "");
            xWriter.WriteEndElement();
            xWriter.WriteElementString("AverageColor", AverageColor.ToString());
            xWriter.WriteElementString("ColorPalette", ColorPalette.ToString());
            xWriter.WriteElementString("Brightness", Brightness.ToString());
            xWriter.WriteElementString("Enabled", IsEnabled.ToString());
            xWriter.WriteEndElement();
            xWriter.Close();
        }
 /// <summary>
 /// Change brightness on track bar
 /// </summary>
 private void trackBarBrightness_Scroll(object sender, EventArgs e)
 {
     Brightness         = trackBarBrightness.Value;
     txtBrightness.Text = Brightness.ToString();
 }
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("HDR/EyeAdaptSpeed", true, out subEle);
            subEle.Value = HDREyeAdaptSpeed.ToString("G15");

            ele.TryPathTo("HDR/Blur/Radius", true, out subEle);
            subEle.Value = HDRBlurRadius.ToString("G15");

            ele.TryPathTo("HDR/Blur/Passes", true, out subEle);
            subEle.Value = HDRBlurPasses.ToString("G15");

            ele.TryPathTo("HDR/EmissiveMult", true, out subEle);
            subEle.Value = HDREmissiveMult.ToString("G15");

            ele.TryPathTo("HDR/LUM/Target", true, out subEle);
            subEle.Value = HDRLUMTarget.ToString("G15");

            ele.TryPathTo("HDR/LUM/UpperClamp", true, out subEle);
            subEle.Value = HDRLUMUpperClamp.ToString("G15");

            ele.TryPathTo("HDR/Bright/Scale", true, out subEle);
            subEle.Value = HDRBrightScale.ToString("G15");

            ele.TryPathTo("HDR/Bright/Clamp", true, out subEle);
            subEle.Value = HDRBrightClamp.ToString("G15");

            ele.TryPathTo("HDR/LUM/RampNoTex", true, out subEle);
            subEle.Value = HDRLUMRampNoTex.ToString("G15");

            ele.TryPathTo("HDR/LUM/RampMin", true, out subEle);
            subEle.Value = HDRLUMRampMin.ToString("G15");

            ele.TryPathTo("HDR/LUM/RampMax", true, out subEle);
            subEle.Value = HDRLUMRampMax.ToString("G15");

            ele.TryPathTo("HDR/SunlightDimmer", true, out subEle);
            subEle.Value = HDRSunlightDimmer.ToString("G15");

            ele.TryPathTo("HDR/GrassDimmer", true, out subEle);
            subEle.Value = HDRGrassDimmer.ToString("G15");

            ele.TryPathTo("HDR/TreeDimmer", true, out subEle);
            subEle.Value = HDRTreeDimmer.ToString("G15");

            ele.TryPathTo("HDR/SkinDimmer", true, out subEle);
            subEle.Value = HDRSkinDimmer.ToString("G15");

            ele.TryPathTo("Bloom/BlurRadius", true, out subEle);
            subEle.Value = BloomBlurRadius.ToString("G15");

            ele.TryPathTo("Bloom/AlphaMult/Interior", true, out subEle);
            subEle.Value = BloomAlphaMultInterior.ToString("G15");

            ele.TryPathTo("Bloom/AlphaMult/Exterior", true, out subEle);
            subEle.Value = BloomAlphaMultExterior.ToString("G15");

            ele.TryPathTo("GetHit/Blur/Radius", true, out subEle);
            subEle.Value = GetHitBlurRadius.ToString("G15");

            ele.TryPathTo("GetHit/Blur/DampingConstant", true, out subEle);
            subEle.Value = GetHitBlurDampingConstant.ToString("G15");

            ele.TryPathTo("NightEyeTintColor/Red", true, out subEle);
            subEle.Value = NightEyeTintColorRed.ToString("G15");

            ele.TryPathTo("NightEyeTintColor/Green", true, out subEle);
            subEle.Value = NightEyeTintColorGreen.ToString("G15");

            ele.TryPathTo("NightEyeTintColor/Blue", true, out subEle);
            subEle.Value = NightEyeTintColorBlue.ToString("G15");

            ele.TryPathTo("Brightness", true, out subEle);
            subEle.Value = Brightness.ToString("G15");

            ele.TryPathTo("Cinematic/Saturation", true, out subEle);
            subEle.Value = CinematicSaturation.ToString("G15");

            ele.TryPathTo("Cinematic/Contrast/AvgLUMValue", true, out subEle);
            subEle.Value = CinematicContrastAvgLUMValue.ToString("G15");

            ele.TryPathTo("Cinematic/Contrast/Value", true, out subEle);
            subEle.Value = CinematicContrastValue.ToString("G15");

            ele.TryPathTo("Cinematic/BrightnessTint/Color/Red", true, out subEle);
            subEle.Value = CinematicBrightnessTintColorRed.ToString("G15");

            ele.TryPathTo("Cinematic/BrightnessTint/Color/Green", true, out subEle);
            subEle.Value = CinematicBrightnessTintColorGreen.ToString("G15");

            ele.TryPathTo("Cinematic/BrightnessTint/Color/Blue", true, out subEle);
            subEle.Value = CinematicBrightnessTintColorBlue.ToString("G15");

            ele.TryPathTo("Cinematic/BrightnessTint/Value", true, out subEle);
            subEle.Value = CinematicBrightnessTintValue.ToString("G15");

            ele.TryPathTo("Unused1", true, out subEle);
            subEle.Value = Unused1.ToHex();

            ele.TryPathTo("Flags", true, out subEle);
            subEle.Value = Flags.ToString();

            ele.TryPathTo("Unused2", true, out subEle);
            subEle.Value = Unused2.ToHex();
        }