コード例 #1
0
 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++;
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
 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++;
     }
 }