本文整理汇总了C#中System.Windows.Forms.Label.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Label.GetType方法的具体用法?C# Label.GetType怎么用?C# Label.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Label
的用法示例。
在下文中一共展示了Label.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FinishedLoad
void FinishedLoad()
{
this.label1.Text = "Finished";
for (int i = Content.View.Sections.Count - 1; i >= 0; i--)
{
Section d = Content.View.Sections[i];
pane D = new pane();
D.Label = d.Name;
D.Show();
D.Dock = DockStyle.Left;
D.Width = 75;
D.Height = this.panel1.Height;
D.Sect = new Panel();
panel1.Controls.Add(D);
D.panel1 = this.panel1;
this.contentPanel.Controls.Add(D.Sect);
D.Sect.Dock = DockStyle.Fill;
D.S ect.Show();
if (i == 0)
{
D.Sect.Visible = true;
}
foreach (Element a in d.Elements)
{
Control Ds = new Control();
switch (a.Type)
{
case "sp:group":
spotifyPanel sp = new spotifyPanel();
sp.Label = a.GetAttribute("label");
sp.Width = int.Parse(a.GetAttribute("width"));
sp.Height = int.Parse(a.GetAttribute("height"));
sp.Left = int.Parse(a.GetAttribute("x"));
sp.Top = int.Parse(a.GetAttribute("y"));
D.Sect.Controls.Add(sp);
sp.Show();
Ds = sp;
break;
case "sp:label":
Label spx = new Label();
if (a.GetAttribute("autoSize") != "")
{
spx.AutoSize = bool.Parse(a.GetAttribute("autoSize"));
}
spx.Text = a.GetAttribute("label");
spx.Width = int.Parse(a.GetAttribute("width"));
spx.Height = int.Parse(a.GetAttribute("height"));
spx.Left = int.Parse(a.GetAttribute("x"));
spx.Top = int.Parse(a.GetAttribute("y"));
spx.ForeColor = Color.Gray;
spx.BackColor = Color.Transparent;
D.Sect.Controls.Add(spx);
spx.Show();
Ds = spx;
break;
default:
break;
}
top += Ds.Height;
}
if (i == 0)
{
D.label1_MouseDown((object)D, new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0));
}
foreach (Control spx in D.Sect.Controls)
{
if (spx.GetType() == typeof(Label))
foreach (Control Cont in D.Sect.Controls)
{
if (Cont.GetType() == typeof(spotifyPanel))
{
spotifyPanel SD = (spotifyPanel)Cont;
if (spx.Left > SD.Left && spx.Top > SD.Top && spx.Left < SD.Width + SD.Left && spx.Top < SD.Height + SD.Top)
spx.ForeColor = Color.Black;
spx.BackColor = Color.FromArgb(104, 104, 104);
}
}
}
}
}