public PacerDataMgmt() { InitializeComponent(); _courts = CourtService.GetAll(); cboCourt.ItemsSource = _courts; grdCourts.ItemsSource = _courts; List <PacerFileFormat> _formats = PacerFileFormatService.GetAll(); cboECFVersion.ItemsSource = _formats; rdpEndDate.SelectedDate = DateTime.Now.AddDays(-1); rdpStartDate.SelectedDate = DateTime.Now.AddMonths(-1); _asyncWorker = new BackgroundWorker(); _asyncWorker.WorkerReportsProgress = true; _asyncWorker.WorkerSupportsCancellation = true; _asyncWorker.ProgressChanged += new ProgressChangedEventHandler(bwAsync_ProgressChanged); _asyncWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsync_RunWorkerCompleted); _asyncWorker.DoWork += new DoWorkEventHandler(bwAsync_DoWork); _asyncZipStatusWorker = new BackgroundWorker(); _asyncZipStatusWorker.WorkerReportsProgress = true; _asyncZipStatusWorker.WorkerSupportsCancellation = true; _asyncZipStatusWorker.ProgressChanged += new ProgressChangedEventHandler(bwAsyncZip_ProgressChanged); _asyncZipStatusWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwAsyncZip_RunWorkerCompleted); _asyncZipStatusWorker.DoWork += new DoWorkEventHandler(bwAsyncZip_DoWork); }
public void LoadDealer() { GridMain.DataContext = _selectedDealer; txtMaxDistance2.Text = _selectedDealer.MaxDistance.ToString(); List <PacerFileFormat> _formats = PacerFileFormatService.GetAll(); if (_selectedDealer.ID > 0) { _dealerZipCodes = ZipGeoCodeService.GetForDealer(_selectedDealer.ID); BindTreeToZipCodes(null); try { trvZipCodes.BringPathIntoView(_selectedPath); } catch { } LoadTotals(); } // config map if (_selectedDealer.Latitude != null && _selectedDealer.Latitude > 0) { MainMap.Position = new PointLatLng((double)_selectedDealer.Latitude, (double)_selectedDealer.Longitude); //set current marker currentMarker = new GMapMarker(MainMap.Position); { currentMarker.Shape = new CustomMarkerRed(currentMarker, _selectedDealer); currentMarker.Offset = new System.Windows.Point(-5, -5); currentMarker.ZIndex = int.MaxValue; MainMap.Markers.Add(currentMarker); } } }