/// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="parentPage">Parent page.</param>
        public OrdersViewContextHandler(OptimizeAndEditPage parentPage)
        {
            Debug.Assert(null != parentPage);

            _parentPage = parentPage;
            _currentSchedule = parentPage.CurrentSchedule;
            _geocodablePage = parentPage.GeocodablePage;
        }
        /// <summary>
        /// Method inits geocodable page.
        /// </summary>
        private void _InitGeocodablePage()
        {
            Debug.Assert(_geocodablePage == null);

            _geocodablePage = new GeocodablePage(typeof(Order),
                                                 MapView.mapCtrl,
                                                 MapView.candidateSelect,
                                                 MapView.LayoutRoot,
                                                 _ordersView.OrdersGrid,
                                                 MapView.splitter,
                                                 MapView.UnassignedLayer);
            MapView.mapCtrl.AddTool(new EditingTool(), null);

            _geocodablePage.GeocodingStarted += new EventHandler(_GeocodablePageGeocodingStarted);
        }
        protected void _Init()
        {
            _CreateZonesLayer();
            _CreateBarriersLayer();

            double layerOpacity = (double)Application.Current.FindResource("BarriersAndZonesOpacity");
            if (layerOpacity > 1)
                layerOpacity = 1;
            if (layerOpacity < 0)
                layerOpacity = 0;
            _barriersLayer.MapLayer.Opacity = layerOpacity;
            _zonesLayer.MapLayer.Opacity = layerOpacity;
            mapCtrl.AddRegionsLayersToWidget = true;

            _CreateLocationsLayer();
            _geocodablePage = new GeocodablePage(typeof(Location), mapCtrl, candidateSelect, controlsGrid,
                XceedGrid, splitter, _locationsLayer);
            _CreateMultiCollectionBinding();
            mapCtrl.AddTool(new EditingTool(), null);

            _gridAutoFitHelper = new GridAutoFitHelper(XceedGrid, LayoutRoot, MapBorder);

            _inited = true;
        }