hytos / DTI_PID / SPPIDConverter / Form / SplashScreenWrapper.cs @ ca214bc3
이력 | 보기 | 이력해설 | 다운로드 (1.46 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.ComponentModel; |
4 |
using System.Data; |
5 |
using System.Drawing; |
6 |
using System.Linq; |
7 |
using System.Text; |
8 |
using System.Threading.Tasks; |
9 |
using System.Windows.Forms; |
10 |
using DevExpress.XtraSplashScreen; |
11 |
using System.Threading; |
12 |
|
13 |
namespace Converter.SPPID.Form |
14 |
{ |
15 |
public partial class SplashScreenWrapper : System.Windows.Forms.Form |
16 |
{ |
17 |
public SplashScreenWrapper() |
18 |
{ |
19 |
InitializeComponent(); |
20 |
} |
21 |
|
22 |
private void SplashScreenWrapper_Load(object sender, EventArgs e) |
23 |
{ |
24 |
System.Windows.Forms.Form form = (System.Windows.Forms.Form)sender; |
25 |
form.Opacity = 0; |
26 |
form.Location = new Point(-10000, -10000); |
27 |
} |
28 |
|
29 |
private void SplashScreenWrapper_Shown(object sender, EventArgs e) |
30 |
{ |
31 |
SplashScreenManager.ShowForm(this, typeof(SPPIDSplashScreen), true, true); |
32 |
// The splash screen will be opened in a separate thread. To interact with it, use the SendCommand method. |
33 |
for (int i = 1; i <= 100; i++) |
34 |
{ |
35 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, i); |
36 |
//To process commands, override the SplashScreen.ProcessCommand method. |
37 |
Thread.Sleep(25); |
38 |
} |
39 |
|
40 |
// Close the Splash Screen. |
41 |
SplashScreenManager.CloseForm(false); |
42 |
|
43 |
DialogResult = DialogResult.OK; |
44 |
} |
45 |
} |
46 |
} |