Added logic so that FormatUpdate doesn’t work in production mode
Added Folder Browser to select Format Folder Added FormatFolder setting to update formats
This commit is contained in:
@@ -436,6 +436,9 @@ namespace VEPROMS
|
||||
}
|
||||
else
|
||||
RunAutomatic();
|
||||
// Shutoff UpdateFormats for Production Mode
|
||||
if (Volian.Base.Library.VlnSettings.ProductionMode)
|
||||
btnAdmin.Visible = false;
|
||||
}
|
||||
void tmrShutDown_Tick(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1787,9 +1790,23 @@ namespace VEPROMS
|
||||
}
|
||||
private void btnUpdateFormat_Click(object sender, EventArgs e)
|
||||
{
|
||||
string appPath = Application.ExecutablePath;
|
||||
FileInfo fi = new FileInfo(appPath);
|
||||
DirectoryInfo di = fi.Directory.Parent.Parent.Parent.Parent;
|
||||
DirectoryInfo di = new DirectoryInfo(Properties.Settings.Default.FormatPath);
|
||||
if (!di.Exists || !File.Exists(di.FullName + @"\fmtall") || !File.Exists(di.FullName + @"\genmacall"))
|
||||
{
|
||||
while (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall"))
|
||||
{
|
||||
fbd.Description = "Select folder containing FmtAll and GenMacAll folders to update formats";
|
||||
DialogResult dr = fbd.ShowDialog();
|
||||
if (dr == DialogResult.Cancel)
|
||||
{
|
||||
bottomProgBar.Text = "Format Update Cancelled";
|
||||
return;
|
||||
}
|
||||
di = new DirectoryInfo(fbd.SelectedPath);
|
||||
}
|
||||
Properties.Settings.Default.FormatPath = fbd.SelectedPath;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
string fmtPath = di.FullName + @"\fmtall";
|
||||
string genmacPath = di.FullName + @"\genmacall";
|
||||
Format.FormatLoaded += new FormatEvent(Format_FormatLoaded);
|
||||
|
Reference in New Issue
Block a user