mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-08 18:26:35 +08:00
项目结构调整
This commit is contained in:
37
Extensions/AIStudio.Wpf.Mind/Controls/ColorItem.cs
Normal file
37
Extensions/AIStudio.Wpf.Mind/Controls/ColorItem.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Controls
|
||||
{
|
||||
public class ColorItem
|
||||
{
|
||||
public Color? Color
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public ColorItem(Color? color, string name)
|
||||
{
|
||||
Color = color;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
var ci = obj as ColorItem;
|
||||
if (ci == null)
|
||||
return false;
|
||||
return (ci.Color.Equals(Color) && ci.Name.Equals(Name));
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.Color.GetHashCode() ^ this.Name.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user