예제 #1
0
 //选择不同的输出类型
 /// <summary>
 /// 全选
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void SelectAllButtonClick(object sender, EventArgs e)
 {
     for (int i = 0; i < TableCheckBoxList.Items.Count; i++)
     {
         if (!TableCheckBoxList.GetItemChecked(i))
         {
             TableCheckBoxList.SetItemChecked(i, true);
         }
     }
 }
예제 #2
0
 /// <summary>
 /// 重置
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ResetButtonClick(object sender, EventArgs e)
 {
     for (int i = 0; i < TableCheckBoxList.Items.Count; i++)
     {
         if (TableCheckBoxList.GetItemChecked(i))
         {
             TableCheckBoxList.SetItemChecked(i, false);
         }
     }
 }
예제 #3
0
        /// <summary>
        /// 返回选中的excel文件。
        /// </summary>
        /// <returns></returns>
        private List <FileInfo> GetCurrentSelectFileInfos()
        {
            List <FileInfo> fileInfos = new List <FileInfo>();

            for (int i = 0; i < TableCheckBoxList.Items.Count; i++)
            {
                if (TableCheckBoxList.GetItemChecked(i))
                {
                    fileInfos.Add((FileInfo)TableCheckBoxList.Items[i]);
                }
            }

            return(fileInfos);
        }