Exemple #1
0
        private void OnOptionsRender(WebComponent source, WebSubmission values)
        {
            WebPage outpage = (WebPage)source;
            WebForm outform = (WebForm)outpage.Children.Find(o => !String.IsNullOrEmpty(o.ID) && o.ID.Equals("options"));

            foreach (KeyValuePair <string, Tuple <WebOptionComponentDelegate, WebOptionSubmitDelegate> > kv in this._options_defaults)
            {
                WebComponent comp = kv.Value.Item1(values);
                outform.Children.Add(new WebDiv("wrapper_" + kv.Key, "options_wrapper", comp));
            }

            outform.Children.Add(new WebDiv("wrapper_submit", "options_wrapper", new WebSubmit("Submit", "Submit", this.OnOptions)));
        }
Exemple #2
0
        private WebForm SetupOptionsPage(string page_url, string action_url)
        {
            WebPage optionspage = new WebPage("Options");

            this.VFileSystem.Root.PutFile(page_url, optionspage);
            optionspage.AddCSS("control.css");

            WebHeader optionsheader = new WebHeader(1, "Options");

            optionspage.Children.Add(optionsheader);

            WebForm options_form = new WebForm("options", action_url);

            optionspage.Children.Add(options_form);

            return(options_form);
        }
Exemple #3
0
        private WebForm AuthSetupLoginPage(string page_url, string action_url)
        {
            WebPage loginpage = new WebPage("Login");

            this.VFileSystem.Root.PutFile(page_url, loginpage);
            loginpage.AddCSS("control.css");

            WebHeader loginheader = new WebHeader(1, "Login");

            loginpage.Children.Add(loginheader);

            WebForm login_form = new WebForm("login", action_url);

            login_form.Children.Add(new WebDiv("username_wrapper", "login_wrapper", new WebTextInput("username", "User")));
            login_form.Children.Add(new WebDiv("password_wrapper", "login_wrapper", new WebPasswordInput("password", "Password")));
            login_form.Children.Add(new WebDiv("submit_wrapper", "login_wrapper", new WebSubmit("submit", "Submit", null)));
            loginpage.Children.Add(login_form);

            return(login_form);
        }