示例#1
0
        /// <summary>
        /// 选择保存文件夹路径
        /// </summary>
        private void MergerSheetSaveFolderBtn_Click(object sender, EventArgs e)
        {
            MergerSheetSaveFolderBtn.Enabled = false;
            var folderDialog = new FolderBrowserDialog
            {
                Description  = @"请选择合并Sheet后的Excel保存文件夹",
                SelectedPath = @"c:\"
            };

            if (folderDialog.ShowDialog() == DialogResult.OK)
            {
                _targetMergerSaveFolderPath = folderDialog.SelectedPath;
                lbTargetFolder.Text         = _targetMergerSaveFolderPath;
                ExcelToolTip.SetToolTip(lbTargetFolder, _targetMergerSaveFolderPath);
            }
            MergerSheetSaveFolderBtn.Enabled = true;
            CheckBtnMerger();
        }
示例#2
0
        /// <summary>
        /// 选择保存文件夹路径
        /// </summary>
        private void BtnSelectFolder_Click(object sender, EventArgs e)
        {
            BtnSelectFolder.Enabled = false;
            var folderDialog = new FolderBrowserDialog
            {
                Description  = @"请选择拆分后Excel存储文件夹",
                SelectedPath = @"c:\"
            };

            if (folderDialog.ShowDialog() == DialogResult.OK)
            {
                _targetFolderPath = folderDialog.SelectedPath;
                lbSaveFolder.Text = _targetFolderPath;
                ExcelToolTip.SetToolTip(lbSaveFolder, _targetFolderPath);
            }
            CheckBtnSplit();
            BtnSelectFolder.Enabled = true;
        }
示例#3
0
        /// <summary>
        /// 选择拆分源文件路径
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelectFile_Click(object sender, EventArgs e)
        {
            BtnSelectFile.Enabled = false;
            var fileDialog = new OpenFileDialog
            {
                Title            = @"请选择要拆分Sheet的Excel文件",
                InitialDirectory = @"c:\",
                Filter           = @"Excel(*.xlsx)|*.xlsx",
                AddExtension     = true,
                DefaultExt       = "(.xlsx)"
            };

            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                _targetFilePath       = fileDialog.FileName;
                lbSourceFilePath.Text = _targetFilePath;
                ExcelToolTip.SetToolTip(lbSourceFilePath, _targetFilePath);
            }
            CheckBtnSplit();
            BtnSelectFile.Enabled = true;
        }
示例#4
0
        private void ShowToolTip()
        {
            var toolTipText = ExcelTabCtrol.TabPages[ExcelTabCtrol.SelectedIndex].ToolTipText;

            ExcelToolTip.SetToolTip(ExcelTabCtrol, toolTipText);
        }