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>2018-05-09 18:07:56 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-09 18:07:56 +0300
commite1236499b485a69648bea4d7871aa185e5dae745 (patch)
tree8cd4ccd7d272c8c4e61d4bd6bcba434eb9522b85 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
parent2a459c79e90a2ade3f1dac1ae4541c0f4d74965c (diff)
downloadTango-e1236499b485a69648bea4d7871aa185e5dae745.tar.gz
Tango-e1236499b485a69648bea4d7871aa185e5dae745.zip
New TemporaryManager !
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.cs24
1 files changed, 12 insertions, 12 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 79572eb71..eb3572728 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
@@ -133,13 +133,13 @@ namespace Tango.MachineStudio.UI.TFS
item.Type = WorkItemType.Bug;
var bitmap = UIHelper.TakeSnapshot(MainWindow.Instance);
- String filePath = PathHelper.GetTempFilePath();
- bitmap.SaveJpeg(filePath, 30);
+ var tempFile = TemporaryManager.CreateFile();
+ bitmap.SaveJpeg(tempFile.Path, 30);
item.Attachments.Add(new Attachment()
{
Description = "Screen Capture",
- FilePath = filePath,
+ FilePath = tempFile.Path,
Name = "Screen Capture.jpg",
});
@@ -156,26 +156,26 @@ namespace Tango.MachineStudio.UI.TFS
if (appFileLogger != null)
{
- String appLogFile = PathHelper.GetTempFilePath();
- File.Copy(appFileLogger.LogFile, appLogFile);
+ var appLogFile = TemporaryManager.CreateFile();
+ File.Copy(appFileLogger.LogFile, appLogFile.Path);
item.Attachments.Add(new Attachment()
{
Description = "Application Log File",
- FilePath = appLogFile,
+ FilePath = appLogFile.Path,
Name = Path.GetFileName(appFileLogger.LogFile),
});
}
if (embeddedFileLogger != null && File.Exists(embeddedFileLogger.LogFile))
{
- String embeddedLogFile = PathHelper.GetTempFilePath();
- File.Copy(appFileLogger.LogFile, embeddedLogFile);
+ var embeddedLogFile = TemporaryManager.CreateFile();
+ File.Copy(appFileLogger.LogFile, embeddedLogFile.Path);
item.Attachments.Add(new Attachment()
{
Description = "Embedded Log File",
- FilePath = embeddedLogFile,
+ FilePath = embeddedLogFile.Path,
Name = Path.GetFileName(embeddedFileLogger.LogFile),
});
}
@@ -201,13 +201,13 @@ namespace Tango.MachineStudio.UI.TFS
machineView.Background = System.Windows.Media.Brushes.White;
machineView.DataContext = new MachineDesigner.ViewModels.MainViewVM() { SelectedMachine = machine, Configuration = machine.Configuration };
- String configImageFile = PathHelper.GetTempFilePath();
- machineView.RenderToFile(configImageFile, System.Drawing.Imaging.ImageFormat.Jpeg, new Size(machineView.Width, machineView.Height), 100);
+ var configImageFile = TemporaryManager.CreateFile();
+ machineView.RenderToFile(configImageFile.Path, System.Drawing.Imaging.ImageFormat.Jpeg, new Size(machineView.Width, machineView.Height), 100);
item.Attachments.Add(new Attachment()
{
Description = "Machine Configuration",
- FilePath = configImageFile,
+ FilePath = configImageFile.Path,
Name = "Machine Configuration.jpg"
});