/// <summary> /// Updates the Visibility State for this group depending on the visibility of each layer within the group. /// </summary> protected internal void UpdateGroupVisibility() { int NumVisible = 0; int NumLayers = Layers.Count; Layer lyr = null; for (int i = 0; i < NumLayers; i++) { lyr = (Layer)Layers[i]; if (m_Legend.m_Map.get_LayerVisible(lyr.Handle) == true) { NumVisible++; } } if (NumVisible == NumLayers) { m_VisibleState = VisibleStateEnum.vsALL_VISIBLE; } else if (NumVisible == 0) { m_VisibleState = VisibleStateEnum.vsALL_HIDDEN; } else { m_VisibleState = VisibleStateEnum.vsPARTIAL_VISIBLE; } }
/// <summary> /// 图层组勾选事件 /// </summary> /// <param name="Handle">Handle代表的是位置,不代表图层句柄</param> /// <param name="State"></param> private void Legend_GroupCheckboxClicked(int Handle, VisibleStateEnum State) { }