using ManualSoftwareSystem.Operation_Manual;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ManualSoftwareSystem.Inspection_Work
{
    public partial class FrmConfirmationPage : Form
    {
        public dynamic objLanguage;

        private string csvPartFile = string.Empty;

        public FrmConfirmationPage(string pathFile)
        {
            InitializeComponent();
            this.csvPartFile = pathFile;
            this.objLanguage = FrmOperationManualOperator.objLanguage;
        }

        private void FrmConfirmationPage_Load(object sender, EventArgs e)
        {
            string strConfirmation = "Confirmation";
            string strFirstPage = "First page";
            string strPreviousPage = "Previous page";
            string strCancel = "Cancel";
            string strFirstPage1 = "Do you want to start from the first page?";
            string strPreviousPage1 = "Do you want to start from the previous page?";

            lblConfirmation.Text = objLanguage.Translate(strConfirmation);
            btnFirstPage.Text = objLanguage.Translate(strFirstPage);
            btnPreviousPage.Text = objLanguage.Translate(strPreviousPage);
            btnCancel.Text = objLanguage.Translate(strCancel);
            lblFirstPage.Text = objLanguage.Translate(strFirstPage1);
            lblPreviousPage.Text = objLanguage.Translate(strPreviousPage1);
        }

        private void btnFirstPage_Click(object sender, EventArgs e)
        {
            FrmOperationManualOperator frmOperationManualOperator = new FrmOperationManualOperator(csvPartFile, "Inspection Work");

            FrmOperationManualOperator.strPage = "FirstPage";

            this.Dispose();

            frmOperationManualOperator.ShowDialog();

        }

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

        private void btnPreviousPage_Click(object sender, EventArgs e)
        {
            FrmOperationManualOperator frmOperationManualOperator = new FrmOperationManualOperator(csvPartFile, "Inspection Work");

            FrmOperationManualOperator.strPage = "PreviousPage";

            this.Dispose();

            frmOperationManualOperator.ShowDialog();
        }
    }
}
