здесь код, какова фактическая роль таймера, другая вещь, которая, если (сохранение) срабатывает первым, если модификация не была выполнена, сервер не работает. Есть ли какое-либо отношение к потоку. .Какова роль таймера здесь
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())
{
}
}
}
Не означает быть задницей, но можете ли вы вернуться к своему вопросу и пересмотреть, чтобы использовать полные предложения? –