123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using System;
- namespace PaintDotNet.Measurement
- {
- public class ToolInfo
- {
- private string name;
- private string helpText;
- private ImageResource image;
- private bool skipIfActiveOnHotKey;
- private char hotKey;
- private Type toolType;
- private ToolBarConfigItems toolBarConfigItems;
- public string Name
- {
- get
- {
- return this.name;
- }
- }
- public string HelpText
- {
- get
- {
- return this.helpText;
- }
- }
- public ImageResource Image
- {
- get
- {
- return this.image;
- }
- }
- public bool SkipIfActiveOnHotKey
- {
- get
- {
- return this.skipIfActiveOnHotKey;
- }
- }
- public char HotKey
- {
- get
- {
- return this.hotKey;
- }
- }
- public Type ToolType
- {
- get
- {
- return this.toolType;
- }
- }
- public ToolBarConfigItems ToolBarConfigItems
- {
- get
- {
- return this.toolBarConfigItems;
- }
- }
- public override bool Equals(object obj)
- {
- ToolInfo rhs = obj as ToolInfo;
- if (rhs == null)
- {
- return false;
- }
- return (this.name == rhs.name) &&
- (this.helpText == rhs.helpText) &&
- (this.hotKey == rhs.hotKey) &&
- (this.skipIfActiveOnHotKey == rhs.skipIfActiveOnHotKey) &&
- (this.toolType == rhs.toolType);
- }
- public override int GetHashCode()
- {
- return name.GetHashCode();
- }
- public ToolInfo(
- string name,
- string helpText,
- ImageResource image,
- char hotKey,
- bool skipIfActiveOnHotKey,
- ToolBarConfigItems toolBarConfigItems,
- Type toolType)
- {
- this.name = name;
- this.helpText = helpText;
- this.image = image;
- this.hotKey = hotKey;
- this.skipIfActiveOnHotKey = skipIfActiveOnHotKey;
- this.toolBarConfigItems = toolBarConfigItems;
- this.toolType = toolType;
- }
- }
- }
|