Пример #1
0
 protected void CloseChildPicker()
 {
     if (_childColorPicker != null)
     {
         _childColorPicker.Dispose();
         _childColorPicker = null;
         _huesTexture      = HueData.CreateHueSwatch(1, 1, new int[1] {
             _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 (_childColorPicker == null)
         {
             _childColorPicker                   = new ColorPickerBox(this.Parent, _openArea, _hueWidth, _hueHeight, _hues);
             _childColorPicker.IsChild           = true;
             _childColorPicker.ParentColorPicker = this;
             Parent.AddControl(_childColorPicker, this.Page);
         }
         else
         {
             _childColorPicker.Dispose();
             _childColorPicker = null;
         }
     }
 }