示例#1
0
        //-------------------------------------------------------
        public void Init(CMapLineGenerator generator)
        {
            m_generator = generator;
            List <CCustomizableListItem> items = new List <CCustomizableListItem>();

            if (m_generator != null)
            {
                foreach (CMapLineDessin dessin in generator.LinesDessin)
                {
                    CCustomizableListItem item = new CCustomizableListItem();
                    item.Tag = dessin;
                    items.Add(item);
                }
            }
            if (generator != null)
            {
                ((CControleEditeMapLineDessin)ItemControl).InitForLineGenerator(generator);
            }
            Items = items.ToArray();
        }
        //-----------------------------------------------
        public void InitChamps(IMapItemGenerator item)
        {
            m_mapLineGenerator = item as CMapLineGenerator;
            if (m_mapLineGenerator == null)
            {
                Visible = false;
                return;
            }
            Visible = true;
            m_panelFiltre.InitSansVariables(m_mapLineGenerator.Filtre);
            m_txtLibelle.Text = m_mapLineGenerator.Libelle;
            m_panelDessins.Init(m_mapLineGenerator);

            m_txtFormuleLatitude1.Init(item.Generator, m_mapLineGenerator.TypeElementsDessines);
            m_txtFormuleLongitude1.Init(item.Generator, m_mapLineGenerator.TypeElementsDessines);
            m_txtFormuleLatitude2.Init(item.Generator, m_mapLineGenerator.TypeElementsDessines);
            m_txtFormuleLongitude2.Init(item.Generator, m_mapLineGenerator.TypeElementsDessines);

            m_txtFormuleLongitude1.Formule = m_mapLineGenerator.FormuleLongitude1;
            m_txtFormuleLatitude1.Formule  = m_mapLineGenerator.FormuleLatitude1;
            m_txtFormuleLongitude2.Formule = m_mapLineGenerator.FormuleLongitude2;
            m_txtFormuleLatitude2.Formule  = m_mapLineGenerator.FormuleLatitude2;
            UpdateVisuActionSurClick();
        }
示例#3
0
 //----------------------------------------
 public void InitForLineGenerator(CMapLineGenerator lineGen)
 {
     m_txtFormuleCondition.Init(lineGen.Generator, new CObjetPourSousProprietes(lineGen));
     m_txtFormuleTooltip.Init(lineGen.Generator, new CObjetPourSousProprietes(lineGen));
 }