/// <summary> /// Send and save an issue via Web Service. /// </summary> /// <param name="frm"></param> static void Send(MainForm frm) { BugTrackerWebService.BugTrackerWebService trackerWService = new BugTrackerWebService.BugTrackerWebService(); MemoryStream ms = new MemoryStream(); System.Drawing.Bitmap b = frm.getBitmap(); b.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] bitmapData = ms.ToArray(); string returned = trackerWService.SaveIssue(0, Program.project_id, frm.textBoxShortDescription.Text, Program.username, bitmapData); ms.Close(); ms.Dispose(); if (returned != "0") { MessageBox.Show("Sending of bug " + returned + " ok.\n\n"); } else { MessageBox.Show("Sending of bug failed.\n\n"); } }
public ConfigForm() { System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); InitializeComponent(); textBoxUrl.Text = Program.url; textBoxUsername.Text = Program.username; textBoxPassword.Text = Program.password; //textBoxDomain.Text = Program.domain; checkBoxSavePassword.Checked = (Program.save_password == "1"); textBoxProjectNumber.Text = Convert.ToString(Program.project_id); BugTrackerWebService.BugTrackerWebService trackerWService = new BugTrackerWebService.BugTrackerWebService(); BugTrackerWebService.ProjectInfoBase[] objArray = trackerWService.GetProjectByMemberUsername(Program.username); foreach (BugTrackerWebService.ProjectInfoBase obj in objArray) { comboBoxProjects.Items.Add(new Item(obj.Name, Convert.ToInt32(obj.Key))); } }