-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApplicationPageBase.cs
82 lines (66 loc) · 2.08 KB
/
ApplicationPageBase.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using CommonForms.Components;
using RealityFrameworks;
namespace CommonForms
{
public partial class ApplicationPageBase : UserControl
{
public delegate void UpdateStatusDelegate(string message);
public UpdateStatusDelegate? UpdateStatusCallback { get; set; } = null;
protected string DefaultOutputFolder =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "TEMP");
// Reference to a FilesListComponent instance
protected FilesListComponent? mFilesList = null;
public Components.FilesListComponent? FilesList
{
get { return mFilesList; }
set
{
mFilesList = value;
OnFilesListSet();
}
}
// Reference to a FilesProcessor instance
protected FilesProcessor? mFilesProcessor = null;
public FilesProcessor? Processor
{
get { return mFilesProcessor; }
set
{
mFilesProcessor = value;
OnProcessorSet();
}
}
public ApplicationPageBase()
{
}
protected virtual void OnFilesListSet()
{
// override and implement in derived classes
}
protected virtual void OnProcessorSet()
{
// implement this in derived classes
}
public virtual void UpdateUI()
{
// implement this in derived classes
}
public virtual void UpdateLocale()
{
// implement this in derived classes
}
protected void CallUpdateStatus(string message)
{
if (UpdateStatusCallback != null)
UpdateStatusCallback(message);
}
public virtual void SaveSettings(ref Dictionary<string, string> iniKeys)
{
// implement this in derived classes
}
public virtual void LoadSettings(Dictionary<string, string> iniKeys)
{
// implement this in derived classes
}
}
}