here the code what is the actual role of timer,,other thing is which if(saving) will trigger first ,if modification not happened means server fail..Is there any relation with thread..
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())
{
}
}
}