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;
|
docver.MyItem = itm;
|
||||||
if (convertProcedures) docver.Title = ""; // clearing this tell us this docver (path) was converted?
|
if (convertProcedures) docver.Title = ""; // clearing this tell us this docver (path) was converted?
|
||||||
if (!docver.IsSavable) ErrorRpt.ErrorReport(docver);
|
if (!docver.IsSavable) ErrorRpt.ErrorReport(docver);
|
||||||
if(frmMain.MySettings.ExecutionMode == ExecutionMode.Debug)
|
//if(frmMain.MySettings.ExecutionMode == ExecutionMode.Debug)
|
||||||
docver.DocVersionConfig.Print_PDFLocation = frmMain.MySettings.PDFFolder;
|
// docver.DocVersionConfig.Print_PDFLocation = frmMain.MySettings.PDFFolder;
|
||||||
docver.Save();
|
docver.Save();
|
||||||
}
|
}
|
||||||
return TimeSpan.FromTicks(lTime);
|
return TimeSpan.FromTicks(lTime);
|
||||||
|
@ -30,7 +30,34 @@ namespace DataLoader
|
|||||||
{
|
{
|
||||||
public partial class Loader
|
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>();
|
List<Folder> dpf = new List<Folder>();
|
||||||
// Get path to config file
|
// Get path to config file
|
||||||
|
@ -607,8 +607,8 @@ namespace DataLoader
|
|||||||
if (Properties.Settings.Default["DBPath"].ToString() != "")
|
if (Properties.Settings.Default["DBPath"].ToString() != "")
|
||||||
MySettings.DBPath = Properties.Settings.Default.DBPath;
|
MySettings.DBPath = Properties.Settings.Default.DBPath;
|
||||||
MySettings.PurgeExistingData = (Properties.Settings.Default.PurgeData == CheckState.Checked);
|
MySettings.PurgeExistingData = (Properties.Settings.Default.PurgeData == CheckState.Checked);
|
||||||
if (Properties.Settings.Default["PDFFolder"].ToString() != "")
|
//if (Properties.Settings.Default["PDFFolder"].ToString() != "")
|
||||||
MySettings.PDFFolder = Properties.Settings.Default.PDFFolder;
|
// MySettings.PDFFolder = Properties.Settings.Default.PDFFolder;
|
||||||
MySettings.OnlyThisSet = (Properties.Settings.Default.OnlyThisSet == CheckState.Checked);
|
MySettings.OnlyThisSet = (Properties.Settings.Default.OnlyThisSet == CheckState.Checked);
|
||||||
MySettings.CheckRTF = (Properties.Settings.Default.CheckRTF == CheckState.Checked);
|
MySettings.CheckRTF = (Properties.Settings.Default.CheckRTF == CheckState.Checked);
|
||||||
MySettings.Skip = Properties.Settings.Default.Skip;
|
MySettings.Skip = Properties.Settings.Default.Skip;
|
||||||
@ -669,7 +669,7 @@ namespace DataLoader
|
|||||||
Properties.Settings.Default.DBName = MySettings.DBName;
|
Properties.Settings.Default.DBName = MySettings.DBName;
|
||||||
Properties.Settings.Default.DBPath = MySettings.DBPath;
|
Properties.Settings.Default.DBPath = MySettings.DBPath;
|
||||||
Properties.Settings.Default.PurgeData = MySettings.PurgeExistingData ? CheckState.Checked : CheckState.Unchecked;
|
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.OnlyThisSet = MySettings.OnlyThisSet ? CheckState.Checked : CheckState.Unchecked;
|
||||||
Properties.Settings.Default.CheckRTF = MySettings.CheckRTF ? CheckState.Checked : CheckState.Unchecked;
|
Properties.Settings.Default.CheckRTF = MySettings.CheckRTF ? CheckState.Checked : CheckState.Unchecked;
|
||||||
Properties.Settings.Default.Skip = MySettings.Skip;
|
Properties.Settings.Default.Skip = MySettings.Skip;
|
||||||
|
@ -17,6 +17,7 @@ namespace DataLoader
|
|||||||
get { return _SelectedObject; }
|
get { return _SelectedObject; }
|
||||||
set { _SelectedObject = value; }
|
set { _SelectedObject = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public frmPG(string title, object selectedObject)
|
public frmPG(string title, object selectedObject)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -63,12 +64,12 @@ namespace DataLoader
|
|||||||
if (dls != null)
|
if (dls != null)
|
||||||
dls.VESamFile = dls.VEPromsPath + "\\vesam.opt";
|
dls.VESamFile = dls.VEPromsPath + "\\vesam.opt";
|
||||||
}
|
}
|
||||||
if (e.ChangedItem.Label == "Procedure Folder")
|
//if (e.ChangedItem.Label == "Procedure Folder")
|
||||||
{
|
//{
|
||||||
DataLoaderSettings dls = SelectedObject as DataLoaderSettings;
|
// DataLoaderSettings dls = SelectedObject as DataLoaderSettings;
|
||||||
if (dls != null)
|
// //if (dls != null)
|
||||||
dls.PDFFolder = "";
|
// // dls.PDFFolder = "";
|
||||||
}
|
//}
|
||||||
CheckValidity();
|
CheckValidity();
|
||||||
}
|
}
|
||||||
void frmPG_Resize(object sender, EventArgs e)
|
void frmPG_Resize(object sender, EventArgs e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user