public void buildGui(string captchaQuestionUrl) { CaptchaQuestionUrl = captchaQuestionUrl; var browser = this.add_Browser(); var panelAbove = browser.insert_Above<Panel>(25); var label = panelAbove.add_Label("What does the CAPTCHA say?").top(6); var button = panelAbove.add_Button("Submit"); button.left(panelAbove.width()-button.width()) .anchor_TopRight(); AnswerTextBox = label.append_TextBox(""); AnswerTextBox.onTextChange((text)=>CaptchaAnswer = text) .onEnter((text) => answerAvailable()) .width(panelAbove.width() -button.width() - label.width() - 10) .anchor_TopLeftRight() .top(2); button.onClick(() => answerAvailable()); browser.open(CaptchaQuestionUrl); this.parentForm().Closed += (sender,e) => answerAvailable(); }
public void buildGui() { UserNameTextBox = this.add_Label("Username:"******""); UserNameTextBox.onTextChange((text)=> UserName = text) .align_Right(this); PasswordTextBox = this.add_Label("Password: "******"") .isPasswordField(); PasswordTextBox.onTextChange((text)=> Password = text) .align_Right(this); var OKButton = this.add_Button("OK", 60,0); OKButton.onClick(answerAvailable) .left(this.width() - OKButton.width() - 1) .anchor_BottomRight(); this.parentForm().Closed += (sender,e) => answerAvailable(); }