-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathForm1.cs
More file actions
61 lines (57 loc) · 1.73 KB
/
Form1.cs
File metadata and controls
61 lines (57 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraSplashScreen;
using System.Threading;
using DevExpress.XtraWaitForm;
namespace WaitForm_SetDescription {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
void OnBtnShowWaitFormClick(object sender, EventArgs e) {
//Open Wait Form
SplashScreenManager.ShowForm(this, typeof(WaitForm1), true, true, false);
try {
LoadData();
}
finally {
//Close Wait Form
SplashScreenManager.CloseForm(false);
}
}
void LoadData() {
gridControl1.DataSource = DataSource.Source;
Thread.Sleep(4000); // fake delay
}
}
public class DataSource {
static BindingList<Person> source = null;
public static BindingList<Person> Source {
get {
if(source == null) {
source = new BindingList<Person>();
source.Add(new Person("John", 10));
source.Add(new Person("Jane", 12));
source.Add(new Person("Stan", 11));
source.Add(new Person("Dan", 13));
source.Add(new Person("Molly", 25));
}
return source;
}
}
}
public class Person {
public Person(string name, int age) {
this.Name = name;
this.Age = age;
}
public string Name { get; set; }
public int Age { get; set; }
}
}