여기 타이머의 실제 역할은 무엇입니까? 다른 일은 수정이 발생하지 않으면 서버가 실패했을 때 (저장) 먼저 트리거됩니다. 스레드와 어떤 관계가 있습니까?여기에 타이머의 역할은 무엇입니까
private void Dlg_Load(object sender, System.EventArgs e)
{
// Set the message.
if (Saving)
eLabel.Text = Managers.ControlStrings.GetString("Saving");
// Setup to receive events.
Server.InfoReceived += new InfoEventHandler(Server_InfoReceived);
Server.Received += new ServerStateEventHandler(Server_ServerStateReceived);
// Start the timer to begin saving as soon as the dialog has completed setup.
Timer.Start();
}
/// Handle the tick of the timer by stopping the timer and beginning the operation. This allows
/// the dialog to come up fully before the operation is started; otherwise there are problems
/// closing the dialog.
/// </summary>
/// <param name="sender">Timer.</param>
/// <param name="e">Ignored.</param>
private void Timer_Tick(object sender, System.EventArgs e)
{
string func = "Dlg.Timer_Tick";
try
{
// Stop timer
Timer.Stop();
if (Saving)
if (!Server.Modify())
{
}
}
}
엉덩이는 아니지만 질문으로 돌아가 완전한 문장을 사용하도록 수정 할 수 있습니까? –