private void buttonOk_Click(object sender, EventArgs e) { GivePriceStep1 givePrice = new GivePriceStep1(); givePrice.inputBox = new Position[]{ this.inputBox2Object(this.textBox1),//价格 this.inputBox2Object(this.textBox2)//价格 }; givePrice.button = this.inputBox2Object(this.textBox3);//出价按钮 SubmitPrice submit = new SubmitPrice(); submit.captcha = new Position[]{ this.inputBox2Object(this.textBox4),//校验码 this.inputBox2Object(this.textBox5)//校验码提示 }; submit.inputBox = this.inputBox2Object(this.textBox6);//输入校验码 string[] posBtnOK = this.textBox7.Text.Split(new char[] { ',' }); submit.buttons = new Position[]{ this.inputBox2Object(this.textBox7),//确定按钮 this.inputBox2Object(this.textBox7, offsetX:186, offsetY:0)//取消按钮 }; this.bid = new BidStep1(); this.bid.give = givePrice; this.bid.submit = submit; this.cancel = false; this.Close(); }
private void buttonSubmit_Click(object sender, EventArgs e) { Rectangle screen = new Rectangle(); screen = Screen.GetWorkingArea(this); GivePriceStep1 givePrice = new GivePriceStep1(); givePrice.inputBox = new Position[]{ this.inputBox2Object(this.textBox1),//价格 this.inputBox2Object(this.textBox2)//价格 }; givePrice.button = this.inputBox2Object(this.textBox3);//出价按钮 SubmitPrice submit = new SubmitPrice(); submit.captcha = new Position[]{ this.inputBox2Object(this.textBox4),//校验码 this.inputBox2Object(this.textBox5)//校验码提示 }; submit.inputBox = this.inputBox2Object(this.textBox6);//输入校验码 string[] posBtnOK = this.textBox7.Text.Split(new char[] { ',' }); submit.buttons = new Position[]{ this.inputBox2Object(this.textBox7),//确定按钮 this.inputBox2Object(this.textBox7, offsetX:186, offsetY:0)//取消按钮 }; this.bid = new BidStep1(); this.bid.give = givePrice; this.bid.submit = submit; MessageBoxButtons messButton = MessageBoxButtons.OKCancel; DialogResult dr = MessageBox.Show("确定要提交该配置吗?", "提交LOGIN配置", messButton); if (dr == DialogResult.OK) { string hostName = System.Net.Dns.GetHostName(); string endpoint = this.endPoint + "/rest/service/command/operation/screenconfig/BidStep1"; RestClient rest = new RestClient(endpoint: endpoint, method: HttpVerb.POST, postObj: this.bid); String response = rest.MakeRequest("?fromHost=" + String.Format("host:{0}, screen:{1}*{2}", hostName, screen.Width, screen.Height)); } }