SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
User.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace SeciControls
7 {
8  public class User : IEquatable<User>
9  {
10  protected String _name;
11  protected String _institute;
12 
13  public String Name { get { return _name; } }
14  public String Institute { get { return _institute; } }
15 
16  public User()
17  {
18  }
19 
20  public User(String name, String institute)
21  {
22  _name = name;
23  _institute = institute;
24  }
25 
26  public override String ToString()
27  {
28  return _name + "\t" + _institute;
29  }
30 
31 
32  #region IEquatable<User> Members
33 
34  public bool Equals(User other)
35  {
36  if (_name == other._name && _institute == other._institute)
37  {
38  return true;
39  }
40 
41  return false;
42  }
43 
44  #endregion
45  }
46 
47  public class PI : User, IEquatable<PI>
48  {
49  public PI(String name, String institute)
50  {
51  _name = name;
52  _institute = institute;
53  }
54 
55  public override String ToString()
56  {
57  return _name + "\t" + _institute + "\tPI";
58  }
59 
60  #region IEquatable<PI> Members
61 
62  public bool Equals(PI other)
63  {
64  if (_name == other._name && _institute == other._institute)
65  {
66  return true;
67  }
68 
69  return false;
70  }
71 
72  #endregion
73  }
74 
75  public class Contact : User, IEquatable<Contact>
76  {
77  public Contact(String name, String institute)
78  {
79  _name = name;
80  _institute = institute;
81  }
82 
83  public override String ToString()
84  {
85  return _name + "\t" + _institute + "\tContact";
86  }
87 
88  #region IEquatable<Contact> Members
89 
90  public bool Equals(Contact other)
91  {
92  if (_name == other._name && _institute == other._institute)
93  {
94  return true;
95  }
96 
97  return false;
98  }
99 
100  #endregion
101  }
102 }
103 
String _institute
Definition: User.cs:11
bool Equals(Contact other)
Definition: User.cs:90
String Name
Definition: User.cs:13
String Institute
Definition: User.cs:14
override String ToString()
Definition: User.cs:83
Contact(String name, String institute)
Definition: User.cs:77
bool Equals(User other)
Definition: User.cs:34
override String ToString()
Definition: User.cs:55
String _name
Definition: User.cs:10
PI(String name, String institute)
Definition: User.cs:49
User(String name, String institute)
Definition: User.cs:20
bool Equals(PI other)
Definition: User.cs:62
override String ToString()
Definition: User.cs:26