public JournalManager(User user, ToolsPlugin owner) : base(user, "JournalManager")
        {
            InitializeComponent();
            this.Owner = owner;

            string[] ranges = new string[] { "A-C", "D-F", "G-I", "J-L", "M-O", "P-R", "S-U", "V-X", "Y-Z" };

            _page = new JournalBrowsePage(user);
            _page.LoadPage("A-C");

            foreach (string range in ranges)
            {
                AddTabPage(range);
            }

            ListBoxDragHelper.Bind(lstResults, CreateDragData);
            ListBoxDragHelper.Bind(_page.lst, CreateDragData);
        }
        public Gazetteer(GazetterPlugin owner)
        {
            InitializeComponent();
            _searchModel           = new ObservableCollection <PlaceNameViewModel>();
            lstResults.ItemsSource = _searchModel;
            _owner = owner;
            btnDataInfo.IsEnabled = false;

            List <string> list = Config.GetUser(_owner.User, "gazetteer.recentlyUsedFiles", new List <string>());

            _fileMRU = new ObservableCollection <GazetteerFile>(list.ConvertAll((path) => {
                return(new GazetteerFile(path));
            }));

            cmbFile.ItemsSource = _fileMRU;

            cmbFile.SelectionChanged += new SelectionChangedEventHandler(cmbFile_SelectionChanged);

            _offsetControl = new OffsetControl();
            _offsetControl.SelectedPlaceNameChanged += new Action <PlaceName>((place) => {
                UpdateMap();
            });

            _dirDistControl = new DistanceDirectionControl();

            lstResults.SelectionChanged += new SelectionChangedEventHandler(lstResults_SelectionChanged);

            optFindDistDir.Checked += new RoutedEventHandler(optFindDistDir_Checked);
            optFindLatLong.Checked += new RoutedEventHandler(optFindLatLong_Checked);

            optFindLatLong.IsChecked = true;

            Loaded += new RoutedEventHandler(Gazetteer_Loaded);

            ListBoxDragHelper.Bind(lstResults, CreateDragData);

            _mapUpdateTimer = new Timer((state) => {
                // Disable the timer...
                _mapUpdateTimer.Change(Timeout.Infinite, Timeout.Infinite);
                UpdateMapAsync();
            }, null, Timeout.Infinite, Timeout.Infinite);
        }