本文整理汇总了C#中System.Windows.Forms.Panel.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.CopyTo方法的具体用法?C# Panel.CopyTo怎么用?C# Panel.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.Panel
的用法示例。
在下文中一共展示了Panel.CopyTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PnlOrd
/// <summary>
/// pnl 的顺序,以及个数
/// </summary>
private void PnlOrd()
{
int InParkDevCount = 0;
int OutParkDevCount = 0;
int incount = 0;
int outcount = 0;
DataTable tab = new DataTable();
tab.Columns.Add("通讯站址");
string[] address = GetStatAddress();
foreach (string str in address)
{
DataRow dr = tab.NewRow();
dr["通讯站址"] = str;
if (Convert.ToInt16(str) < 129) incount = incount + 1;
if (Convert.ToInt16(str) >= 129) outcount = outcount + 1;
tab.Rows.Add(dr);
}
if (tab == null)
return;
if (incount > 1)
InParkDevCount = 2;
else
InParkDevCount = 1;
if (outcount > 1)
OutParkDevCount = 2;
else
OutParkDevCount = 1;
Panel[] plIn = new Panel[InParkDevCount];
Panel[] plOut = new Panel[OutParkDevCount];
switch (InParkDevCount)
{
case 1:
Panel[] pnlInOne = { p_in1 };
plIn = pnlInOne;
break;
case 2:
Panel[] pnlInTwo = { p_in1, p_in2 };
plIn = pnlInTwo;
break;
}
switch (OutParkDevCount)
{
case 1:
Panel[] pnlOutOne = { p_out1 };
plOut = pnlOutOne;
break;
case 2:
Panel[] pnlOutTwo = { p_out1, p_out2 };
plOut = pnlOutTwo;
break;
}
Panel[] plInOut = new Panel[plIn.Length + plOut.Length];
plIn.CopyTo(plInOut, 0);
int index = plIn.Length;
plOut.CopyTo(plInOut, index);
VideoView(plInOut);
}