Files
cms_thermo_active/Client/View/LoadingForm.cs
T
2018-09-13 10:24:38 +02:00

58 lines
1.5 KiB
C#

using Microsoft.WindowsAPICodePack.Taskbar;
using Client.Config;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Client.Utils;
using System.IO;
namespace CMS_Client.View
{
public partial class LoadingForm : MetroFramework.Forms.MetroForm
{
//Constructor
public LoadingForm()
{
InitializeComponent();
//Set window Position
this.Location = new Point((Screen.PrimaryScreen.Bounds.Width / 2) - (this.Width / 2), (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2));
//Setup product label
if (Environment.Is64BitProcess)
VersionLBL.Text = "V" + Application.ProductVersion + " - 64 Bit";
else
VersionLBL.Text = "V" + Application.ProductVersion + " - 32 Bit";
}
//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;
}
}
}
}