using ComPDFKit_Conversion.Options;
using PDF_Office.ViewModels.Dialog.ConverterDialogs;
using PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter;
using System.Windows.Controls;

namespace PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageBatchProcessing.HomePageConverter
{
    /// <summary>
    /// Interaction logic for HomePageConverterExcel
    /// </summary>
    public partial class HomePageConverterExcel : UserControl
    {
        public HomePageConverterExcel()
        {
            InitializeComponent();
        }

        private void OnlyTableComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (OnlyTableComboBox.SelectedIndex)
            {
                case 0:
                    ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachTable, ContentOptions.OnlyTable);
                    break;
                case 1:
                    ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForEachPage, ContentOptions.OnlyTable);
                    break;
                case 2:
                    ((HomePageConverterExcelViewModel)this.DataContext).homePageConverterDialogViewModel.ConverterExcelModel.excelOption = ((HomePageConverterExcelViewModel)this.DataContext).ConverterExcelModel.ExcelOptions(WorksheetOptions.ForTheDocument, ContentOptions.OnlyTable);
                    break;
                default:
                    break;
            }
        }
    }
}
