本文整理汇总了C#中System.Windows.Forms.Label.ResetText方法的典型用法代码示例。如果您正苦于以下问题:C# Label.ResetText方法的具体用法?C# Label.ResetText怎么用?C# Label.ResetText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Label
的用法示例。
在下文中一共展示了Label.ResetText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HistRed_Click
private void HistRed_Click(object sender, EventArgs e)
{
int temp = 0, baris = 0, data = 0, data2 = 0, temp2 = 0, baris2 = 0;
Histogram Hg = new Histogram();
Bitmap citra = new Bitmap(original.Image);
//int[] histo;
//mendapat nilai tiap RGB
int[] histogramRed = Hg.HistogramAngkaRed(citra);
int[] histogramGreen = Hg.HistogramAngkaGreen(citra);
int[] histogramBlue = Hg.HistogramAngkaBlue(citra);
listBox1.Items.Clear();
while (baris < histogramRed.Length)
{
temp = histogramRed[baris];
if (data < temp)
{
data = temp;
}
baris++;
}
int y = data / 250;
for (int i = 0; i <= 255; i++)
{
listBox1.Items.Add(i + "=" + histogramRed[i]);
Label lb = new Label();
int x = Convert.ToInt32(histogramRed[i]);
lb.Height = x / y;
lb.Width = 1;
lb.BackColor = Color.Red;
//bkin label sbg grapik hist nya. edit posisinya nilainya saja
//lb.Location = new Point(675 + i, 400 - lb.Height);
lb.Location = new Point(876 + i, 331 - lb.Height);
this.Controls.Add(lb);
//panelHist.Controls.Add(lb);
lb.ResetText();
}
int banyakPixel = citra.Width * citra.Height;
byte[] hasilR = Hg.HasilHistEqArr(histogramRed, banyakPixel);
byte[] hasilG = Hg.HasilHistEqArr(histogramGreen, banyakPixel);
byte[] hasilB = Hg.HasilHistEqArr(histogramBlue, banyakPixel);
listBox2.Items.Clear();
//searching nilai tertinggi terlebih dahulu (sequential search)
while (baris2 < hasilR.Length)
{
temp2 = hasilR[baris2];
if (data2 < temp2)
{
data2 = temp2;
}
baris2++;
}
//Execute2.Text = data2.ToString();
int z = data2 / 250;
for (int i = 0; i <= 255; i++)
{
listBox2.Items.Add(i + "=" + hasilR[i]);
Label lb = new Label();
//.........这里部分代码省略.........