|
@@ -45,7 +45,7 @@ namespace OTSMeasureApp
|
|
|
|
|
|
public partial class OTSIncAMeasureAppForm : Form
|
|
|
{
|
|
|
- Thread th = new Thread(new ThreadStart(DoSplash));
|
|
|
+ Thread th ;
|
|
|
public static string m_SamplespaceWindowName = "样品台";
|
|
|
public static string m_MeasureStauWindowName = "测量状态";
|
|
|
public static string m_MeasureRetWindowName = "测量结果";
|
|
@@ -101,10 +101,13 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
|
|
|
public FileSystemWatcher fileWatcher = new FileSystemWatcher(Application.StartupPath+ @"\Config\SysData");
|
|
|
+ Form sp;
|
|
|
+
|
|
|
public OTSIncAMeasureAppForm()
|
|
|
{
|
|
|
-
|
|
|
+ th = new Thread(new ThreadStart(DoSplash));
|
|
|
th.Start();
|
|
|
+
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
@@ -167,8 +170,8 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
|
|
|
+
|
|
|
ArrangWorkspaceWindow();
|
|
|
|
|
|
log = NLog.LogManager.GetCurrentClassLogger();
|
|
@@ -236,7 +239,8 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
log.Error(" OTSIncAMeasureAppForm_Load:" + ex.ToString());
|
|
|
}
|
|
|
- th.Abort();
|
|
|
+
|
|
|
+ sp.Close();
|
|
|
this.Activate();
|
|
|
}
|
|
|
public void ArrangWorkspaceWindow()
|
|
@@ -264,10 +268,9 @@ namespace OTSMeasureApp
|
|
|
|
|
|
|
|
|
}
|
|
|
- static private void DoSplash()
|
|
|
+ private void DoSplash()
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
+
|
|
|
string path = @".\Config\SysData\OTSProgMgrParam.pmf";
|
|
|
XmlDocument xmlDocument = new XmlDocument();
|
|
|
xmlDocument.Load(path);
|
|
@@ -276,19 +279,15 @@ namespace OTSMeasureApp
|
|
|
string str = xe.GetAttribute("SysType");
|
|
|
if (str == "IncA")
|
|
|
{
|
|
|
- OTSSplashScreen_IncA sp = new OTSSplashScreen_IncA();
|
|
|
- sp.ShowDialog();
|
|
|
+ sp = new OTSSplashScreen_IncA();
|
|
|
+ sp.ShowDialog();
|
|
|
}
|
|
|
else if (str == "CleannessA")
|
|
|
{
|
|
|
- OTSSplashScreen_Cleanness sp = new OTSSplashScreen_Cleanness();
|
|
|
- sp.ShowDialog();
|
|
|
+ sp = new OTSSplashScreen_Cleanness();
|
|
|
+ sp.ShowDialog();
|
|
|
}
|
|
|
- }
|
|
|
- catch (ThreadAbortException)
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void rbReport_Click(object sender, EventArgs e)
|