source: trunk/CrypPlugins/DiscreteLogarithm/DiscreteLogarithmSettings.cs @ 1785

Last change on this file since 1785 was 1785, checked in by Sven Rech, 11 years ago

added discrete logarithm plugin
very, very simple enumeration algorithm.

File size: 3.0 KB
Line 
1/*                             
2   Copyright 2010 Team CrypTool (Sven Rech), 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 System.ComponentModel;
22using Cryptool.PluginBase;
23using System.Collections.ObjectModel;
24
25namespace Cryptool.Plugins.DiscreteLogarithm
26{
27    /// <summary>
28    /// Settings class for the Discrete Logarithm plugin
29    /// </summary>
30    class DiscreteLogarithmSettings : ISettings
31    {
32        #region private members
33
34        private bool hasChanges = false;
35
36        #endregion
37
38        #region events
39
40        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
41
42        #endregion
43
44        #region public
45
46        /// <summary>
47        /// Constructs a new DiscreteLogarithmSettings
48        /// </summary>
49        public DiscreteLogarithmSettings()
50        {
51        }       
52
53        /*
54        /// <summary>
55        /// Getter/Setter for the action (encryption or decryption)
56        /// </summary>
57        [ContextMenu("Action", "Do you want the input data to be encrypted or decrypted?", 1, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, new int[] { 1, 2 }, "Encryption", "Decryption")]
58        [TaskPane("Action", "Do you want the input data to be encrypted or decrypted?", null, 1, false, DisplayLevel.Beginner, ControlType.ComboBox, new string[] { "Encryption", "Decryption" })]
59        public int Action
60        {
61            get { return this.action; }
62            set
63            {
64                action = value;
65                OnPropertyChanged("Action");
66            }
67        }
68         */
69
70        /// <summary>
71        /// Did anything change on the settigns?
72        /// </summary>
73        public bool HasChanges
74        {
75            get
76            {
77                return hasChanges;
78            }
79            set
80            {
81                hasChanges = value;
82            }
83        }
84
85        #endregion
86
87        #region private
88
89        /// <summary>
90        /// The property p has changes
91        /// </summary>
92        /// <param name="p">p</param>
93        private void OnPropertyChanged(string p)
94        {
95            if (PropertyChanged != null)
96            {
97                PropertyChanged(this, new PropertyChangedEventArgs(p));
98            }
99        }
100
101        #endregion
102
103    }//end DiscreteLogarithmSettings
104
105}//end Cryptool.Plugins.DiscreteLogarithm
Note: See TracBrowser for help on using the repository browser.