/// <summary>
 /// Ändert das Aussehen wertebasierend
 /// </summary>
 public void ResolveAppearance(ref AppearanceData appData, ref AppearancePropFlags flags, object dataValue, IConditionContextProvider context)
 {
     if (Double.TryParse(Convert.ToString(dataValue), out double value))
     {
         if (value < 0)
         {
             NegativeValueAppearance.negativeAppearance.MergeData(ref appData, ref flags);
         }
     }
 }
        /// <summary>
        /// Ändert das Aussehen wertebasierend
        /// </summary>
        public void ResolveAppearance(ref AppearanceData appData, ref AppearancePropFlags flags, object dataValue, IConditionContextProvider context)
        {
            if (this.HighlightNegativeValues)
            {
                this.negativeValueAppearance.ResolveAppearance(ref appData, ref flags, dataValue, context);
            }

            if (this.ShowTrendIndicators)
            {
                this.iconValueAppearance.ResolveAppearance(ref appData, ref flags, dataValue, context);
            }
        }
Пример #3
0
        private void LinkUltraLabelPrompt_Load(object sender, EventArgs e)
        {
            this.ultraTextEditor1 = new UltraTextEditor();
            AppearanceData      appearance     = new AppearanceData();
            AppearancePropFlags requestedProps = AppearancePropFlags.BackColor | AppearancePropFlags.ForeColor | AppearancePropFlags.BackColorDisabled | AppearancePropFlags.ForeColorDisabled;

            this.ultraTextEditor1.ResolveAppearance(ref appearance, ref requestedProps);
            this.ultraLabel1.Appearance.ForeColor         = appearance.ForeColor;
            this.ultraLabel1.Appearance.ForeColorDisabled = appearance.ForeColorDisabled;
            if (this.Enabled)
            {
                this.panel1.BackColor = appearance.BackColor;
            }
            else
            {
                this.panel1.BackColor = appearance.BackColorDisabled;
            }
        }
Пример #4
0
        /// <summary>
        /// Ändert das Aussehen wertebasierend
        /// </summary>
        public void ResolveAppearance(ref AppearanceData appData, ref AppearancePropFlags flags, object dataValue, IConditionContextProvider context)
        {
            if (Double.TryParse(Convert.ToString(dataValue), out double value))
            {
                double threshold = 0.05;

                if (value < -threshold)
                {
                    IconValueAppearance.negativeAppearance.MergeData(ref appData, ref flags);
                }
                else if (value > threshold)
                {
                    IconValueAppearance.positiveAppearance.MergeData(ref appData, ref flags);
                }
                else
                {
                    IconValueAppearance.neutralAppearance.MergeData(ref appData, ref flags);
                }
            }
        }