1
using
system;23
using
system.collections.generic;
4using
system.text;
5using
system.windows.forms;67
namespace
dawnxz.tools851
}52#endregion
delegate event class
5354
#region
register & unregister
55///
56///
to register more than one method for an event
57///
58///
method name
59public
void
register(updateinfoeventhandler method)
6063
///64
///registered with the event a unique method
65///
66///
method name
67public
void
registeronly(updateinfoeventhandler method)
6871
///72
///registered with the event against method
73///
74///
method name
75public
void
unregister(updateinfoeventhandler method)
7679
#endregion
register & unregister
8081
#region
virtual
82///
83///
can be overridden execute method
84///
85///
system.windows.forms
86///
the delegate event
87protected
virtual
void
onupdateinfo(form form, updateinfoeventargs e)
8891
#endregion
virtual
9293
#region
member method
94///
95///
executes a delegate method
96///
97///
system.windows.forms
98///
to update the information
99public
void
executes(form form,
string
strinfo)
100105
#endregion
member method
106}
107}
以下**為 from 窗體中的:
1
#region
form event
2///
3///
form loading
4///
5///
6///
7private
void
frmmain_load(
object
sender, eventargs e)813
private
void
iamtest()
1425}26
///27
///close the form
28///
29///
30///
31private
void
frmmain_closing(
object
sender, canceleventargs e)
3235
///36
///closed form
37///
38///
39///
40private
void
frmmain_closed(
object
sender, eventargs e)
4144
#endregion
form event
4546
47#region
update logs information
48///
49///
update logs information
50///
51///
52///
53private
void
updatetxtinfomsg(
object
sender, dawnxz.tools.delegatetsit.updateinfoeventargs e)
5460
txtinfomsg.text
=string
.format(
" \r\n
", datetime.now.tostring(
"yyyy-mm-dd hh:mm:ss
"), e._strinfo, txtinfomsg.text);61}
62#endregion
update logs information
C 通用輸出類
using system using system.collections.generic using system.linq using system.web using system.xml.serialization using xiaofeng using newtonsoft.json u...
C 通用類 日誌記錄類
using system using system.collections.generic using system.io using system.linq using system.text using system.threading.tasks using system.web namesp...
C 通用類 日誌記錄類
using system using system.collections.generic using system.io using system.linq using system.text using system.threading.tasks using system.web namesp...