source: trunk/CrypPlugins/ExamplePluginCT2/ExamplePluginCT2Settings.cs @ 740

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

CrypWin:

  • changed string Beta 01 -> 02
  • TextBoxHidden now loads its value when loading a project file
  • see #98 for an open issue

BigInteger/BigNumber:

  • added sanity checks for == operator and Equals()
  • setting input properties to null in PreExecution (addresses #90)

Tokenizer:

  • added \t as word delimiter (fixes problem with Enigma-Challenge_II)

Enigma:

  • added null reference sanity check

WordPatterns:

  • improved PostBuild events

ExamplePluginCT2:

  • added example plugin which serves as plugin template
  • the template is located in Documentation/Template/
File size: 2.3 KB
Line 
1/*
2   Copyright 2009 Matthäus Wander, Universität 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.Plugin.ExamplePluginCT2
24{
25    public class ExamplePluginCT2Settings : ISettings
26    {
27        #region Private Variables
28
29        private bool hasChanges = false;
30        private int subtrahend = 0;
31
32        #endregion
33
34        #region TaskPane Settings
35
36        #region ISettings Members
37
38        [TaskPane("Subtrahend", "Amount to subtract from input number", null, 1, false, DisplayLevel.Beginner, ControlType.NumericUpDown, ValidationType.RangeInteger, 0, Int32.MaxValue)]
39        public int Subtrahend
40        {
41            get
42            {
43                return subtrahend;
44            }
45            set
46            {
47                if (subtrahend != value)
48                {
49                    subtrahend = value;
50                    hasChanges = true;
51                }
52            }
53        }
54
55        #endregion
56
57        /// <summary>
58        /// need to store the change status of the plugin
59        /// if a property was changed -> hasChangess = true
60        /// hence CrypTool will ask automatically if you want to save your changes
61        /// </summary>
62        public bool HasChanges
63        {
64            get
65            {
66                return hasChanges;
67            }
68            set
69            {
70                hasChanges = value;
71            }
72        }
73
74        #endregion
75
76        #region INotifyPropertyChanged Members
77
78        public event PropertyChangedEventHandler PropertyChanged;
79
80        #endregion
81    }
82}
Note: See TracBrowser for help on using the repository browser.