基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using Lskj.Control;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RFIDManagement
|
||||
{
|
||||
public partial class FrmBrower : Form
|
||||
{
|
||||
public int OutTime = 10;
|
||||
public FrmWebBrowser WebBrowser;
|
||||
public SynchronizationContext SyncContext;
|
||||
public FrmBrower()
|
||||
{
|
||||
InitializeComponent();
|
||||
SyncContext = SynchronizationContext.Current;
|
||||
WebBrowser = new FrmWebBrowser();
|
||||
WebBrowser.Dock = DockStyle.Fill;
|
||||
this.Controls.Add(WebBrowser);
|
||||
this.Load += OnFrmBrowerLoad;
|
||||
}
|
||||
private void OnFrmBrowerLoad(object sender, EventArgs e)
|
||||
{
|
||||
Task task = new Task(async () =>
|
||||
{
|
||||
await Task.Delay(OutTime);
|
||||
SyncContext.Post(CloseWindow, null);
|
||||
});
|
||||
task.Start();
|
||||
}
|
||||
public void LoadUrl(string url)
|
||||
{
|
||||
WebBrowser.FrmLoad(url);
|
||||
}
|
||||
public void CloseWindow(object state)
|
||||
{
|
||||
this.Close();
|
||||
this.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user