aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-16 15:13:55 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-16 15:13:55 +0200
commit92c52918e13dbbaf2a658945c349a6d04c29aa81 (patch)
tree82967e8201bcf009c8a51ea2284a759fae3fd69b /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
parente87626ffc0298426d8242c2453a6992d94f38e1f (diff)
downloadTango-92c52918e13dbbaf2a658945c349a6d04c29aa81.tar.gz
Tango-92c52918e13dbbaf2a658945c349a6d04c29aa81.zip
Added custom image support for bug reporting.
Fixed issue with dispensers filter search.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs31
1 files changed, 18 insertions, 13 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
index addd2f4fb..df831afb9 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
@@ -159,22 +159,27 @@ namespace Tango.MachineStudio.UI.TFS
item.State = State.New;
item.Type = WorkItemType.Bug;
- var bitmap = UIHelper.TakeSnapshot(MainWindow.Instance);
-
- if (!_tempFolder.Exists())
+ foreach (var window in Application.Current.Windows.OfType<Window>().Where(x => !String.IsNullOrWhiteSpace(x.Title)))
{
- _tempFolder = TemporaryManager.CreateFolder();
- }
+ var bitmap = UIHelper.TakeSnapshot(window);
- var tempFile = _tempFolder.CreateFile();
- bitmap.SaveJpeg(tempFile.Path, 30);
+ if (!_tempFolder.Exists())
+ {
+ _tempFolder = TemporaryManager.CreateFolder();
+ }
- item.Attachments.Add(new Attachment()
- {
- Description = "Screen Capture",
- FilePath = tempFile.Path,
- Name = "Screen Capture.jpg",
- });
+ var tempFile = _tempFolder.CreateFile();
+ bitmap.SaveJpeg(tempFile.Path, 30);
+
+ String title = window.Title;
+
+ item.Attachments.Add(new Attachment()
+ {
+ Description = title + " Screen Capture",
+ FilePath = tempFile.Path,
+ Name = $"{title}.jpg",
+ });
+ }
return item;
}