Ejemplo n.º 1
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (wrkrRunScript.IsBusy && MessageBox.Show("Script kører. Er du sikker på at du vil afslutte?", "Afslut", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                e.Cancel = true;
            }

            e.Cancel = !CheckIfSaved();

            if (!e.Cancel)
            {
                FilePathCollection.Serialize(fpcLatest, latestPath);
            }
        }