aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/FirmwareUpgradeFromFileViewVM.cs
blob: 9a73225653b27ff48187a6ad69fa51eba7831df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.PPC.Common.Publish;
using Tango.SharedUI;

namespace Tango.PPC.UI.Dialogs
{
    public class FirmwareUpgradeFromFileViewVM : DialogViewVM
    {
        public String Version { get; set; }
    }
}
t .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
namespace Tango.SharedUI.Effects
{
    using System;
    using System.ComponentModel;
    using System.Text;
    using System.Windows;
    using System.Windows.Media;
    using System.Windows.Media.Effects;

    public class DisplaySettingEffect : ShaderEffect
    {
        public static readonly DependencyProperty BrightnessLevelProperty = DependencyProperty.Register("BrightnessLevel", typeof(double), typeof(DisplaySettingEffect), new UIPropertyMetadata(1.0, ShaderEffect.PixelShaderConstantCallback(1)));
        public static readonly DependencyProperty ContrastLevelProperty = DependencyProperty.Register("ContrastLevel", typeof(double), typeof(DisplaySettingEffect), new UIPropertyMetadata(1.0, ShaderEffect.PixelShaderConstantCallback(0)));
        public static readonly DependencyProperty Input1Property = ShaderEffect.RegisterPixelShaderSamplerProperty("Input1", typeof(DisplaySettingEffect), 0);
        public static readonly DependencyProperty SaturationLevelProperty = DependencyProperty.Register("SaturationLevel", typeof(double), typeof(DisplaySettingEffect), new UIPropertyMetadata(1.0, ShaderEffect.PixelShaderConstantCallback(2)));

        /// <summary>
        /// Initializes a new instance of the <see cref="DisplaySettingEffect"/> class.
        /// </summary>
        public DisplaySettingEffect()
            : base()
        {
            PixelShader pixelShader = new PixelShader();
            pixelShader.UriSource = new Uri("pack://application:,,,/Tango.SharedUI;component/Effects/DisplaySettingEffect.ps", UriKind.RelativeOrAbsolute);
            this.PixelShader = pixelShader;

            this.UpdateShaderValue(Input1Property);
            this.UpdateShaderValue(ContrastLevelProperty);
            this.UpdateShaderValue(Input1Property);
            this.UpdateShaderValue(BrightnessLevelProperty);
            this.UpdateShaderValue(Input1Property);
            this.UpdateShaderValue(SaturationLevelProperty);
        }

        /// <summary>
        /// Gets or sets the brightness level.
        /// </summary>
        public double BrightnessLevel
        {
            get
            {
                return (double)base.GetValue(BrightnessLevelProperty);
            }
            set
            {
                base.SetValue(BrightnessLevelProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the contrast level.
        /// </summary>
        public double ContrastLevel
        {
            get
            {
                return (double)base.GetValue(ContrastLevelProperty);
            }
            set
            {
                base.SetValue(ContrastLevelProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the saturation level.
        /// </summary>
        public double SaturationLevel
        {
            get
            {
                return (double)base.GetValue(SaturationLevelProperty);
            }
            set
            {
                base.SetValue(SaturationLevelProperty, value);
            }
        }

        /// <summary>
        /// Gets or sets the input.
        /// </summary>
        [Browsable(false)]
        public Brush Input1
        {
            get
            {
                return (Brush)base.GetValue(Input1Property);
            }
            set
            {
                base.SetValue(Input1Property, value);
            }
        }
    }
}