コード例 #1
0
        private void buttonExportToCsv_Click(object sender, EventArgs e)
        {
            if (listNetworks.SelectedItem != null)
            {
                var dialog = new SaveFileDialog {
                    Filter = "CSV|*.csv", DefaultExt = "csv", AddExtension = true
                };

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    _service.ExportNetworkToCsv(dialog.FileName, (string)listNetworks.SelectedItem);
                }
            }
        }