CSHARPWINDOWSFORM Telegram 184
//////////
SolidBrush الكلاس الاخر
يحدد فرشاة بلون واحد. تستخدم الفرش لتعبئة أشكال الرسوم

اما ما بداخل الاقواس فهو عبارة عن شرط

onHoverBorderColor سوف يتم تنفيذ true عندما يساوي isHovering
borderColor غير ذلك سوف ينفذ

قمنا بشرح صيغة هذا الشرط في القناة
*/



#endregion



//Border حدود الزر
g.FillEllipse(brush, 0, 0, Height, Height);
g.FillEllipse(brush, Width - Height, 0, Height, Height);
g.FillRectangle(brush, Height / 2, 0, Width - Height, Height);
/*
دوال تحميل زائد تقوم
تملأ الجزء الداخلي من القطع



*/



brush.Dispose();
brush = new SolidBrush(isHovering ? onHoverButtonColor : buttonColor);

//Inner part. Button itself
g.FillEllipse(brush, borderThicknessByTwo, borderThicknessByTwo, Height - borderThickness,
Height - borderThickness);
g.FillEllipse(brush, (Width - Height) + borderThicknessByTwo, borderThicknessByTwo,
Height - borderThickness, Height - borderThickness);
g.FillRectangle(brush, Height / 2 + borderThicknessByTwo, borderThicknessByTwo,
Width - Height - borderThickness, Height - borderThickness);

brush.Dispose();
brush = new SolidBrush(isHovering ? onHoverTextColor : textColor);

//Button Text
SizeF stringSize = g.MeasureString(Text, Font);
g.DrawString(Text, Font, brush, (Width - stringSize.Width) / 2, (Height - stringSize.Height) / 2);
}


public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;

}
}

public Color OnHoverBorderColor // لون حدود الزر عندما يكون المؤشر فوق الزر
{
get { return onHoverBorderColor; }
set
{
onHoverBorderColor = value;

}
}

public Color ButtonColor // خاصية لون الزر
{
get { return buttonColor; }
set
{
buttonColor = value;

}
}

public Color OnHoverButtonColor// لون الزر عندما يكون المؤشر فوقه
{
get { return onHoverButtonColor; }
set
{
onHoverButtonColor = value;

}
}

public Color TextColor // تلوين النص
{
get { return textColor; }
set
{
textColor = value;

}
}



// خاصية تلوين النص عندما يكون المؤشر فوق الزر
public Color OnHoverTextColor
{
get { return onHoverTextColor; }
set
{
onHoverTextColor = value;

}
}
}
}




https://www.tgoop.com/CsharpWindowsForm



tgoop.com/CsharpWindowsForm/184
Create:
Last Update:

//////////
SolidBrush الكلاس الاخر
يحدد فرشاة بلون واحد. تستخدم الفرش لتعبئة أشكال الرسوم

اما ما بداخل الاقواس فهو عبارة عن شرط

onHoverBorderColor سوف يتم تنفيذ true عندما يساوي isHovering
borderColor غير ذلك سوف ينفذ

قمنا بشرح صيغة هذا الشرط في القناة
*/



#endregion



//Border حدود الزر
g.FillEllipse(brush, 0, 0, Height, Height);
g.FillEllipse(brush, Width - Height, 0, Height, Height);
g.FillRectangle(brush, Height / 2, 0, Width - Height, Height);
/*
دوال تحميل زائد تقوم
تملأ الجزء الداخلي من القطع



*/



brush.Dispose();
brush = new SolidBrush(isHovering ? onHoverButtonColor : buttonColor);

//Inner part. Button itself
g.FillEllipse(brush, borderThicknessByTwo, borderThicknessByTwo, Height - borderThickness,
Height - borderThickness);
g.FillEllipse(brush, (Width - Height) + borderThicknessByTwo, borderThicknessByTwo,
Height - borderThickness, Height - borderThickness);
g.FillRectangle(brush, Height / 2 + borderThicknessByTwo, borderThicknessByTwo,
Width - Height - borderThickness, Height - borderThickness);

brush.Dispose();
brush = new SolidBrush(isHovering ? onHoverTextColor : textColor);

//Button Text
SizeF stringSize = g.MeasureString(Text, Font);
g.DrawString(Text, Font, brush, (Width - stringSize.Width) / 2, (Height - stringSize.Height) / 2);
}


public Color BorderColor
{
get { return borderColor; }
set
{
borderColor = value;

}
}

public Color OnHoverBorderColor // لون حدود الزر عندما يكون المؤشر فوق الزر
{
get { return onHoverBorderColor; }
set
{
onHoverBorderColor = value;

}
}

public Color ButtonColor // خاصية لون الزر
{
get { return buttonColor; }
set
{
buttonColor = value;

}
}

public Color OnHoverButtonColor// لون الزر عندما يكون المؤشر فوقه
{
get { return onHoverButtonColor; }
set
{
onHoverButtonColor = value;

}
}

public Color TextColor // تلوين النص
{
get { return textColor; }
set
{
textColor = value;

}
}



// خاصية تلوين النص عندما يكون المؤشر فوق الزر
public Color OnHoverTextColor
{
get { return onHoverTextColor; }
set
{
onHoverTextColor = value;

}
}
}
}




https://www.tgoop.com/CsharpWindowsForm

BY برمجة تطبيقات الويندوز C# Programming




Share with your friend now:
tgoop.com/CsharpWindowsForm/184

View MORE
Open in Telegram


Telegram News

Date: |

The imprisonment came as Telegram said it was "surprised" by claims that privacy commissioner Ada Chung Lai-ling is seeking to block the messaging app due to doxxing content targeting police and politicians. best-secure-messaging-apps-shutterstock-1892950018.jpg ZDNET RECOMMENDS bank east asia october 20 kowloon Telegram Channels requirements & features
from us


Telegram برمجة تطبيقات الويندوز C# Programming
FROM American