ما رصاصة الزيتون على نقطة توقف يعني في Sharpdeveld
-
18-09-2019 - |
سؤال
في بعض الأحيان عندما أقوم بتعيين نقطة توقف وابدأ في تصحيح تغييرات الألوان من اللون الأحمر إلى الزيتون:
عندما يحدث ذلك لا يتوقف تصحيح الأخطاء على الإطلاق - يتم تجاهل نقطة التوقف.
أريد أن أعرف لماذا يحدث هذا وكيفية تجنبه في المستقبل.
يحرر:
لا يحدث إلا عندما يتم تعيين نقطة توقف في خط التعليق:
المحلول
إنه مصدر مفتوح. قم بتنزيله وإيجاد الرمز المناسب استغرقني حوالي 5 دقائق:
public void DrawBreakpoint(Graphics g, int y, bool isEnabled, bool isHealthy)
{
int diameter = Math.Min(iconBarWidth - 2, textArea.TextView.FontHeight);
Rectangle rect = new Rectangle(1,
y + (textArea.TextView.FontHeight -
diameter) / 2,
diameter,
diameter);
using (GraphicsPath path = new GraphicsPath()) {
path.AddEllipse(rect);
using (PathGradientBrush pthGrBrush = new PathGradientBrush(path)) {
pthGrBrush.CenterPoint = new PointF(rect.Left + rect.Width / 3 ,
rect.Top + rect.Height / 3);
pthGrBrush.CenterColor = Color.MistyRose;
Color[] colors = {isHealthy ? Color.Firebrick : Color.Olive};
pthGrBrush.SurroundColors = colors;
if (isEnabled) {
g.FillEllipse(pthGrBrush, rect);
} else {
g.FillEllipse(SystemBrushes.Control, rect);
using (Pen pen = new Pen(pthGrBrush)) {
g.DrawEllipse(pen, new Rectangle(rect.X + 1, rect.Y + 1,
rect.Width - 2,
rect.Height - 2));
}
}
}
}
}
هذا لون الدائرة هو "color.olive". إذا كنت تريد أن تعرف لماذا isHealthy
هو خطأ، واستخدام المصدر. هناك بضعة أسباب يمكنني العثور عليها بسرعة: لقد تغير الملف المصدر أو لم يتم تحميل الوحدة النمطية، قد يكون هناك المزيد.
نصائح أخرى
يحدث هذا إذا قمت بترجمة البرنامج ك "الإصدار".
يتم تعليق خطك حيث يتم تعيين نقطة التوقف.
لا تنتمي إلى StackOverflow