Exemplo n.º 1
0
        private void ClientForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            SaveSpecialNotes(); //Всегда сохраняем Особые отметки

            // Освобождаем память от изображения
            if (pictureBox_ClientPhoto.Image != null)
            {
                pictureBox_ClientPhoto.Image.Dispose();
                pictureBox_ClientPhoto.Image = null;
            }

            PwdForm.LockPassword();

            UnsubscribeEvents();
            ClosingForm?.Invoke();
        }
Exemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     ClosingForm?.Invoke(this, EventArgs.Empty);
 }