Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     DeuffService.IService1 obj = new DeuffService.Service1Client();
     DeuffService.responseInfo resultObj = obj.GetAnswer(requestObj);
     requestObj.BugId = resultObj.BugId;
     resultWindow.populate(resultObj);
     DialogResult dres= resultWindow.ShowDialog();
     if (dres == DialogResult.Retry)
         changeQuestion();
     else
         this.Close();
 }
        private void button2_Click(object sender, EventArgs e)
        {
            //to update answer on server
            DeuffService.suggestAnswer ans = new DeuffService.suggestAnswer();
            ans.ErrorMessage = properties.errorMessage;

            ans.Answer = textBox5.Text;

            ans.Vote = 0;
            ans.Filename = properties.filename;
            ans.Info = properties.info;
            ans.Stacktrace = properties.stacktrace;
            ans.Tags = properties.stacktrace;
            ans.UserId = properties.userId;
            ans.Guid = properties.guid;
            ans.Info = properties.info;
            ans.NameSpace = properties.nameSpace;
            ans.Os = properties.os;
            ans.SoftwareName = properties.projectTitle;
            ans.Tags = properties.tags;
            ans.Version = properties.version;
            ans.Vendor = properties.vendor;
            DeuffService.IService1 obj = new DeuffService.Service1Client();
            obj.updateAnswer(ans);

            //close the dialog box
            this.Close();
            this.DialogResult = DialogResult.OK;
        }
        private void button7_Click(object sender, EventArgs e)
        {
            //to update answer on server
            DeuffService.suggestAnswer ans = new DeuffService.suggestAnswer();
            ans.ErrorMessage = properties.errorMessage;
            ans.Answer = textBox4.Text;
            DeuffService.IService1 obj = new DeuffService.Service1Client();
            obj.voteAnswer(ans);

            //close the dialog box
            this.Close();
            this.DialogResult = DialogResult.OK;
        }