private void writeOutIssue(IssueDetail issue) { string[] arguments = new string[1], inputs = new string[1], outputs; arguments[0] = "import_xml -"; inputs[0] = "<be-xml>\n"; inputs[0] += issue.toXML(); inputs[0] += "</be-xml>"; //MessageBox.Show(this, "Would call: " + arguments[0] + "\nwith: " + inputs[0]); outputs = plugin.callBEcmd(BERepoLocation.Text, arguments, inputs); if (outputs[0].Length > 0) MessageBox.Show(this, "Command output: " + outputs[0]); changesMade(); }
private void NewIssue_Click(object sender, EventArgs e) { var detail = new IssueDetail(plugin, Guid.Empty, plugin.creators, plugin.reporters, plugin.assigneds, plugin.authors); if (DialogResult.OK == detail.ShowDialog(this)) writeOutIssue(detail); }
private void editIssue(Guid uuid) { var detail = new IssueDetail(plugin, uuid, plugin.creators, plugin.reporters, plugin.assigneds, plugin.authors); if (DialogResult.OK == detail.ShowDialog(this) && detail.changed) writeOutIssue(detail); }
private void IssuesForm_DragDrop(object sender, DragEventArgs e) { var detail = new IssueDetail(plugin, Guid.Empty, plugin.creators, plugin.reporters, plugin.assigneds, plugin.authors); // Hack the drag/drop load onto event shown detail_Shown_sender = sender; detail_Shown_e = e; detail.Shown += new EventHandler(detail_Shown); if (DialogResult.OK == detail.ShowDialog(this)) writeOutIssue(detail); }
public TemporarySaveFile(IssueDetail form) { uuid_xpath comment = form.commentToUUID.ContainsKey(form.Comments.SelectedNode) ? form.commentToUUID[form.Comments.SelectedNode] : null; var ext = MIMETypesDictionary.ContainsKey(form.DraggableIcon.Items[0].Text) ? MIMETypesDictionary[form.DraggableIcon.Items[0].Text] : "bin"; string tempfilepath = Path.GetTempPath() + "BEurtle"; tempfilename = tempfilepath + @"\comment-" + (comment!=null ? comment.Item1.ToString() : "new") + "." + ext; if (!Directory.Exists(tempfilepath)) Directory.CreateDirectory(tempfilepath); data = new FileStream(tempfilename, FileMode.Create, FileAccess.ReadWrite, FileShare.Delete | FileShare.ReadWrite); form.SaveAsFile(data); data.Seek(0, SeekOrigin.Begin); }