2025-03-28 09:49:56 +08:00

68 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using System.IO;
using System.Diagnostics;
using System.Web;
using System.Deployment.Application;
using System.Threading;
namespace DataUpdate
{
public partial class WaiteFrom : Form
{
//private MainForm _MainForm;
private string _WaiteMessage = "";
private static WaiteFrom frmWaite = null;
private WaiteFrom()
{
InitializeComponent();
}
public static WaiteFrom GetInstance()
{
if (frmWaite == null || frmWaite.IsDisposed)
{
frmWaite = new WaiteFrom();
}
return frmWaite;
}
private void SetWaiteMessage()
{
WaiteMessage.Text = this._WaiteMessage;
WaiteMessage.Left = (this.Width - WaiteMessage.Width) / 2;
WaiteMessage.Visible = true;
this.BringToFront();
WaiteMessage.Refresh();
}
public void ShowMessage(string Message)
{
_WaiteMessage = Message;
SetWaiteMessage();
}
private void WaiteFrom_Shown(object sender, EventArgs e)
{
//_MainForm = this.Owner as MainForm;
//_MainForm.Visible = false;
////SetWaiteMessage();
}
private void WaiteFrom_FormClosed(object sender, FormClosedEventArgs e)
{
//if (_MainForm != null)
// _MainForm.Visible = true;
}
}
}