回答編集履歴
1
子フォームの例をよりわかりやすく
test
CHANGED
@@ -38,33 +38,41 @@
|
|
38
38
|
|
39
39
|
```
|
40
40
|
|
41
|
-
//
|
41
|
+
//Form2
|
42
42
|
|
43
|
-
//IChildFormの実装
|
44
|
-
|
45
|
-
public
|
43
|
+
public partial class Form2 : Form, IChildForm
|
46
44
|
|
47
45
|
{
|
48
46
|
|
49
|
-
|
47
|
+
//---
|
50
48
|
|
51
|
-
|
49
|
+
//IChildFormの実装
|
52
50
|
|
51
|
+
public void ShowModeless( AtClosed_Deleg Callback )
|
52
|
+
|
53
|
+
{
|
54
|
+
|
55
|
+
m_CallbackAtClosed = Callback;
|
56
|
+
|
57
|
+
this.Show();
|
58
|
+
|
53
|
-
}
|
59
|
+
}
|
54
60
|
|
55
61
|
|
56
62
|
|
57
|
-
//---
|
63
|
+
//---
|
58
64
|
|
59
|
-
//具体実装
|
65
|
+
//具体実装
|
60
66
|
|
61
|
-
private AtClosed_Deleg m_CallbackAtClosed;
|
67
|
+
private AtClosed_Deleg m_CallbackAtClosed;
|
62
68
|
|
63
69
|
|
64
70
|
|
65
|
-
private void Form2_FormClosed( object sender, FormClosedEventArgs e )
|
71
|
+
private void Form2_FormClosed( object sender, FormClosedEventArgs e )
|
66
72
|
|
67
|
-
{ if( m_CallbackAtClosed != null ){ m_CallbackAtClosed(); } }
|
73
|
+
{ if( m_CallbackAtClosed != null ){ m_CallbackAtClosed(); } }
|
74
|
+
|
75
|
+
}
|
68
76
|
|
69
77
|
```
|
70
78
|
|