using Valg.EVA.Skanning.UserInterfaceElements.Help;

namespace Valg.Eva.Skanning.Scan.Presentation.RegisterBarcode
{
    public partial class RegisterBarcodeControl : IRegisterBarcodeControl, IHelpContributor
    {
        public RegisterBarcodeControl()
        {
            InitializeComponent();
        }

        private IRegisterBarcodeViewModel ViewModel
        {
            get { return (IRegisterBarcodeViewModel)DataContext; }
        }

        public void ClearRegistration()
        {
            ViewModel.BarcodeLongText = string.Empty;
            ViewModel.BarcodeShortText = string.Empty;
            ViewModel.IsBarcodeLongFocused = true;
        }

        public void SetBarcodes(string barcodeLong, string barcodeShort)
        {
            ViewModel.BarcodeLongText = barcodeLong;
            ViewModel.BarcodeShortText = barcodeShort;
        }

        public string HelpContributionId { get { return HelpContributionIds.LesingAvStrekkodeISkanning; } }
    }
}

