/// <summary>
        /// Do convertion. Set background to textbox if empty value.
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType">Ignored.</param>
        /// <param name="parameter">Ignored.</param>
        /// <param name="culture">Ignored.</param>
        /// <returns>Null, if background was set. Cell value otherwise.</returns>
        public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)
        {
            Barrier barrier = value[0] as Barrier;

            string result = string.Empty;

            if (barrier != null && barrier.BarrierEffect != null)
            {
                result = CommonHelpers.ConvertBarrierEffect(barrier);
            }

            return(result);
        }
        /// <summary>
        /// React on popup panel opened.
        /// </summary>
        /// <param name="sender">Ignored.</param>
        /// <param name="e">Ignored.</param>
        private void _PopupPanelOpened(object sender, EventArgs e)
        {
            if (_barrier.Geometry is ESRI.ArcLogistics.Geometry.Point ||
                _barrier.Geometry is ESRI.ArcLogistics.Geometry.Polygon)
            {
                _cellLabel.Text = CommonHelpers.ConvertBarrierEffect(_barrier);

                _barrierEditor.Barrier = _barrier;

                PopupPositionSynchronizer synchronizer = new PopupPositionSynchronizer(this, _popupPanel);

                // Set popup's position.
                synchronizer.PositionPopupBelowCellEditor();
            }
        }
 /// <summary>
 /// Set control state.
 /// </summary>
 private void _SetControlState()
 {
     _cellLabel.Text = CommonHelpers.ConvertBarrierEffect(_barrier);
 }