source: trunk/CrypPlugins/XOR/XORSettings.cs @ 2061

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

shortened license text to boilerplate notice in all source files

File size: 2.3 KB
Line 
1/*
2   Copyright 2008 Sebastian Przybylski, 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 System.IO;
22using Cryptool.PluginBase;
23using System.ComponentModel;
24
25namespace Cryptool.XOR
26{
27    public class XORSettings : ISettings
28    {
29        #region Public Xor specific interface
30
31        /// <summary>
32        /// We use this delegate to send log messages from the settings class to the Xor plugin
33        /// </summary>
34        /// <param name="sender"></param>
35        /// <param name="msg"></param>
36        /// <param name="logLevel"></param>
37        public delegate void XorLogMessage(string msg, NotificationLevel logLevel);
38
39        /// <summary>
40        /// Fire if a new message has to be shown in the status bar
41        /// </summary>
42        public event XorLogMessage LogMessage;
43       
44        /// <summary>
45        /// Returns true if some settigns have been changed. This value should be set
46        /// externally to false e.g. when a project was saved.
47        /// </summary>
48        [PropertySaveOrder(0)]
49        public bool HasChanges
50        {
51            get { return hasChanges; }
52            set { hasChanges = value; }
53        }
54
55        #endregion
56
57        #region Private variables
58
59        private bool hasChanges;
60        private int selectedAction = 0;
61
62        #endregion
63
64        #region INotifyPropertyChanged Members
65
66        public event PropertyChangedEventHandler PropertyChanged;
67
68        protected void OnPropertyChanged(string name)
69        {
70            if (PropertyChanged != null)
71            {
72                PropertyChanged(this, new PropertyChangedEventArgs(name));
73            }
74        }
75
76        #endregion
77    }
78}
Note: See TracBrowser for help on using the repository browser.