source: trunk/CrypPlugins/T-310/T310Settings.cs @ 2247

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

Began port of T-310/50 cipher machine

File size: 2.3 KB
Line 
1/*
2   Copyright 1995 - 2010 Jörg Drobick
3   Copyright 2010 Matthäus Wander, University of Duisburg-Essen
4
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9       http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16*/
17using System;
18using System.Collections.Generic;
19using System.Linq;
20using System.Text;
21using Cryptool.PluginBase;
22using System.ComponentModel;
23
24namespace Cryptool.Plugins.T310
25{
26    public enum ModeEnum
27    {
28        Encrypt,
29        Decrypt
30    }
31
32    public class T310Settings : ISettings
33    {
34        #region Private Variables
35
36        private bool hasChanges = false;
37        private ModeEnum mode = ModeEnum.Encrypt;
38
39        #endregion
40
41        #region TaskPane Settings
42
43        /// <summary>
44        /// HOWTO: This is an example for a setting entity shown in the settings pane on the right of the CT2 main window.
45        /// This example setting uses a number field input, but there are many more input types available, see ControlType enumeration.
46        /// </summary>
47        [TaskPane("Mode", "Encrypt or decrypt", null, 1, false, ControlType.ComboBox, new string[] { "Encrypt", "Decrypt" })]
48        public ModeEnum Mode
49        {
50            get
51            {
52                return mode;
53            }
54            set
55            {
56                if (mode != value)
57                {
58                    mode = value;
59                    hasChanges = true;
60                }
61            }
62        }
63
64        #endregion
65
66        #region ISettings Members
67
68        public bool HasChanges
69        {
70            get
71            {
72                return hasChanges;
73            }
74            set
75            {
76                hasChanges = value;
77            }
78        }
79
80        #endregion
81
82        #region INotifyPropertyChanged Members
83
84        public event PropertyChangedEventHandler PropertyChanged;
85
86        #endregion
87    }
88}
Note: See TracBrowser for help on using the repository browser.