Fix Application Icons & Names
This commit is contained in:
@@ -15,8 +15,6 @@ namespace Step.UI
|
||||
{
|
||||
public partial class ServerControlWindow : MetroFramework.Forms.MetroForm
|
||||
{
|
||||
private String HomePageUI;
|
||||
private String TestJSPageUI;
|
||||
private bool ncStatus = false;
|
||||
private bool isUpdatingThreads = false;
|
||||
private List<RegistrationInfo> MVVMListeners;
|
||||
@@ -34,8 +32,6 @@ namespace Step.UI
|
||||
//End the update
|
||||
LISTThreadStatus.EndUpdate();
|
||||
|
||||
HomePageUI = "http://localhost:" + ServerStartupConfig.ServerPort.ToString() + "/index.html";
|
||||
TestJSPageUI = "http://localhost:" + ServerStartupConfig.ServerPort.ToString() + "/Testjavascript//index.html";
|
||||
TXTType.Text = NcConfig.NcVendor;
|
||||
|
||||
InitializeMessageListeners();
|
||||
@@ -43,7 +39,8 @@ namespace Step.UI
|
||||
MessageServices.Current.Subscribe(SHOW_MSG_UI, (a, b) =>
|
||||
{
|
||||
Invoke((MethodInvoker)delegate () { Focus(); MessageBox.Show(a.ToString()); });
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private static ServerControlWindow ctrlwindow = null;
|
||||
@@ -119,22 +116,19 @@ namespace Step.UI
|
||||
{
|
||||
//Setup the Path Variable
|
||||
String CMSClientPath = "";
|
||||
if (ClientIsRunning())
|
||||
return;
|
||||
|
||||
//Check if the system is 64/32 bit
|
||||
if (Environment.Is64BitOperatingSystem && File.Exists(BASE_PATH + @"\Client\x64\CMS_Client.exe"))
|
||||
CMSClientPath = BASE_PATH + @"\Client\x64\CMS_Client.exe";
|
||||
else if (File.Exists(BASE_PATH + @"\Client\x86\CMS_Client.exe"))
|
||||
CMSClientPath = BASE_PATH + @"\Client\x86\CMS_Client.exe";
|
||||
if (Environment.Is64BitOperatingSystem && File.Exists(BASE_PATH + @"\Client\x64\" + CLIENT_EXE_NAME))
|
||||
CMSClientPath = BASE_PATH + @"\Client\x64\" + CLIENT_EXE_NAME;
|
||||
else if (File.Exists(BASE_PATH + @"\Client\x86\" + CLIENT_EXE_NAME))
|
||||
CMSClientPath = BASE_PATH + @"\Client\x86\" + CLIENT_EXE_NAME;
|
||||
|
||||
if (!String.IsNullOrEmpty(CMSClientPath))
|
||||
Process.Start(CMSClientPath, url);
|
||||
else
|
||||
MessageBox.Show("CMS_Client.Exe not found");
|
||||
}
|
||||
|
||||
private void TestJSButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
StartCMSClient(TestJSPageUI);
|
||||
MessageBox.Show("CMS-Active Client not found");
|
||||
}
|
||||
|
||||
private void InitializeMessageListeners()
|
||||
@@ -190,7 +184,7 @@ namespace Step.UI
|
||||
if (!IsDisposed)
|
||||
Invoke((MethodInvoker)delegate ()
|
||||
{
|
||||
StepNotifyIcon.Icon = Properties.Resources.Step_Icon;
|
||||
StepNotifyIcon.Icon = Properties.Resources.CMS_Icon;
|
||||
});
|
||||
|
||||
//Other type
|
||||
@@ -226,5 +220,13 @@ namespace Step.UI
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
private static bool ClientIsRunning()
|
||||
{
|
||||
Process[] p = Process.GetProcessesByName(CLIENT_EXE_NAME_NOEXT);
|
||||
if (p.Length>0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user