Removed PDF Path and validity checks
Added Validity Check - Procedure Set Path against Config DataPath
This commit is contained in:
parent
f8a73cfefe
commit
2bcd34b76d
@ -118,8 +118,8 @@ namespace DataLoader
|
||||
docver.MyItem = itm;
|
||||
if (convertProcedures) docver.Title = ""; // clearing this tell us this docver (path) was converted?
|
||||
if (!docver.IsSavable) ErrorRpt.ErrorReport(docver);
|
||||
if(frmMain.MySettings.ExecutionMode == ExecutionMode.Debug)
|
||||
docver.DocVersionConfig.Print_PDFLocation = frmMain.MySettings.PDFFolder;
|
||||
//if(frmMain.MySettings.ExecutionMode == ExecutionMode.Debug)
|
||||
// docver.DocVersionConfig.Print_PDFLocation = frmMain.MySettings.PDFFolder;
|
||||
docver.Save();
|
||||
}
|
||||
return TimeSpan.FromTicks(lTime);
|
||||
|
@ -30,7 +30,34 @@ namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
private List<Folder> vlnDataPathFolders() // was vlnDataPath
|
||||
private static List<string> _DataPaths = null;
|
||||
public static List<string> DataPaths
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_DataPaths == null)
|
||||
{
|
||||
_DataPaths = new List<string>();
|
||||
string sCfg = Environment.GetEnvironmentVariable("veconfig");
|
||||
IniReader cfg = new IniReader(sCfg);
|
||||
// Get DataPath
|
||||
string sDP = cfg.ReadString("menu", "DataPath");
|
||||
// Split DataPath into directories
|
||||
// Get the current list of folders so that if it already exists, just get the 'Folder', otherwise
|
||||
// make it. It was done this way because there was no way to get the Folder given a name/Title.
|
||||
foreach (string s1 in sDP.Split(";".ToCharArray()))
|
||||
{
|
||||
if (s1.Length > 0)
|
||||
{
|
||||
string[] s2 = s1.Split(",".ToCharArray());
|
||||
_DataPaths.Add( s2[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Loader._DataPaths;
|
||||
}
|
||||
}
|
||||
public List<Folder> vlnDataPathFolders() // was vlnDataPath
|
||||
{
|
||||
List<Folder> dpf = new List<Folder>();
|
||||
// Get path to config file
|
||||
|
@ -607,8 +607,8 @@ namespace DataLoader
|
||||
if (Properties.Settings.Default["DBPath"].ToString() != "")
|
||||
MySettings.DBPath = Properties.Settings.Default.DBPath;
|
||||
MySettings.PurgeExistingData = (Properties.Settings.Default.PurgeData == CheckState.Checked);
|
||||
if (Properties.Settings.Default["PDFFolder"].ToString() != "")
|
||||
MySettings.PDFFolder = Properties.Settings.Default.PDFFolder;
|
||||
//if (Properties.Settings.Default["PDFFolder"].ToString() != "")
|
||||
// MySettings.PDFFolder = Properties.Settings.Default.PDFFolder;
|
||||
MySettings.OnlyThisSet = (Properties.Settings.Default.OnlyThisSet == CheckState.Checked);
|
||||
MySettings.CheckRTF = (Properties.Settings.Default.CheckRTF == CheckState.Checked);
|
||||
MySettings.Skip = Properties.Settings.Default.Skip;
|
||||
@ -669,7 +669,7 @@ namespace DataLoader
|
||||
Properties.Settings.Default.DBName = MySettings.DBName;
|
||||
Properties.Settings.Default.DBPath = MySettings.DBPath;
|
||||
Properties.Settings.Default.PurgeData = MySettings.PurgeExistingData ? CheckState.Checked : CheckState.Unchecked;
|
||||
Properties.Settings.Default.PDFFolder = MySettings.PDFFolder;
|
||||
//Properties.Settings.Default.PDFFolder = MySettings.PDFFolder;
|
||||
Properties.Settings.Default.OnlyThisSet = MySettings.OnlyThisSet ? CheckState.Checked : CheckState.Unchecked;
|
||||
Properties.Settings.Default.CheckRTF = MySettings.CheckRTF ? CheckState.Checked : CheckState.Unchecked;
|
||||
Properties.Settings.Default.Skip = MySettings.Skip;
|
||||
|
@ -17,6 +17,7 @@ namespace DataLoader
|
||||
get { return _SelectedObject; }
|
||||
set { _SelectedObject = value; }
|
||||
}
|
||||
|
||||
public frmPG(string title, object selectedObject)
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -63,12 +64,12 @@ namespace DataLoader
|
||||
if (dls != null)
|
||||
dls.VESamFile = dls.VEPromsPath + "\\vesam.opt";
|
||||
}
|
||||
if (e.ChangedItem.Label == "Procedure Folder")
|
||||
{
|
||||
DataLoaderSettings dls = SelectedObject as DataLoaderSettings;
|
||||
if (dls != null)
|
||||
dls.PDFFolder = "";
|
||||
}
|
||||
//if (e.ChangedItem.Label == "Procedure Folder")
|
||||
//{
|
||||
// DataLoaderSettings dls = SelectedObject as DataLoaderSettings;
|
||||
// //if (dls != null)
|
||||
// // dls.PDFFolder = "";
|
||||
//}
|
||||
CheckValidity();
|
||||
}
|
||||
void frmPG_Resize(object sender, EventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user