using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace DL810Demo
{
    public partial class frmMultipleBlockDataList : Form
    {
        public frmMultipleBlockDataList()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            byte i;
            DialogResult btnClicked = saveFileDialog1.ShowDialog();
            if (btnClicked == DialogResult.OK)
            {
                StreamWriter SW;
                SW = File.CreateText(saveFileDialog1.FileName);
                SW.WriteLine("Number SecStatus  BlockData");
                for (i = 0; i < ListView1.Items.Count; i++)
                {
                    SW.WriteLine( ListView1.Items[i].Text.PadLeft(3,'0') + "    " + ListView1.Items[i].SubItems[1].Text.Insert(2,"        "));
                }
                SW.Close();
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}