示例#1
0
        //�Public�Methods�(1)�

        public static void Export(ListView listView, ExportingOption exportOption, string file)
        {
            try
            {
                ExportStrategy exportStrategy = GetExportStrategyObject(exportOption);

                ExportListView exportListView = new ExportListView(exportStrategy);

                exportListView.Export(listView, file);

                MessageBox.Show("Exporting Done", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (ArgumentException ex)
            {
                DisplayError.Display(ex);
            }
            catch (IOException ex)
            {
                DisplayError.Display(ex);
            }
        }
示例#2
0
 private void ExportListToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ExportListView.SaveAsCSV(ListView1);
 }