예제 #1
0
파일: IHTMLInput.cs 프로젝트: wclwksn/code
        public static IHTMLInput CreateRadio(string name, string value, bool @checked)
        {
            IHTMLInput n = null;

            string c = "";

            if (@checked)
            {
                c = " checked='checked'";
            }

            // packer shall not remove the cc statement

            n = (IHTMLInput) new IFunction("e", "/*@cc_on return this.createElement(e); @*/ return null;").apply(Native.Document,
                                                                                                                 "<input type='radio' name='" + name + "' value='" + value + "'" + c + " />"
                                                                                                                 );

            if (n == null)
            {
                n          = new IHTMLInput(HTMLInputTypeEnum.radio, name, value);
                n.@checked = @checked;
            }

            return(n);
        }
예제 #2
0
파일: IHTMLInput.cs 프로젝트: wclwksn/code
        internal static IHTMLInput InternalConstructor(HTMLInputTypeEnum type, string name, string value)
        {
            IHTMLInput n = null;

            var _radio = HTMLInputTypeEnum.radio;

            if (type == _radio)
            {
                // TODO: escape name and value

                n = (IHTMLInput) new IFunction("e", "/*@cc_on return this.createElement(e); @*/ return null;").apply(Native.Document,
                                                                                                                     "<input type='radio' name='" + name + "' value='" + value + "' />"
                                                                                                                     );
            }

            if (n == null)
            {
                n       = new IHTMLInput();
                n.type  = type;
                n.name  = name;
                n.value = value;
            }

            return(n);
        }
예제 #3
0
파일: IHTMLInput.cs 프로젝트: wclwksn/code
        public static IHTMLInput CreateCheckbox(string title)
        {
            IHTMLInput i = new IHTMLInput(HTMLInputTypeEnum.checkbox);

            i.title = title;

            return(i);
        }
예제 #4
0
파일: IHTMLInput.cs 프로젝트: wclwksn/code
        internal static IHTMLInput InternalConstructor(HTMLInputTypeEnum type, string value)
        {
            IHTMLInput n = new IHTMLInput(type);

            n.value = value;

            return(n);
        }
예제 #5
0
파일: IHTMLInput.cs 프로젝트: wclwksn/code
        internal static IHTMLInput InternalConstructor(HTMLInputTypeEnum type)
        {
            IHTMLInput n = null;

            var _radio = HTMLInputTypeEnum.radio;

            if (type == _radio)
            {
                n = (IHTMLInput) new IFunction("e", "/*@cc_on return this.createElement(e); @*/ return null;").apply(Native.Document, "<input type='radio' name='' value='' />");
            }

            if (n == null)
            {
                n      = new IHTMLInput();
                n.type = type;
            }

            return(n);
        }