Fix Siemens HN Behaviour
This commit is contained in:
@@ -151,8 +151,15 @@ namespace CMS_Client.Browser_Tools
|
||||
if (val < 0 || val > (NcWindow.NcWindowCommand.Count - 1))
|
||||
return;
|
||||
|
||||
NcWindow.SendCommandKey(NcWindow.NcWindowCommand[val]);
|
||||
|
||||
NcWindow.SendCommandKey(NcWindow.NcWindowCommand[val]);
|
||||
|
||||
if (NcWindow.State == NcState.SHOW)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
mainForm.HideNCWindow();
|
||||
mainForm.ShowNCWindow();
|
||||
NcWindow.ActivateNcWindow();
|
||||
}
|
||||
}
|
||||
|
||||
//Get command vounts to HMI
|
||||
|
||||
+19
-16
@@ -87,14 +87,17 @@ namespace CMS_Client.View
|
||||
if (this.WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
NcWindow.ShowTaskBar();
|
||||
if (Config.VendorHmiConfig.Enabled)
|
||||
NcFrm.Hide();
|
||||
//if (Config.VendorHmiConfig.Enabled)
|
||||
//NcFrm.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
NcWindow.ShowNcWindow();
|
||||
if (Config.VendorHmiConfig.Enabled)
|
||||
NcFrm.Show();
|
||||
if (Config.VendorHmiConfig.Enabled)
|
||||
{
|
||||
HideNCWindow();
|
||||
ShowNCWindow();
|
||||
}
|
||||
}
|
||||
|
||||
//Refresh Browser Paint
|
||||
@@ -515,9 +518,9 @@ namespace CMS_Client.View
|
||||
{
|
||||
this.Owner = null;
|
||||
this.NcFrm.Owner = this;
|
||||
this.NcFrm.TopMost = true;
|
||||
this.NcFrm.TopMost = false;
|
||||
}
|
||||
}
|
||||
this.NcFrm.TopMost = true;
|
||||
this.NcFrm.TopMost = false;
|
||||
});
|
||||
|
||||
else
|
||||
@@ -526,9 +529,9 @@ namespace CMS_Client.View
|
||||
{
|
||||
this.Owner = null;
|
||||
this.NcFrm.Owner = this;
|
||||
this.NcFrm.TopMost = true;
|
||||
this.NcFrm.TopMost = false;
|
||||
}
|
||||
}
|
||||
this.NcFrm.TopMost = true;
|
||||
this.NcFrm.TopMost = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -551,9 +554,9 @@ namespace CMS_Client.View
|
||||
if (this.NcFrm.Owner != null)
|
||||
{
|
||||
this.NcFrm.Owner = null;
|
||||
this.TopMost = true;
|
||||
this.TopMost = false;
|
||||
}
|
||||
}
|
||||
this.TopMost = true;
|
||||
this.TopMost = false;
|
||||
});
|
||||
|
||||
else
|
||||
@@ -561,9 +564,9 @@ namespace CMS_Client.View
|
||||
if (this.NcFrm.Owner != null)
|
||||
{
|
||||
this.NcFrm.Owner = null;
|
||||
this.TopMost = true;
|
||||
this.TopMost = false;
|
||||
}
|
||||
}
|
||||
this.TopMost = true;
|
||||
this.TopMost = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -524,6 +524,11 @@ namespace CMS_Client.View
|
||||
SendKeys.SendWait(CMD);
|
||||
}
|
||||
}
|
||||
public static void ActivateNcWindow()
|
||||
{
|
||||
SetForegroundWindow(ncprocess.MainWindowHandle);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user