source: trunk/CrypPlugins/Substring/SubstringSettings.cs @ 2214

Last change on this file since 2214 was 802, checked in by nolte, 12 years ago

Comments added (Description for BigNumber coming next)

File size: 3.1 KB
Line 
1/*                             
2   Copyright 2009 Team CrypTool (Sven Rech,Dennis Nolte,Raoul Falk,Nils Kopal), Uni Duisburg-Essen
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15*/
16
17using System;
18using System.Collections.Generic;
19using System.Linq;
20using System.Text;
21using Cryptool.PluginBase;
22using System.ComponentModel;
23
24namespace Cryptool.Plugins.Substring
25{
26    class SubstringSettings : ISettings
27    {
28        bool hasChanges = false;
29
30        #region taskPane
31
32        private int integerLengthValue;
33        /// <summary>
34        /// Taskpane-input for the length value
35        /// </summary>
36        [TaskPane("Length value", "Integer value for the length.", null, 0, false, DisplayLevel.Beginner, ControlType.NumericUpDown, ValidationType.RangeInteger, 0, int.MaxValue)]
37        public int IntegerLengthValue
38        {
39            get { return this.integerLengthValue; }
40            set
41            {
42                if (value != this.integerLengthValue)
43                {
44                    this.integerLengthValue = value;
45                    OnPropertyChanged("IntegerLengthValue");
46                    HasChanges = true;
47                }
48            }
49        }
50
51        private int integerStartValue;
52        /// <summary>
53        /// Taskpane-input for the startposition
54        /// </summary>
55        [TaskPane("Start value", "Integer value to start from.", null, 0, false, DisplayLevel.Beginner, ControlType.NumericUpDown, ValidationType.RangeInteger, 0, int.MaxValue)]
56        public int IntegerStartValue
57        {
58            get { return this.integerStartValue; }
59            set
60            {
61                if (value != this.integerStartValue)
62                {
63                    this.integerStartValue = value;
64                    OnPropertyChanged("IntegerStartValue");
65                    HasChanges = true;
66                }
67            }
68        }
69
70
71        #endregion taskPane
72
73
74
75        #region ISettings Members
76
77        public bool HasChanges
78        {
79            get
80            {
81                return hasChanges;
82            }
83            set
84            {
85                hasChanges = value;
86            }
87        }
88
89        #endregion
90
91        #region INotifyPropertyChanged Members
92
93        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
94
95        private void OnPropertyChanged(string p)
96        {
97            if (PropertyChanged != null)
98            {
99                PropertyChanged(this, new PropertyChangedEventArgs(p));
100            }
101        }
102
103        #endregion
104    }
105}
Note: See TracBrowser for help on using the repository browser.