Пример #1
0
 protected override void OnMouseClick(int x, int y, MouseButton button)
 {
     if (IsChild) // is a child
     {
         ParentColorPicker.Index = this.Index;
         ParentColorPicker.CloseChildPicker();
     }
     else
     {
         if (m_ChildColorPicker == null)
         {
             m_ChildColorPicker                   = new ColorPickerBox(this.Parent, m_openArea, m_hueWidth, m_hueHeight, m_hues);
             m_ChildColorPicker.IsChild           = true;
             m_ChildColorPicker.ParentColorPicker = this;
             Parent.AddControl(m_ChildColorPicker, this.Page);
         }
         else
         {
             m_ChildColorPicker.Dispose();
             m_ChildColorPicker = null;
         }
     }
 }