示例#1
0
        private void tsmiSaveSheduleToFile_Click(object sender, EventArgs e)
        {
            SaveFileDialog frmSave = new SaveFileDialog();

            frmSave.FileName = "расписание.xml";
            frmSave.Filter   = "(*.xml)|*.xml";

            if (frmSave.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                try
                {
                    ScheduleSerializer.SaveData(frmSave.FileName, Schedule);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
        }