source: trunk/CrypPlugins/NumberGenerator/GeneratorSettings.cs @ 1785

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

shortened license text to boilerplate notice in all source files

File size: 2.0 KB
Line 
1/*
2   Copyright 2008 Thomas Schmid, University of Siegen
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 NumberGenerator
25{
26  public class GeneratorSettings : ISettings
27  {
28
29    #region taskPane
30
31    private int integerStartValue;
32    [TaskPane("Start value", "Integer value to start from.", null, 0, true, DisplayLevel.Beginner, ControlType.NumericUpDown, ValidationType.RangeInteger, 0, int.MaxValue)]
33    public int IntegerStartValue
34    {
35      get { return this.integerStartValue; }
36      set
37      {
38        if (value != this.integerStartValue)
39        {
40          this.integerStartValue = value;
41          OnPropertyChanged("IntegerStartValue");
42          HasChanges = true;
43        }
44      }
45    }
46
47    #endregion taskPane
48
49    #region ISettings Members
50
51    private bool hasChanges;
52    public bool HasChanges
53    {
54      get { return hasChanges; }
55      set 
56      {
57        if (value != hasChanges)
58        {
59          hasChanges = value;
60          OnPropertyChanged("HasChanges");
61        }
62      }
63    }
64
65    #endregion
66
67    #region INotifyPropertyChanged Members
68
69    public event PropertyChangedEventHandler PropertyChanged;   
70    public void OnPropertyChanged(string name)
71    {
72      if (PropertyChanged != null)
73      {
74        PropertyChanged(this, new PropertyChangedEventArgs(name));
75      }
76    }
77
78    #endregion
79  }
80}
Note: See TracBrowser for help on using the repository browser.