/// <summary> /// 基准色 /// </summary> void BaseColorChange(Color clr) { DrawSwitch = false; PathGradientControl1.BaseColor = clr; color = PathGradientControl1.GetCurrentLocationColor(); DrawSwitch = true; }
/// <summary> /// 路径色(渐变矩形) /// </summary> void PathGradientControl1_ColorChange(Color clr) { DrawSwitch = false; _color = Color.FromArgb(_color.A, PathGradientControl1.color); RGBUserControl_A.Color = _color; RGBUserControl_R.Color = _color; RGBUserControl_G.Color = _color; RGBUserControl_B.Color = _color; Point pt = PathGradientControl1.ColorToLocation(_color); PathGradientControl1.ColorLocation = pt; PathGradientControl1.Invalidate(); DrawSwitch = true; if (ColorChanged != null) { ColorChanged(_color); } }