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:
parent
ed896b70c1
commit
31b5ba8c7b
@ -137,6 +137,9 @@
|
||||
<setting name="LastVersion" serializeAs="String">
|
||||
<value>0.0</value>
|
||||
</setting>
|
||||
<setting name="FormatPath" serializeAs="String">
|
||||
<value>C:\Development</value>
|
||||
</setting>
|
||||
</VEPROMS.Properties.Settings>
|
||||
<UISampleNetBar1.Properties.Settings>
|
||||
<setting name="ShowDefaultFolderProp" serializeAs="String">
|
||||
|
@ -267,5 +267,17 @@ namespace VEPROMS.Properties {
|
||||
this["LastVersion"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("C:\\Development")]
|
||||
public string FormatPath {
|
||||
get {
|
||||
return ((string)(this["FormatPath"]));
|
||||
}
|
||||
set {
|
||||
this["FormatPath"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -65,5 +65,8 @@
|
||||
<Setting Name="LastVersion" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">0.0</Value>
|
||||
</Setting>
|
||||
<Setting Name="FormatPath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">C:\Development</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@ -114,6 +114,7 @@ namespace VEPROMS
|
||||
this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
|
||||
this.itemAnnotationsBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.tc = new Volian.Controls.Library.DisplayTabControl();
|
||||
this.fbd = new System.Windows.Forms.FolderBrowserDialog();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bottomBar)).BeginInit();
|
||||
this.bottomBar.SuspendLayout();
|
||||
this.epAnnotations.SuspendLayout();
|
||||
@ -1434,6 +1435,7 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.TabItem infotabHistory;
|
||||
private Volian.Controls.Library.DisplayHistory displayHistory;
|
||||
private DevComponents.DotNetBar.ButtonItem btnUpdateFormats;
|
||||
private System.Windows.Forms.FolderBrowserDialog fbd;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user