private void SetPrimarySoftkey(UpSoftkey softkey) { for (int i = NumberOfSoftkeys - 1; i > 0; i--) { CurrentCard.Softkeys[i] = CurrentCard.Softkeys[i - 1]; } CurrentCard.Softkeys[0] = softkey; if (CurrentCard.SoftkeysUsed < NumberOfSoftkeys) { CurrentCard.SoftkeysUsed++; } }
private void RenderSoftkey(String doType, UpSoftkey softkey) { UpHyperlinkSoftkey linkSoftkey = softkey as UpHyperlinkSoftkey; if (linkSoftkey != null) { WriteBeginTag("do"); WriteAttribute("type", doType); WriteTextEncodedAttribute("label", linkSoftkey.Label); Write(">"); WriteBeginTag("go"); Write(" href=\""); if (linkSoftkey.EncodeUrl) { WriteEncodedUrl(linkSoftkey.TargetUrl); } else { Write(EscapeAmpersand(linkSoftkey.TargetUrl)); } Write("\" />"); WriteEndTag("do"); return; } UpPostBackSoftkey postBackSoftkey = softkey as UpPostBackSoftkey; if (postBackSoftkey != null) { RenderDoEvent(doType, postBackSoftkey.Target, postBackSoftkey.Argument, postBackSoftkey.PostBackType, postBackSoftkey.Label, postBackSoftkey.IncludeVariables); return; } }