aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-01 16:28:19 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-01 16:28:19 +0300
commitd5adb83c9487cd7198500a1e46933ca27a3411af (patch)
treea9ef2e628a1e30dbb5a6927b31d4c0d9945db2fb /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent00cfb0906e164487efed62bd6a65cdf681952bd1 (diff)
downloadTango-d5adb83c9487cd7198500a1e46933ca27a3411af.tar.gz
Tango-d5adb83c9487cd7198500a1e46933ca27a3411af.zip
Fixed issue with machine studio bug reporting.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs13
1 files changed, 9 insertions, 4 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 3dbee402b..d81a78a93 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
@@ -10,6 +10,7 @@ using System.Windows;
using Tango.BL.Entities;
using Tango.Core.DI;
using Tango.Core.Helpers;
+using Tango.Core.IO;
using Tango.Integration.Operation;
using Tango.Logging;
using Tango.MachineStudio.Common.Authentication;
@@ -21,6 +22,8 @@ namespace Tango.MachineStudio.UI.TFS
{
public class TeamFoundationServiceExtendedClient : TeamFoundationServiceClient
{
+ private TemporaryFolder _tempFolder;
+
public Project Project { get; private set; }
private ObservableCollection<WorkItem> _resolvedWorkItems;
@@ -39,6 +42,8 @@ namespace Tango.MachineStudio.UI.TFS
public TeamFoundationServiceExtendedClient(string collectionURL, string userName, string personalToken) : base(collectionURL, userName, personalToken)
{
+ _tempFolder = TemporaryManager.CreateFolder();
+
ResolvedWorkItems = new ObservableCollection<WorkItem>();
TangoIOC.Default.GetInstance<IAuthenticationProvider>().CurrentUserChanged += TeamFoundationServiceExtendedClient_CurrentUserChanged;
}
@@ -136,7 +141,7 @@ namespace Tango.MachineStudio.UI.TFS
item.Type = WorkItemType.Bug;
var bitmap = UIHelper.TakeSnapshot(MainWindow.Instance);
- var tempFile = TemporaryManager.CreateFile();
+ var tempFile = _tempFolder.CreateFile();
bitmap.SaveJpeg(tempFile.Path, 30);
item.Attachments.Add(new Attachment()
@@ -159,7 +164,7 @@ namespace Tango.MachineStudio.UI.TFS
if (appFileLogger != null)
{
- var appLogFile = TemporaryManager.CreateFile();
+ var appLogFile = _tempFolder.CreateImaginaryFile();
File.Copy(appFileLogger.LogFile, appLogFile.Path);
item.Attachments.Add(new Attachment()
@@ -172,7 +177,7 @@ namespace Tango.MachineStudio.UI.TFS
if (embeddedFileLogger != null && File.Exists(embeddedFileLogger.LogFile))
{
- var embeddedLogFile = TemporaryManager.CreateFile();
+ var embeddedLogFile = _tempFolder.CreateImaginaryFile();
File.Copy(appFileLogger.LogFile, embeddedLogFile.Path);
item.Attachments.Add(new Attachment()
@@ -204,7 +209,7 @@ namespace Tango.MachineStudio.UI.TFS
machineView.Background = System.Windows.Media.Brushes.White;
machineView.DataContext = new MachineDesigner.ViewModels.MainViewVM() { SelectedMachine = machine, Configuration = machine.Configuration };
- var configImageFile = TemporaryManager.CreateFile();
+ var configImageFile = _tempFolder.CreateImaginaryFile();
machineView.RenderToFile(configImageFile.Path, System.Drawing.Imaging.ImageFormat.Jpeg, new Size(machineView.Width, machineView.Height), 100);
item.Attachments.Add(new Attachment()