/
ChoosePersonsPageView.cs
40 lines (30 loc) · 1.3 KB
/
ChoosePersonsPageView.cs
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
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.DataAccess.UI.Wizard.Views;
namespace CustomWizardExample.Wizard.Views {
public partial class ChoosePersonsPageView : WizardViewBase, IChoosePersonsPageView {
public ChoosePersonsPageView() {
InitializeComponent();
}
#region Implementation of IWizardPageView
public override string HeaderDescription { get { return "Select one of data lists below"; } }
#endregion
#region Implementation of IChoosePersonsPageView
public string XmlFilePath { get; set; }
public PersonSourceType PersonSourceType {
get {
return this.rgDataSourceType.SelectedIndex == 0 ? PersonSourceType.XmlFilePath : PersonSourceType.Static;
}
set {
if (value == PersonSourceType.XmlFilePath)
this.rgDataSourceType.SelectedIndex = 0;
else
this.rgDataSourceType.SelectedIndex = 1;
}
}
bool IChoosePersonsPageView.ShowWarning() {
return XtraMessageBox.Show(LookAndFeel, this, "Use persons from the predefined list?", "Wizard", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes;
}
#endregion
}
}