source: trunk/CrypPlugins/FrequencyTest/CollectionElement.cs @ 738

Last change on this file since 738 was 738, checked in by Arno Wacker, 12 years ago
  • Fixed autozoom feature of frequency test; finally seems to work in all cases - this closes #97, after all it was not an editor bug, but a missing "Stretch" in the FrequencyTest-presentation.
  • Removed the zoom-slider from presentation. Zoom/Scale is now accessible only in the settings (usually not needed, since autozoom is default)
  • Re-introduced ProgressChanged (faked, it just become fully green when done)
  • Changed Background to LightYellow in Run-mode and LightGray when stopped. This way it does not interfere with the progress-green.
  • Updated samples using FrequencyTest to avoid loading warnings.
File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace Cryptool.FrequencyTest
7{
8    public class CollectionElement
9    {
10        private string caption;
11        private double normalizedValue;
12        private double absoluteValue;
13
14        public CollectionElement(double absoluteVal, double normalizedVal, string caption)
15        {
16            this.absoluteValue = absoluteVal;
17            this.caption = caption;
18            this.normalizedValue = normalizedVal;
19        }
20
21        /// <summary>
22        /// The caption to appear under the bar
23        /// </summary>
24        public string Caption
25        {
26            get { return caption; }
27            set
28            {
29                caption = value;
30            }
31        }
32
33        /// <summary>
34        /// The value to be written on top of the bar, usually the percentage value
35        /// </summary>
36        public double Percent
37        {
38            get { return normalizedValue; }
39            set
40            {
41                normalizedValue = value;
42            }
43        }
44
45        /// <summary>
46        /// The absolute value, used for the absolute heigth of the bar
47        /// </summary>
48        public double Amount
49        {
50            get { return absoluteValue; }
51            set
52            {
53                absoluteValue = value;
54            }
55        }
56    }
57}
Note: See TracBrowser for help on using the repository browser.