Spring – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 using System;
2 using System.Windows.Forms;
3  
4 namespace Spring.MouseKeyboard
5 {
6 internal class KeyActionMouseButtons : KeyAction, IEquatable<KeyActionMouseButtons>
7 {
8 #region Public Enums, Properties and Fields
9  
10 public MouseButtons MouseButtons { get; }
11  
12 #endregion
13  
14 #region Constructors, Destructors and Finalizers
15  
16 public KeyActionMouseButtons(MouseButtons mouseButtons) => MouseButtons = mouseButtons;
17  
18 #endregion
19  
20 #region Public Methods
21  
22 public bool Equals(KeyActionMouseButtons other)
23 {
24 if (ReferenceEquals(null, other))
25 {
26 return false;
27 }
28  
29 if (ReferenceEquals(this, other))
30 {
31 return true;
32 }
33  
34 return MouseButtons == other.MouseButtons;
35 }
36  
37 public override bool Equals(object obj)
38 {
39 if (ReferenceEquals(null, obj))
40 {
41 return false;
42 }
43  
44 if (ReferenceEquals(this, obj))
45 {
46 return true;
47 }
48  
49 if (obj.GetType() != GetType())
50 {
51 return false;
52 }
53  
54 return Equals((KeyActionMouseButtons) obj);
55 }
56  
57 public override int GetHashCode() => (int) MouseButtons;
58  
59 #endregion
60 }
61 }