source: trunk/CrypPlugins/ArrayIndexer/ArrayIndexerSettings.cs @ 2411

Last change on this file since 2411 was 2334, checked in by Matthäus Wander, 11 years ago

removed 1006 occurences of DisplayLevel in 218 files (see #122)

File size: 2.3 KB
Line 
1/*
2   Copyright 2009 Christian Arnold, 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*/
16using System;
17using System.Collections.Generic;
18using System.Linq;
19using System.Text;
20using Cryptool.PluginBase;
21using System.ComponentModel;
22
23namespace Cryptool.Plugins.ArrayIndexer
24{
25    class ArrayIndexerSettings : ISettings
26    {
27        bool hasChanges = false;
28
29        #region taskPane
30        private int arrayIndex;
31        [TaskPane("Index of the Array", "Indexes of an array begin always with 0. Example: If you have an array of the length 8, you can index the values 0 to 7", null, 0, false, ControlType.NumericUpDown, ValidationType.RangeInteger, 0, int.MaxValue)]
32        public int ArrayIndex
33        {
34            get
35            {
36                return this.arrayIndex;
37            }
38            set
39            {
40                if (value != this.arrayIndex)
41                {
42                    this.arrayIndex = value;
43                    OnPropertyChanged("ArrayIndex");
44                    HasChanges = true;
45                }
46            }
47        }
48
49        #endregion
50        #region ISettings Members
51
52        public bool HasChanges
53        {
54            get
55            {
56                return hasChanges;
57            }
58            set
59            {
60                hasChanges = value;
61            }
62        }
63
64        #endregion
65
66        #region INotifyPropertyChanged Members
67
68        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
69
70        private void OnPropertyChanged(string p)
71        {
72            if (PropertyChanged != null)
73            {
74                PropertyChanged(this, new PropertyChangedEventArgs(p));
75            }
76        }
77
78        #endregion
79    }
80}
Note: See TracBrowser for help on using the repository browser.