Esempio n. 1
0
        public LocationEditDlg()
        {
            InitializeComponent();

            fMapBrowser = new GKMapBrowser();
            fMapBrowser.InitMap();
            fMapBrowser.ShowLines = false;
            panMap.Content        = fMapBrowser;

            fNotesList = new GKSheetList(pageNotes);
            fMediaList = new GKSheetList(pageMultimedia);

            // SetLang()
            Title               = LangMan.LS(LSID.LSID_Location);
            btnAccept.Text      = LangMan.LS(LSID.LSID_DlgAccept);
            btnCancel.Text      = LangMan.LS(LSID.LSID_DlgCancel);
            pageCommon.Text     = LangMan.LS(LSID.LSID_Common);
            pageNotes.Text      = LangMan.LS(LSID.LSID_RPNotes);
            pageMultimedia.Text = LangMan.LS(LSID.LSID_RPMultimedia);
            lblName.Text        = LangMan.LS(LSID.LSID_Title);
            lblLatitude.Text    = LangMan.LS(LSID.LSID_Latitude);
            lblLongitude.Text   = LangMan.LS(LSID.LSID_Longitude);
            ListGeoCoords.SetColumnCaption(0, LangMan.LS(LSID.LSID_Title));
            ListGeoCoords.SetColumnCaption(1, LangMan.LS(LSID.LSID_Latitude));
            ListGeoCoords.SetColumnCaption(2, LangMan.LS(LSID.LSID_Longitude));
            btnShowOnMap.Text    = LangMan.LS(LSID.LSID_Show);
            grpSearch.Text       = LangMan.LS(LSID.LSID_SearchCoords);
            btnSearch.Text       = LangMan.LS(LSID.LSID_Search);
            btnSelect.Text       = LangMan.LS(LSID.LSID_SelectCoords);
            btnSelectName.Text   = LangMan.LS(LSID.LSID_SelectName);
            btnShowOnMap.ToolTip = LangMan.LS(LSID.LSID_ShowOnMapTip);
        }
Esempio n. 2
0
        public LocationEditDlg(IBaseWindow baseWin)
        {
            InitializeComponent();

            btnAccept.Image = UIHelper.LoadResourceImage("Resources.btn_accept.gif");
            btnCancel.Image = UIHelper.LoadResourceImage("Resources.btn_cancel.gif");

            fMapBrowser = new GKMapBrowser();
            fMapBrowser.InitMap();
            fMapBrowser.ShowLines = false;
            fMapBrowser.Dock      = DockStyle.Fill;
            panMap.Controls.Add(fMapBrowser);

            fNotesList = new GKSheetList(pageNotes);
            fMediaList = new GKSheetList(pageMultimedia);

            // SetLang()
            Text                          = LangMan.LS(LSID.LSID_Location);
            btnAccept.Text                = LangMan.LS(LSID.LSID_DlgAccept);
            btnCancel.Text                = LangMan.LS(LSID.LSID_DlgCancel);
            pageCommon.Text               = LangMan.LS(LSID.LSID_Common);
            pageNotes.Text                = LangMan.LS(LSID.LSID_RPNotes);
            pageMultimedia.Text           = LangMan.LS(LSID.LSID_RPMultimedia);
            lblName.Text                  = LangMan.LS(LSID.LSID_Title);
            lblLatitude.Text              = LangMan.LS(LSID.LSID_Latitude);
            lblLongitude.Text             = LangMan.LS(LSID.LSID_Longitude);
            ListGeoCoords.Columns[0].Text = LangMan.LS(LSID.LSID_Title);
            ListGeoCoords.Columns[1].Text = LangMan.LS(LSID.LSID_Latitude);
            ListGeoCoords.Columns[2].Text = LangMan.LS(LSID.LSID_Longitude);
            btnShowOnMap.Text             = LangMan.LS(LSID.LSID_Show);
            grpSearch.Text                = LangMan.LS(LSID.LSID_SearchCoords);
            btnSearch.Text                = LangMan.LS(LSID.LSID_Search);
            btnSelect.Text                = LangMan.LS(LSID.LSID_SelectCoords);
            btnSelectName.Text            = LangMan.LS(LSID.LSID_SelectName);

            SetToolTip(btnShowOnMap, LangMan.LS(LSID.LSID_ShowOnMapTip));

            fController = new LocationEditDlgController(this);
            fController.Init(baseWin);

            fNotesList.ListModel = new NoteLinksListModel(baseWin, fController.LocalUndoman);
            fMediaList.ListModel = new MediaLinksListModel(baseWin, fController.LocalUndoman);
        }
Esempio n. 3
0
        public LocationEditDlg()
        {
            InitializeComponent();

            btnAccept.Image = GKResources.iBtnAccept;
            btnCancel.Image = GKResources.iBtnCancel;

            fMapBrowser = new GKMapBrowser();
            fMapBrowser.InitMap();
            fMapBrowser.Dock      = DockStyle.Fill;
            fMapBrowser.ShowLines = false;
            panMap.Controls.Add(fMapBrowser);

            fNotesList = new GKSheetList(pageNotes);
            fMediaList = new GKSheetList(pageMultimedia);

            // SetLang()
            Text                          = LangMan.LS(LSID.LSID_Location);
            btnAccept.Text                = LangMan.LS(LSID.LSID_DlgAccept);
            btnCancel.Text                = LangMan.LS(LSID.LSID_DlgCancel);
            pageCommon.Text               = LangMan.LS(LSID.LSID_Common);
            pageNotes.Text                = LangMan.LS(LSID.LSID_RPNotes);
            pageMultimedia.Text           = LangMan.LS(LSID.LSID_RPMultimedia);
            lblName.Text                  = LangMan.LS(LSID.LSID_Title);
            lblLatitude.Text              = LangMan.LS(LSID.LSID_Latitude);
            lblLongitude.Text             = LangMan.LS(LSID.LSID_Longitude);
            ListGeoCoords.Columns[0].Text = LangMan.LS(LSID.LSID_Title);
            ListGeoCoords.Columns[1].Text = LangMan.LS(LSID.LSID_Latitude);
            ListGeoCoords.Columns[2].Text = LangMan.LS(LSID.LSID_Longitude);
            btnShowOnMap.Text             = LangMan.LS(LSID.LSID_Show);
            grpSearch.Text                = LangMan.LS(LSID.LSID_SearchCoords);
            btnSearch.Text                = LangMan.LS(LSID.LSID_Search);
            btnSelect.Text                = LangMan.LS(LSID.LSID_SelectCoords);
            btnSelectName.Text            = LangMan.LS(LSID.LSID_SelectName);

            toolTip1.SetToolTip(btnShowOnMap, LangMan.LS(LSID.LSID_ShowOnMapTip));
        }
Esempio n. 4
0
        private void PlacesLoad()
        {
            try
            {
                IProgressController progress = AppHost.Progress;

                fMapBrowser.InitMap();

                //cmbPersons.BeginUpdate();
                //tvPlaces.BeginUpdate();
                tvPlaces.DataStore = null;
                progress.ProgressInit(LangMan.LS(LSID.LSID_LoadingLocations), fTree.RecordsCount);
                try
                {
                    fPlaces.Clear();
                    cmbPersons.Items.Clear();
                    //cmbPersons.Sorted = false;
                    cmbPersons.Items.Add(new GKComboItem(LangMan.LS(LSID.LSID_NotSelected), null));

                    int num = fTree.RecordsCount;
                    for (int i = 0; i < num; i++)
                    {
                        GEDCOMRecord rec = fTree[i];
                        bool         res = rec is GEDCOMIndividualRecord && IsSelected(rec);

                        if (res)
                        {
                            GEDCOMIndividualRecord ind = rec as GEDCOMIndividualRecord;
                            int pCnt = 0;

                            int num2 = ind.Events.Count;
                            for (int j = 0; j < num2; j++)
                            {
                                GEDCOMCustomEvent ev = ind.Events[j];
                                if (ev.Place.StringValue != "")
                                {
                                    AddPlace(ev.Place, ev);
                                    pCnt++;
                                }
                            }

                            if (pCnt > 0)
                            {
                                cmbPersons.Items.Add(new GKComboItem(GKUtils.GetNameString(ind, true, false) + " [" + pCnt.ToString() + "]", ind));
                            }
                        }

                        progress.ProgressStep();
                    }

                    fBaseRoot.Expanded = true; //ExpandAll();
                    //cmbPersons.Sorted = true;

                    btnSelectPlaces.Enabled = true;
                }
                finally
                {
                    progress.ProgressDone();
                    //tvPlaces.EndUpdate();
                    //cmbPersons.EndUpdate();
                    tvPlaces.DataStore = fBaseRoot;
                }
            }
            catch (Exception ex)
            {
                Logger.LogWrite("MapsViewerWin.PlacesLoad(): " + ex.Message);
            }
        }