2010-08-12 16:01:34 +00:00

55 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace Volian.Base.Library
{
public static class VlnSettings
{
// This is used to toggle the colored text during the Data Conversion
// and will set the font and background in PROMS 2010 for Demo/Release mode (white background black text)
// or for Debug mode (shaded background, and color text on PDF output
// For PROMS 2010, this is set via the App.config setting:
// <appSettings>
// <add key ="Debug" value ="false"/>
// For DataLoader, this is set via the Debug checkbox on the form.
private static bool _DebugMode = true;
public static bool DebugMode
{
get { return _DebugMode; }
set { _DebugMode = value; }
}
private static string _TemporaryFolder = null;
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;
}
}
// used for Debug mode (at least for now)
// this is where the PDF 16-bit VE-PROMS output is placed and merge (via layers) into the PROMS 2010 PDF Output
private static string _OldPDFFolder = @"C:\Temp\16bit";
public static string OldPDFFolder
{
get { return VlnSettings._OldPDFFolder; }
set { VlnSettings._OldPDFFolder = value; }
}
}
}