Exemple #1
0
        void tsmi_tsmi_ExportPhonebook_Click(object sender, EventArgs e)
        {
            if (sfd_SaveFileDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            var save_file = true;

            if (File.Exists(sfd_SaveFileDialog.FileName))
            {
                save_file = ConfirmBox.Show("File already exists", "Are you sure, you want to overwrite the selected file?") == DialogResult.OK;
            }

            if (save_file)
            {
                presenter.ExportPhoneBook(sfd_SaveFileDialog.FileName);
            }
        }