Files
2020-06-19 19:28:07 +02:00

51 lines
1.3 KiB
C#

using Client.Config;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Active_Client.View
{
public partial class LoadingForm : MetroFramework.Forms.MetroForm
{
//Constructor
public LoadingForm()
{
InitializeComponent();
if (Config.ClientConfig.IsSCM)
{
LogoCMS.Visible = false;
LogoSCM.Visible = true;
this.Icon = Properties.Resources.MAESTRO_ACTIVE_ICON;
}
else
{
LogoCMS.Visible = true;
LogoSCM.Visible = false;
}
//Set window Position
this.Location = new Point((Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2));
}
//Show & Set the status
public void Show(String status)
{
this.Show();
//Invoke method if is needed or call the method in STD mode
if (this.InvokeRequired)
{
this.Invoke((MethodInvoker)delegate () { StatusLBL.Text = status; });
}
else
{
StatusLBL.Text = status;
}
}
}
}