private void historyWindows_Load(object sender, EventArgs e)
        {
            lb_historyFiles.ItemHeight = 20;
            lb_historyFiles.DrawItem += new System.Windows.Forms.DrawItemEventHandler(listBox1_DrawItem);

            #region 测试用
            //    recoderDataType data;
            //    fileOper = new transferRecoder();
            //    List<String> tempList = new List<String>();
            //    for (int i = 0; i < 30; i++)
            //    {
            //        data = new recoderDataType();
            //        data.filePath = i.ToString();
            //        data.recTime = GetTime.getTime();
            //        tempList.Add(data.formatRecoder());
            //    }
            //    String[] tempStr = tempList.ToArray();
            //    fileOper.addRecoder(tempStr);
            #endregion

            #region 从文件中获得数据,并显示到界面上
            listBoxItem item;
            String[] fileRecoder = new transferRecoder().readRecoder();
            recoderDataType dataParser = new recoderDataType();
            for (int i = 0; i < fileRecoder.Length; i++)
            {
                item = new listBoxItem(null, dataParser.parserRecoder(fileRecoder[i])[0], dataParser.parserRecoder(fileRecoder[i])[1]);
                list.Add(item);
                lb_historyFiles.Items.Add(item);
            }
            #endregion
        }
        private void historyWindows_Load(object sender, EventArgs e)
        {
            lb_historyFiles.ItemHeight = 20;
            lb_historyFiles.DrawItem  += new System.Windows.Forms.DrawItemEventHandler(listBox1_DrawItem);

            #region 测试用
            //    recoderDataType data;
            //    fileOper = new transferRecoder();
            //    List<String> tempList = new List<String>();
            //    for (int i = 0; i < 30; i++)
            //    {
            //        data = new recoderDataType();
            //        data.filePath = i.ToString();
            //        data.recTime = GetTime.getTime();
            //        tempList.Add(data.formatRecoder());
            //    }
            //    String[] tempStr = tempList.ToArray();
            //    fileOper.addRecoder(tempStr);
            #endregion

            #region 从文件中获得数据,并显示到界面上
            listBoxItem     item;
            String[]        fileRecoder = new transferRecoder().readRecoder();
            recoderDataType dataParser  = new recoderDataType();
            for (int i = 0; i < fileRecoder.Length; i++)
            {
                item = new listBoxItem(null, dataParser.parserRecoder(fileRecoder[i])[0], dataParser.parserRecoder(fileRecoder[i])[1]);
                list.Add(item);
                lb_historyFiles.Items.Add(item);
            }
            #endregion
        }
 private void delete_Click(object sender, EventArgs e)
 {
     int selectedItemIndex = lb_historyFiles.SelectedIndex;
     String temp = list[selectedItemIndex].formatStr();
     if (fileOper == null)
     {
         fileOper = new transferRecoder();
     }
     fileOper.deleteRecoder(temp);
     lb_historyFiles.Items.RemoveAt(selectedItemIndex);
     list.RemoveAt(selectedItemIndex);
     lb_historyFiles.Refresh();
 }
        private void delete_Click(object sender, EventArgs e)
        {
            int    selectedItemIndex = lb_historyFiles.SelectedIndex;
            String temp = list[selectedItemIndex].formatStr();

            if (fileOper == null)
            {
                fileOper = new transferRecoder();
            }
            fileOper.deleteRecoder(temp);
            lb_historyFiles.Items.RemoveAt(selectedItemIndex);
            list.RemoveAt(selectedItemIndex);
            lb_historyFiles.Refresh();
        }