Пример #1
0
 protected void CloseChildPicker()
 {
     if (m_ChildColorPicker != null)
     {
         m_ChildColorPicker.Dispose();
         m_ChildColorPicker = null;
         m_huesTexture      = HueData.CreateHueSwatch(1, 1, new int[1] {
             m_hues[Index]
         });
     }
 }
Пример #2
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;
         }
     }
 }