本文整理汇总了C#中jabber.GetFields方法的典型用法代码示例。如果您正苦于以下问题:C# jabber.GetFields方法的具体用法?C# jabber.GetFields怎么用?C# jabber.GetFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jabber
的用法示例。
在下文中一共展示了jabber.GetFields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: XDataForm
/// <summary>
/// Create an x:data form from the given XML form description
/// </summary>
/// <param name="x">x:data form to render</param>
public XDataForm(jabber.protocol.x.Data x) : this()
{
if (x == null)
throw new ArgumentException("x:data form must not be null", "x");
m_type = x.Type;
this.SuspendLayout();
if (x.Title != null)
this.Text = x.Title;
if (m_type == XDataType.cancel)
{
lblInstructions.Text = "Form canceled."; // TODO: Localize!
lblInstructions.Resize += new EventHandler(lblInstructions_Resize);
lblInstructions_Resize(lblInstructions, null);
}
else if (x.Instructions == null)
lblInstructions.Visible = false;
else
{
lblInstructions.Text = DeWhitespace(x.Instructions);
lblInstructions.Resize += new EventHandler(lblInstructions_Resize);
lblInstructions_Resize(lblInstructions, null);
}
pnlFields.SuspendLayout();
Field[] fields = x.GetFields();
m_fields = new FormField[fields.Length];
for (int i=fields.Length-1; i>=0; i--)
{
m_fields[i] = new FormField(fields[i], this, i);
}
panel1.TabIndex = fields.Length;
if (m_type != XDataType.form)
{
btnOK.Location = btnCancel.Location;
btnCancel.Visible = false;
}
pnlFields.ResumeLayout(true);
this.ResumeLayout(true);
for (int i=0; i<fields.Length; i++)
{
if ((fields[i].Type != FieldType.hidden) &&
(fields[i].Type != FieldType.Fixed))
m_fields[i].Focus();
}
}