Ejemplo n.º 1
0
 protected void SendBuilderChanged(BuilderChangeType type)
 {
     if (BuilderChanged != null)
     {
         BuilderChanged.Invoke(this, type);
     }
 }
Ejemplo n.º 2
0
 protected void SendBuilderChanged(BuilderChangeType type)
 {
     if (BuilderChanged != null)
     {
         BuilderChanged.Invoke(this, type);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Event handler for a builder change event.
        /// </summary>
        /// <param name="oBuilder"></param>
        /// <param name="eChangeType"></param>
        private void BuilderChanged(LayerBuilder oBuilder, BuilderChangeType eChangeType)
        {
            if (InvokeRequired)
             {
            Invoke(new BuilderChangedHandler(BuilderChanged), new Object[] { oBuilder, eChangeType });
            return;
             }
             else
             {
            // --- Get the updated builder's index ---
            if (oBuilder.Equals(m_hBaseLayer))
            {
               if (eChangeType == BuilderChangeType.LoadedASync)
               {
                  RefreshLayerRenderOrder();
               }
            }
            else
            {
               int iBuilderIndex = 0;
               while (iBuilderIndex < m_oLayers.Count)
               {
                  if (m_oLayers[iBuilderIndex] == oBuilder) break;
                  iBuilderIndex++;
               }
               if (iBuilderIndex == m_oLayers.Count) return;

               if (eChangeType == BuilderChangeType.LoadedASync)
               {
                  RefreshLayerRenderOrder();
                  c_lvLayers.Items[iBuilderIndex].ImageIndex = c_lvLayers.SmallImageList.Images.IndexOfKey(oBuilder.DisplayIconKey);
               }
               else if (eChangeType == BuilderChangeType.LoadedASyncFailed || eChangeType == BuilderChangeType.LoadedSyncFailed)
               {
                  c_lvLayers.Items[iBuilderIndex].ImageIndex = c_lvLayers.SmallImageList.Images.IndexOfKey("error");
               }
               else if (eChangeType == BuilderChangeType.VisibilityChanged)
               {
                  c_lvLayers.Items[iBuilderIndex].Checked = m_oLayers[iBuilderIndex].Visible;
               }
            }
             }
        }