364 lines
13 KiB
C#
364 lines
13 KiB
C#
using SafeMobileLib;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using Telerik.WinControls;
|
|
|
|
namespace SetupProj
|
|
{
|
|
public partial class StatusForm : Telerik.WinControls.UI.RadForm
|
|
{
|
|
|
|
public StatusForm(bool install,int sd, int gw, int sum, int upd,int app,int db,int appMobile,int tcpServer,int tcpClient)
|
|
{
|
|
InitializeComponent();
|
|
switch (MainForm.radioType)
|
|
{
|
|
case RADIOTYPE.HYT:
|
|
this.radLabel1.Text = "SafeSyt:";
|
|
this.BackColor = Color.Moccasin;
|
|
break;
|
|
case RADIOTYPE.HARRIS:
|
|
this.radLabel1.Text = MainForm.AppNAME+":";
|
|
this.BackColor = MainForm.HarrisColor;
|
|
lbAPP.ForeColor = MainForm.HarTextColor;
|
|
lbDB.ForeColor = MainForm.HarTextColor;
|
|
lbGW.ForeColor = MainForm.HarTextColor;
|
|
lbSD.ForeColor = MainForm.HarTextColor;
|
|
lbSUM.ForeColor = MainForm.HarTextColor;
|
|
lbUpd.ForeColor = MainForm.HarTextColor;
|
|
break;
|
|
case RADIOTYPE.ATLAS:
|
|
this.radLabel1.Text = MainForm.AppNAME + ":";
|
|
this.BackColor = MainForm.HarrisColor;
|
|
lbAPP.ForeColor = Color.LightGreen;
|
|
lbDB.ForeColor = Color.LightGreen;
|
|
lbGW.ForeColor = Color.LightGreen;
|
|
lbSD.ForeColor = Color.LightGreen;
|
|
lbSUM.ForeColor = Color.LightGreen;
|
|
lbUpd.ForeColor = Color.LightGreen;
|
|
break;
|
|
case RADIOTYPE.SIMOCO:
|
|
this.radLabel1.Text = MainForm.AppNAME + ":";
|
|
break;
|
|
}
|
|
|
|
if (install)
|
|
{
|
|
if (sd == 1)
|
|
{
|
|
lbSD.Text = MainForm.AppNAME+" installed successfully!";
|
|
lbSD.ForeColor = Color.Green;
|
|
}
|
|
else if (sd == 0)
|
|
{
|
|
lbSD.Text = "Error installing " + MainForm.AppNAME;
|
|
lbSD.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbSD.Text = MainForm.AppNAME+" installation not required!";
|
|
}
|
|
|
|
if (gw == 1)
|
|
{
|
|
lbGW.Text = "Gateway installed successfully!";
|
|
lbGW.ForeColor = Color.Green;
|
|
}
|
|
else if (gw == 0)
|
|
{
|
|
lbGW.Text = "Error installing Gateway";
|
|
lbGW.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbGW.Text = "Gateway installation not required!";
|
|
}
|
|
|
|
if (sum == 1)
|
|
{
|
|
lbSUM.Text = "Administrative module installed successfully!";
|
|
lbSUM.ForeColor = Color.Green;
|
|
}
|
|
else if (sum == 0)
|
|
{
|
|
lbSUM.Text = "Error installing Administrative module.";
|
|
lbSUM.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbSUM.Text = "Administrative module installation not required!";
|
|
}
|
|
|
|
if (db == 1)
|
|
{
|
|
lbDB.Text = "Database installed successfully!";
|
|
lbDB.ForeColor = Color.Green;
|
|
}
|
|
else if (db == 0)
|
|
{
|
|
lbDB.Text = "Error installing Database.";
|
|
lbDB.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbDB.Text = "Database installation not required!";
|
|
}
|
|
|
|
if (app == 1)
|
|
{
|
|
lbAPP.Text = "Application server installed successfully!";
|
|
lbAPP.ForeColor = Color.Green;
|
|
}
|
|
else if (app == 0)
|
|
{
|
|
lbAPP.Text = "Error installing Application server.";
|
|
lbAPP.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbAPP.Text = "Application server installation not required!";
|
|
}
|
|
|
|
if (upd == 1)
|
|
{
|
|
lbUpd.Text = "Updater installed successfully!";
|
|
lbUpd.ForeColor = Color.Green;
|
|
}
|
|
else if (upd == 0)
|
|
{
|
|
lbUpd.Text = "Error installing Updater.";
|
|
lbUpd.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbUpd.Text = "Updater installation not required!";
|
|
}
|
|
|
|
if (MainForm.AdvanceSettings)
|
|
{
|
|
//if (MainForm.radioType == RADIOTYPE.SIMOCO)
|
|
//{
|
|
lbAPPMobile.Visible = false;
|
|
lbAppMobtext.Visible = false;
|
|
//}
|
|
//else
|
|
//{
|
|
// lbAPPMobile.Visible = true;
|
|
// lbAppMobtext.Visible = true;
|
|
//}
|
|
|
|
//if (appMobile == 1)
|
|
//{
|
|
// lbAPPMobile.Text = "Application server mobile installed successfully!";
|
|
// lbAPPMobile.ForeColor = Color.Green;
|
|
//}
|
|
//else if (appMobile == 0)
|
|
//{
|
|
// lbAPPMobile.Text = "Error installing Application server mobile.";
|
|
// lbAPPMobile.ForeColor = Color.Red;
|
|
//}
|
|
//else
|
|
//{
|
|
// lbAPPMobile.Text = "Application server mobile installation not required!";
|
|
//}
|
|
|
|
lbTCPServer.Visible = true;
|
|
lbTCPServerText.Visible = true;
|
|
if (tcpServer == 1)
|
|
{
|
|
lbTCPServer.Text = "TCP Server installed successfully!";
|
|
lbTCPServer.ForeColor = Color.Green;
|
|
}
|
|
else if (tcpServer == 0)
|
|
{
|
|
lbTCPServer.Text = "Error installing TCP Server.";
|
|
lbTCPServer.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbTCPServer.Text = "TCP Server installation not required!";
|
|
}
|
|
|
|
lbTCPClient.Visible = true;
|
|
lbTCPClientText.Visible = true;
|
|
if (tcpClient == 1)
|
|
{
|
|
lbTCPClient.Text = "TCP Client installed successfully!";
|
|
lbTCPClient.ForeColor = Color.Green;
|
|
}
|
|
else if (tcpClient == 0)
|
|
{
|
|
lbTCPClient.Text = "Error installing TCP Client.";
|
|
lbTCPClient.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbTCPClient.Text = "TCP Client installation not required!";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
gbStatus.Text = "Uninstalling status";
|
|
|
|
if (sd == 1)
|
|
{
|
|
lbSD.Text = MainForm.AppNAME+" uninstalled successfully!";
|
|
lbSD.ForeColor = Color.Green;
|
|
}
|
|
else if (sd == 0)
|
|
{
|
|
lbSD.Text = "Error uninstalled "+MainForm.AppNAME;
|
|
lbSD.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbSD.Text = MainForm.AppNAME+" uninstalled not required!";
|
|
}
|
|
|
|
if (gw == 1)
|
|
{
|
|
lbGW.Text = "Gateway uninstalled successfully!";
|
|
lbGW.ForeColor = Color.Green;
|
|
}
|
|
else if (gw == 0)
|
|
{
|
|
lbGW.Text = "Error uninstalled Gateway";
|
|
lbGW.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbGW.Text = "Gateway uninstalled not required!";
|
|
}
|
|
|
|
if (sum == 1)
|
|
{
|
|
lbSUM.Text = "Administrative module uninstalled successfully!";
|
|
lbSUM.ForeColor = Color.Green;
|
|
}
|
|
else if (sum == 0)
|
|
{
|
|
lbSUM.Text = "Error uninstalled Administrative module.";
|
|
lbSUM.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
lbSUM.Text = "Administrative module uninstalled not required!";
|
|
|
|
if (db == 1)
|
|
{
|
|
lbDB.Text = "Database uninstalled successfully!";
|
|
lbDB.ForeColor = Color.Green;
|
|
}
|
|
else if (db == 0)
|
|
{
|
|
lbDB.Text = "Error uninstalled Database.";
|
|
lbDB.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
lbDB.Text = "Database uninstalled not required!";
|
|
|
|
if (app == 1)
|
|
{
|
|
lbAPP.Text = "Application server uninstalled successfully!";
|
|
lbAPP.ForeColor = Color.Green;
|
|
}
|
|
else if (app == 0)
|
|
{
|
|
lbAPP.Text = "Error uninstalled Application server.";
|
|
lbAPP.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
lbAPP.Text = "Application server uninstalled not required!";
|
|
|
|
if (upd == 1)
|
|
{
|
|
lbUpd.Text = "Updater uninstalled successfully!";
|
|
lbUpd.ForeColor = Color.Green;
|
|
}
|
|
else if (upd == 0)
|
|
{
|
|
lbUpd.Text = "Error uninstalled Updater.";
|
|
lbUpd.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
lbUpd.Text = "Updater uninstalled not required!";
|
|
|
|
if (MainForm.AdvanceSettings)
|
|
{
|
|
//if (MainForm.radioType == RADIOTYPE.SIMOCO)
|
|
//{
|
|
lbAPPMobile.Visible = false;
|
|
lbAppMobtext.Visible = false;
|
|
//}
|
|
//else
|
|
//{
|
|
// lbAPPMobile.Visible = true;
|
|
// lbAppMobtext.Visible = true;
|
|
//}
|
|
|
|
//if (appMobile == 1)
|
|
//{
|
|
// lbAPPMobile.Text = "Application server mobile uninstalled successfully!";
|
|
// lbAPPMobile.ForeColor = Color.Green;
|
|
//}
|
|
//else if (appMobile == 0)
|
|
//{
|
|
// lbAPPMobile.Text = "Error uninstalling Application server mobile.";
|
|
// lbAPPMobile.ForeColor = Color.Red;
|
|
//}
|
|
//else
|
|
//{
|
|
// lbAPPMobile.Text = "Application server mobile uninstallation not required!";
|
|
//}
|
|
|
|
lbTCPServer.Visible = true;
|
|
lbTCPServerText.Visible = true;
|
|
if (tcpServer == 1)
|
|
{
|
|
lbTCPServer.Text = "TCP Server uninstalled successfully!";
|
|
lbTCPServer.ForeColor = Color.Green;
|
|
}
|
|
else if (tcpServer == 0)
|
|
{
|
|
lbTCPServer.Text = "Error uninstalling TCP Server.";
|
|
lbTCPServer.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbTCPServer.Text = "TCP Server uninstallation not required!";
|
|
}
|
|
|
|
lbTCPClient.Visible = true;
|
|
lbTCPClientText.Visible = true;
|
|
if (tcpClient == 1)
|
|
{
|
|
lbTCPClient.Text = "TCP Client uninstalled successfully!";
|
|
lbTCPClient.ForeColor = Color.Green;
|
|
}
|
|
else if (tcpClient == 0)
|
|
{
|
|
lbTCPClient.Text = "Error uninstalling TCP Client.";
|
|
lbTCPClient.ForeColor = Color.Red;
|
|
}
|
|
else
|
|
{
|
|
lbTCPClient.Text = "TCP Client uninstallation not required!";
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|