forked from ahyahy/OneScriptForms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCloseReason.cs
More file actions
59 lines (50 loc) · 2.99 KB
/
CloseReason.cs
File metadata and controls
59 lines (50 loc) · 2.99 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
using ScriptEngine.Machine.Contexts;
namespace osf
{
[ContextClass ("КлПричинаЗакрытия", "ClCloseReason")]
public class ClCloseReason : AutoContext<ClCloseReason>
{
private int m_none = (int)System.Windows.Forms.CloseReason.None; // 0 Причина закрытия не была определена или не может быть определена.
private int m_windowsShutDown = (int)System.Windows.Forms.CloseReason.WindowsShutDown; // 1 Операционная система закрывает все приложения перед завершением работы.
private int m_mdiFormClosing = (int)System.Windows.Forms.CloseReason.MdiFormClosing; // 2 Родительская форма этой формы многодокументного интерфейса (MDI) закрывается.
private int m_userClosing = (int)System.Windows.Forms.CloseReason.UserClosing; // 3 Форма закрывается программными способами или с помощью действия пользователя в пользовательском интерфейсе (например нажатием кнопки Закрыть в окне формы, выбором параметра Закрыть в системном меню окна или нажатием сочетания клавиш ALT+F4).
private int m_taskManagerClosing = (int)System.Windows.Forms.CloseReason.TaskManagerClosing; // 4 Диспетчер задач Microsoft Windows закрывает приложение.
private int m_formOwnerClosing = (int)System.Windows.Forms.CloseReason.FormOwnerClosing; // 5 Форма-владелец закрывается.
private int m_applicationExitCall = (int)System.Windows.Forms.CloseReason.ApplicationExitCall; // 6 Был вызван метод Exit() класса Application.
[ContextProperty("Владелец", "FormOwnerClosing")]
public int FormOwnerClosing
{
get { return m_formOwnerClosing; }
}
[ContextProperty("Выход", "ApplicationExitCall")]
public int ApplicationExitCall
{
get { return m_applicationExitCall; }
}
[ContextProperty("Диспетчер", "TaskManagerClosing")]
public int TaskManagerClosing
{
get { return m_taskManagerClosing; }
}
[ContextProperty("Отсутствие", "None")]
public int None
{
get { return m_none; }
}
[ContextProperty("Пользователь", "UserClosing")]
public int UserClosing
{
get { return m_userClosing; }
}
[ContextProperty("Система", "WindowsShutDown")]
public int WindowsShutDown
{
get { return m_windowsShutDown; }
}
[ContextProperty("ФормаMDI", "MdiFormClosing")]
public int MdiFormClosing
{
get { return m_mdiFormClosing; }
}
}
}