Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
리턴 void
예제 #1
0
        private void courseVariationReportMenu_Click(object sender, EventArgs e)
        {
            int numTeams, numLegs;
            controller.GetRelayParameters(out numTeams, out numLegs);
            TeamVariationsForm reportForm = new TeamVariationsForm();
            reportForm.NumberOfTeams = numTeams;
            reportForm.NumberOfLegs = numLegs;
            reportForm.DefaultExportFileName = controller.GetDefaultVariationExportFileName();

            SetVariationReportBody(reportForm);

            reportForm.CalculateVariationsPressed += (reportSender, reportEventArgs) => {
                SetVariationReportBody(reportForm);
            };

            reportForm.ExportFilePressed += (reportSender, reportEventArgs) => {
                ExportVariationReport(reportForm, reportEventArgs.FileType, reportEventArgs.FileName);
            };

            reportForm.ShowDialog(this);

            if (numTeams != reportForm.NumberOfTeams || numLegs != reportForm.NumberOfLegs)
                controller.SetRelayParameters(reportForm.NumberOfTeams, reportForm.NumberOfLegs);

            reportForm.Dispose();
        }