Example #1
0
        /// <summary>Обновляет номер на UI из указанных метаданных.</summary>
        /// <param name="plate"></param>
        private void UpdateUIPlate(PlateMetadata plate)
        {
            Assert.IsNotNull(plate);

            SuspendUpdate();

            _txtPlate.Text = plate.Number;

            var countryId = plate.Country;

            if (string.IsNullOrWhiteSpace(countryId))            // Если страна не указана
            {
                countryId = _stencilsProvider.GetModel(plate.Stencil)?.Id;
            }
            UpdateCountry(countryId);
            UpdateStencil(plate.Stencil);
            UpdatePlateQuality(plate);
            UpdateImage(plate);

            ResumeUpdate();
        }