Exemple #1
0
 //--------------------------------------------------------------------------
 private void EditeItemGenerator(IMapItemGenerator generator)
 {
     try
     {
         m_panelEditeGenerator.SuspendDrawing();
         m_panelCopierColler.Visible = false;
         if (m_editeurActif != null)
         {
             m_editeurActif.MajChamps();
             UpdateItemsGenerator();
         }
         m_editeurActif = null;
         foreach (Control ctrlToHide in m_panelEditeGenerator.Controls)
         {
             ctrlToHide.Visible = false;
         }
         if (generator == null)
         {
             return;
         }
         IControleEditeMapItem ctrl = null;
         if (!m_dicControlesAlloues.TryGetValue(generator.GetType(), out ctrl))
         {
             ctrl = CAllocateurInterfaceMapItemGenerator.GetNewControle(generator);
             if (ctrl != null)
             {
                 CWin32Traducteur.Translate(ctrl);
                 m_panelEditeGenerator.Controls.Add(ctrl as Control);
                 ((Control)ctrl).Dock = DockStyle.Fill;
                 m_dicControlesAlloues.Add(generator.GetType(), ctrl);
             }
         }
         if (ctrl != null)
         {
             m_panelCopierColler.Visible = true;
             ((Control)ctrl).Visible     = true;
             ((IControlALockEdition)ctrl).LockEdition = LockEdition;
             ctrl.InitChamps(generator);
             m_editeurActif = ctrl;
         }
     }
     finally
     {
         m_panelEditeGenerator.ResumeDrawing();
     }
 }
Exemple #2
0
 //---------------------------------------------------------------
 public static void Autoexec()
 {
     CAllocateurInterfaceMapItemGenerator.RegisterControle(
         typeof(CMapRouteFromQuery), typeof(CControleEditeMapRouteFromQuery));
 }
 //-----------------------------------------------
 public static void Autoexec()
 {
     CAllocateurInterfaceMapItemGenerator.RegisterControle(typeof(CMapLineGenerator), typeof(CControleEditeMapLineGenerator));
 }