It is possible to run the 2nd instance of TBF program in off-line mode, ver. 2.9.339

This commit is contained in:
Milan Hanajik 2016-08-18 11:38:14 +02:00
parent 83ddb7c8bf
commit f696d20060
2 changed files with 14 additions and 11 deletions

View File

@ -66,14 +66,6 @@ namespace TBF
Version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
BuildDateTime = new System.IO.FileInfo(thisAssembly.Location).LastWriteTime;
/// Check if another instance is running
string processName = System.IO.Path.GetFileNameWithoutExtension(thisAssembly.Location);
if (System.Diagnostics.Process.GetProcessesByName(processName).Length > 1)
{
MessageBox.Show(Strings.Another_instance_is_running, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
/// Local program configuration directory including the trailing backslash
string locAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) +
Path.DirectorySeparatorChar + "TestBenchFramework" + Path.DirectorySeparatorChar;
@ -236,7 +228,18 @@ namespace TBF
if (authorized)
{
log.InfoFormat("Password accepted, bench '{0}' parameters loaded.",
if (LocalSettings.TestBenches[i].IsRealBench)
{
/// This is a real bench ==> check if another instance is running
string processName = System.IO.Path.GetFileNameWithoutExtension(thisAssembly.Location);
if (System.Diagnostics.Process.GetProcessesByName(processName).Length > 1)
{
MessageBox.Show(Strings.Another_instance_is_running, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
}
log.InfoFormat("Password accepted, bench '{0}' parameters loaded.",
LocalSettings.TestBenches[i].BenchName);
/// Copy the selected bench settings to CurrentBench.

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.9.337.1")]
[assembly: AssemblyFileVersion("2.9.337.1")]
[assembly: AssemblyVersion("2.9.339.1")]
[assembly: AssemblyFileVersion("2.9.339.1")]