This commit is contained in:
2010-08-12 16:05:52 +00:00
parent f91459b9f0
commit 0849b002b4
18 changed files with 231 additions and 212 deletions

View File

@@ -6,6 +6,7 @@ using System.Data.SqlClient;
using Csla;
using Csla.Data;
using System.IO;
using Volian.Base.Library;
namespace VEPROMS.CSLA.Library
{
@@ -88,26 +89,9 @@ namespace VEPROMS.CSLA.Library
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
#region Fields
private bool _IsDisposed;
private static string _TemporaryFolder = null;
//private static string _TemporaryFolder = null;
#endregion
#region Properties
public static string TemporaryFolder
{
get
{
if (_TemporaryFolder == null)
{
// This will create a Temp\VE-PROMS folder in the LocalSettings Folder.
//XP - C:\Documents and Settings\{user}\Local Settings\Application Data\Temp\VE-PROMS
//Vista - C:\Users\{user}\AppData\Local\Temp\VE-PROMS
_TemporaryFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Temp";
if (!Directory.Exists(TemporaryFolder)) Directory.CreateDirectory(TemporaryFolder);
_TemporaryFolder += @"\VE-PROMS";
if (!Directory.Exists(TemporaryFolder)) Directory.CreateDirectory(TemporaryFolder);
}
return _TemporaryFolder;
}
}
private ROImageInfo _MyROImage = null;
public ROImageInfo MyROImage
{
@@ -177,7 +161,7 @@ namespace VEPROMS.CSLA.Library
{
if (_MyROImage != null)
{
_MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}{2}", TemporaryFolder, Unique, MyROImage.FileName));
_MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}{2}", VlnSettings.TemporaryFolder, Unique, MyROImage.FileName));
FileStream fs = _MyFile.Create();
fs.Write(MyROImage.Content, 0, MyROImage.Content.Length);
fs.Close();