public void AddAt(int index, ObjectListCommand command) {}
	public void Add(ObjectListCommand command) {}
 public void Add(ObjectListCommand command)
 {
 }
 public void AddAt(int index, ObjectListCommand command)
 {
 }
Exemple #5
0
        private void RenderItemDetailsWithTableTags(HtmlMobileTextWriter writer, ObjectListItem item)
        {
            Style style1 = base.Style;
            Style style2 = Control.LabelStyle;
            Style style3 = Control.CommandStyle;
            Color color  = (Color)style1[Style.ForeColorKey, true];

            writer.Write("<table border=0 width=\"100%\">\r\n<tr><td colspan=2>");
            writer.BeginStyleContext();
            writer.EnterStyle(style2);
            writer.WriteText(item[Control.LabelFieldIndex], true);
            writer.ExitStyle(style2);
            writer.EndStyleContext();
            writer.Write("</td></tr>\r\n<tr>");
            RenderRule(writer, color, 2);
            IObjectListFieldCollection iObjectListFieldCollection = Control.AllFields;
            int         i           = 0;
            IEnumerator iEnumerator = iObjectListFieldCollection.GetEnumerator();

            while (iEnumerator.MoveNext())
            {
                ObjectListField objectListField = (ObjectListField)iEnumerator.Current;
                if (objectListField.Visible)
                {
                    writer.Write("<tr><td>");
                    writer.BeginStyleContext();
                    writer.EnterStyle(base.Style);
                    writer.WriteText(objectListField.Title, true);
                    writer.ExitStyle(base.Style);
                    writer.EndStyleContext();
                    writer.Write("</td><td>");
                    writer.BeginStyleContext();
                    writer.EnterStyle(style1);
                    if (objectListField.Name == "CALL")
                    {
                        writer.WriteText(HtmlcheckPhonenumber(item[i]), false);
                    }
                    else if (objectListField.Name == "MAIL")
                    {
                        writer.WriteText(HtmlMail(item[i]), false);
                    }
                    else
                    {
                        writer.WriteText(item[i], false);
                    }
                    writer.ExitStyle(style1);
                    writer.EndStyleContext();
                    writer.Write("</td></tr>\r\n");
                }
                i++;
            }
            RenderRule(writer, color, 2);
            writer.Write("<tr><td colspan=2>");
            writer.BeginStyleContext();
            BooleanOption booleanOption = style3.Font.Italic;

            style3.Font.Italic = BooleanOption.False;
            writer.EnterStyle(style3);
            writer.Write("[&nbsp;");
            writer.ExitStyle(style3);
            style3.Font.Italic = booleanOption;
            writer.EnterStyle(style3);
            iEnumerator = Control.Commands.GetEnumerator();
            while (iEnumerator.MoveNext())
            {
                ObjectListCommand objectListCommand = (ObjectListCommand)iEnumerator.Current;
                RenderPostBackEventAsAnchor(writer, objectListCommand.Name, objectListCommand.Text, style3);
                writer.Write("&nbsp;|&nbsp;");
            }

            string str = (Control.BackCommandText != String.Empty) ? Control.BackCommandText : base.GetDefaultLabel(ControlAdapter.BackLabel);

            RenderPostBackEventAsAnchor(writer, BackToList, str, style3);
            writer.ExitStyle(style3);
            style3.Font.Italic = BooleanOption.False;
            writer.EnterStyle(style3);
            writer.Write("&nbsp;]");
            writer.ExitStyle(style3);
            style3.Font.Italic = booleanOption;
            writer.EndStyleContext();
            writer.Write("</td></tr></table>");
        }
Exemple #6
0
        private void RenderItemDetailsWithoutTableTags(HtmlMobileTextWriter writer, ObjectListItem item)
        {
            Style style1 = base.Style;
            Style style2 = Control.LabelStyle;
            Style style3 = Control.CommandStyle;

            writer.EnterStyle(style2);
            writer.WriteText(item[Control.LabelFieldIndex], true);
            writer.ExitStyle(style2, true);
            IObjectListFieldCollection iObjectListFieldCollection = Control.AllFields;
            int  i    = 0;
            bool flag = style1.Font.Bold == BooleanOption.True;

            writer.EnterStyle(style1);
            IEnumerator iEnumerator = iObjectListFieldCollection.GetEnumerator();

            while (iEnumerator.MoveNext())
            {
                ObjectListField objectListField = (ObjectListField)iEnumerator.Current;
                if (objectListField.Visible)
                {
                    if (!flag)
                    {
                        writer.Write("<b>");
                    }
                    writer.WriteText(String.Concat(objectListField.Title, ":"), true);
                    if (!flag)
                    {
                        writer.Write("</b>");
                    }
                    writer.Write("&nbsp;");
                    if (objectListField.Name == "CALL")
                    {
                        writer.WriteText(HtmlcheckPhonenumber(item[i]), true);
                    }
                    else if (objectListField.Name == "MAIL")
                    {
                        writer.WriteText(HtmlMail(item[i]), true);
                    }
                    else
                    {
                        writer.WriteText(item[i], true);
                    }
                    writer.WriteBreak();
                }
                i++;
            }

            writer.ExitStyle(style1);
            BooleanOption booleanOption = style3.Font.Italic;

            style3.Font.Italic = BooleanOption.False;
            writer.EnterStyle(style3);
            writer.Write("[&nbsp;");
            writer.ExitStyle(style3);
            style3.Font.Italic = booleanOption;
            writer.EnterStyle(style3);
            iEnumerator = Control.Commands.GetEnumerator();
            while (iEnumerator.MoveNext())
            {
                ObjectListCommand objectListCommand = (ObjectListCommand)iEnumerator.Current;
                RenderPostBackEventAsAnchor(writer, objectListCommand.Name, objectListCommand.Text, style3);
                writer.Write("&nbsp;|&nbsp;");
            }

            string str = (Control.BackCommandText != String.Empty) ? Control.BackCommandText : base.GetDefaultLabel(ControlAdapter.BackLabel);

            RenderPostBackEventAsAnchor(writer, BackToList, str, style3);
            writer.ExitStyle(style3);
            style3.Font.Italic = BooleanOption.False;
            writer.EnterStyle(style3);
            writer.Write("&nbsp;]");
            writer.ExitStyle(style3, Control.BreakAfter);
            style3.Font.Italic = booleanOption;
        }