//------------------------------------------------------------------------ private void FillNode(TreeNode node, CGPSPoint point) { node.Tag = point; node.Text = point.Libelle; node.ImageIndex = 1; node.SelectedImageIndex = 1; }
public void Init(object item) { m_bIsInInit = true; m_pointEdite = item as CGPSPoint; m_txtTypePoint.Init(typeof(CGPSTypePoint), "Libelle", false); if (m_pointEdite == null) { Visible = false; } else { RefreshData(); } m_bIsInInit = false; }
//------------------------------------------------------------------------ private void MouseDownAddPoint(EarthMouseEventArgs args) { if (args.Buttons == MouseButtons.Left) { args.IsProcessed = true; CGPSPoint point = new CGPSPoint(m_carteEditee.ContexteDonnee); point.CreateNewInCurrentContexte(); point.Libelle = I.T("New point|20050"); point.Latitude = args.Latitude; point.Longitude = args.Longitude; point.Carte = m_carteEditee; TreeNode node = new TreeNode(); FillNode(node, point); m_arbreCartographie.Nodes[0].Nodes.Add(node); m_arbreCartographie.SelectedNode = node; IEnumerable <IMapItem> items = point.CreateMapItems(m_mapDatabase.GetLayer(m_carteEditee.IdUniversel, true)); foreach (IMapItem item in items) { m_wndMap.AddMapItem(item); //item.MouseClicked += item_MouseClicked; } } }