source: trunk/CrypPlugins/Variable/VariableSettings.cs @ 1597

Last change on this file since 1597 was 570, checked in by Matthäus Wander, 12 years ago

Variable:

  • review and minor changes
File size: 2.2 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.Variable
25{
26    class VariableSettings : ISettings
27    {
28        #region Variable Name
29        private String variableName = "";
30        [TaskPane("Variable Name", "The variable this component is linked with.", null, 1, false, DisplayLevel.Beginner, ControlType.TextBox)]
31        public String VariableName
32        {
33            get { return variableName; }
34            set
35            {
36                if (variableName != value)
37                {
38                    hasChanges = true;
39                    variableName = value;
40                    OnPropertyChanged("VariableName");
41                }
42            }
43        }
44        #endregion
45                       
46        #region ISettings Members
47
48        private bool hasChanges;
49        public bool HasChanges
50        {
51            get
52            {
53                return hasChanges;
54            }
55            set
56            {
57                hasChanges = value;
58            }
59        }
60
61        #endregion
62
63        #region INotifyPropertyChanged Members
64
65        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
66
67        private void OnPropertyChanged(string p)
68        {
69            if (PropertyChanged != null)
70                PropertyChanged(this, new PropertyChangedEventArgs(p));
71        }
72
73        #endregion
74    }
75}
Note: See TracBrowser for help on using the repository browser.