Files
cms_thermo_active/Client/View/LoadingForm.cs
T
2017-12-21 11:56:24 +01:00

70 lines
1.6 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;
using CefSharp;
namespace CMS_Client.View
{
public partial class LoadingForm : Form
{
//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 Name
VersionLBL.Text = Application.ProductName;
}
//Method used to add the shadow to the Window
protected override CreateParams CreateParams
{
get
{
const int CS_DROPSHADOW = 0x20000;
CreateParams cp = base.CreateParams;
cp.ClassStyle |= CS_DROPSHADOW;
return cp;
}
}
//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;
}
}
}
}