public MpeSelectButton() : base()
 {
     MpeLog.Debug("MpeSelectButton()");
     Type                = MpeControlType.SelectButton;
     layoutStyle         = MpeLayoutStyle.HorizontalFlow;
     autoSize            = false;
     active              = false;
     offset              = Point.Empty;
     textureSize         = new Size(32, 32);
     items               = new MpeItemManager();
     items.Type          = MpeItemType.Text;
     items.TypeChanging += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
     leftImage           = new MpeImage();
     leftImage.Embedded  = true;
     leftImage.AutoSize  = false;
     leftImage.Size      = textureSize;
     leftImage.Padding   = new MpeControlPadding(8);
     rightImage          = new MpeImage();
     rightImage.Embedded = true;
     rightImage.AutoSize = false;
     rightImage.Size     = textureSize;
     rightImage.Padding  = new MpeControlPadding(8);
     label               = new MpeLabel();
     label.Embedded      = true;
     Prepare();
 }
Exemplo n.º 2
0
 public MpeSelectButton() : base()
 {
   MpeLog.Debug("MpeSelectButton()");
   Type = MpeControlType.SelectButton;
   layoutStyle = MpeLayoutStyle.HorizontalFlow;
   autoSize = false;
   active = false;
   offset = Point.Empty;
   textureSize = new Size(32, 32);
   items = new MpeItemManager();
   items.Type = MpeItemType.Text;
   items.TypeChanging += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
   leftImage = new MpeImage();
   leftImage.Embedded = true;
   leftImage.AutoSize = false;
   leftImage.Size = textureSize;
   leftImage.Padding = new MpeControlPadding(8);
   rightImage = new MpeImage();
   rightImage.Embedded = true;
   rightImage.AutoSize = false;
   rightImage.Size = textureSize;
   rightImage.Padding = new MpeControlPadding(8);
   label = new MpeLabel();
   label.Embedded = true;
   Prepare();
 }
 public MpeItemManager(MpeItemManager manager) : this()
 {
     values   = new MpeItemCollection(manager.values);
     first    = manager.first;
     last     = manager.last;
     interval = manager.interval;
     digits   = manager.digits;
 }
Exemplo n.º 4
0
 public MpeItemManager(MpeItemManager manager) : this()
 {
   values = new MpeItemCollection(manager.values);
   first = manager.first;
   last = manager.last;
   interval = manager.interval;
   digits = manager.digits;
 }
 public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destType)
 {
     if (destType == typeof(string) && value is MpeItemManager)
     {
         MpeItemManager m = (MpeItemManager)value;
         return("(" + m.Type.ToString() + "Collection)");
     }
     return(base.ConvertTo(context, culture, value, destType));
 }
 public MpeSelectButton(MpeSelectButton sb) : base(sb)
 {
     MpeLog.Debug("MpeSelectButton(sb)");
     Type                   = MpeControlType.SelectButton;
     offset                 = sb.offset;
     leftImage              = new MpeImage(sb.leftImage);
     rightImage             = new MpeImage(sb.rightImage);
     label                  = new MpeLabel(sb.label);
     items                  = new MpeItemManager(sb.items);
     items.TypeChanging    += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
     textureSize            = sb.textureSize;
     buttonTextureFile      = sb.buttonTextureFile;
     buttonFocusTextureFile = sb.buttonFocusTextureFile;
     backTextureFile        = sb.backTextureFile;
     leftTextureFile        = sb.leftTextureFile;
     leftFocusTextureFile   = sb.leftFocusTextureFile;
     rightTextureFile       = sb.rightTextureFile;
     rightFocusTextureFile  = sb.rightFocusTextureFile;
     Prepare();
 }
 public MpeSpinButton(MpeSpinButton spinner) : base(spinner)
 {
     MpeLog.Debug("MpeSpinButton(spinner)");
     orientation                = spinner.orientation;
     reverse                    = spinner.reverse;
     showRange                  = spinner.showRange;
     textureUp                  = spinner.textureUp;
     textureUpFocus             = spinner.textureUpFocus;
     textureDown                = spinner.textureDown;
     textureDownFocus           = spinner.textureDownFocus;
     label                      = new MpeLabel(spinner.label);
     imageUp                    = new MpeImage(spinner.imageUp);
     imageDown                  = new MpeImage(spinner.imageDown);
     imageGroup                 = new MpeGroup(spinner.imageGroup);
     items                      = new MpeItemManager(spinner.items);
     items.TypeChanging        += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
     items.Values.ItemInserted += new MpeItemCollection.ItemInsertedHandler(OnItemInserted);
     items.Values.ItemRemoved  += new MpeItemCollection.ItemRemovedHandler(OnItemRemoved);
     items.Values.ItemSet      += new MpeItemCollection.ItemSetHandler(OnItemSet);
     items.Values.ItemsCleared += new MpeItemCollection.ItemsClearedHandler(OnItemsCleared);
     SetLabel();
     Prepare();
 }
 public MpeSpinButton() : base()
 {
     MpeLog.Debug("MpeSpinButton()");
     Type             = MpeControlType.SpinButton;
     orientation      = MpeControlOrientation.Horizontal;
     alignment        = MpeControlAlignment.Right;
     reverse          = false;
     spacing          = 5;
     layoutStyle      = MpeLayoutStyle.HorizontalFlow;
     alignment        = MpeControlAlignment.Left;
     autoSize         = true;
     controlLock.Size = true;
     // Label
     label          = new MpeLabel();
     label.Embedded = true;
     // Images
     imageGroup             = new MpeGroup();
     imageGroup.Embedded    = true;
     imageGroup.ShowBorder  = false;
     imageGroup.LayoutStyle = MpeLayoutStyle.VerticalFlow;
     imageUp            = new MpeImage();
     imageUp.Embedded   = true;
     imageUp.Size       = new Size(16, 16);
     imageDown          = new MpeImage();
     imageDown.Embedded = true;
     imageDown.Size     = new Size(16, 16);
     // Items
     items                      = new MpeItemManager();
     items.Type                 = MpeItemType.Integer;
     items.TypeChanging        += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
     items.Values.ItemInserted += new MpeItemCollection.ItemInsertedHandler(OnItemInserted);
     items.Values.ItemRemoved  += new MpeItemCollection.ItemRemovedHandler(OnItemRemoved);
     items.Values.ItemSet      += new MpeItemCollection.ItemSetHandler(OnItemSet);
     items.Values.ItemsCleared += new MpeItemCollection.ItemsClearedHandler(OnItemsCleared);
     SetLabel();
     Prepare();
 }
Exemplo n.º 9
0
 public MpeSelectButton(MpeSelectButton sb) : base(sb)
 {
   MpeLog.Debug("MpeSelectButton(sb)");
   Type = MpeControlType.SelectButton;
   offset = sb.offset;
   leftImage = new MpeImage(sb.leftImage);
   rightImage = new MpeImage(sb.rightImage);
   label = new MpeLabel(sb.label);
   items = new MpeItemManager(sb.items);
   items.TypeChanging += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
   textureSize = sb.textureSize;
   buttonTextureFile = sb.buttonTextureFile;
   buttonFocusTextureFile = sb.buttonFocusTextureFile;
   backTextureFile = sb.backTextureFile;
   leftTextureFile = sb.leftTextureFile;
   leftFocusTextureFile = sb.leftFocusTextureFile;
   rightTextureFile = sb.rightTextureFile;
   rightFocusTextureFile = sb.rightFocusTextureFile;
   Prepare();
 }
 private void Init()
 {
     MpeLog.Debug("MpeFadeLabel.Init()");
     Type  = MpeControlType.FadeLabel;
     items = new MpeItemManager();
 }
Exemplo n.º 11
0
 private void Init()
 {
   MpeLog.Debug("MpeFadeLabel.Init()");
   Type = MpeControlType.FadeLabel;
   items = new MpeItemManager();
 }
Exemplo n.º 12
0
 public MpeSpinButton(MpeSpinButton spinner) : base(spinner)
 {
   MpeLog.Debug("MpeSpinButton(spinner)");
   orientation = spinner.orientation;
   reverse = spinner.reverse;
   showRange = spinner.showRange;
   textureUp = spinner.textureUp;
   textureUpFocus = spinner.textureUpFocus;
   textureDown = spinner.textureDown;
   textureDownFocus = spinner.textureDownFocus;
   label = new MpeLabel(spinner.label);
   imageUp = new MpeImage(spinner.imageUp);
   imageDown = new MpeImage(spinner.imageDown);
   imageGroup = new MpeGroup(spinner.imageGroup);
   items = new MpeItemManager(spinner.items);
   items.TypeChanging += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
   items.Values.ItemInserted += new MpeItemCollection.ItemInsertedHandler(OnItemInserted);
   items.Values.ItemRemoved += new MpeItemCollection.ItemRemovedHandler(OnItemRemoved);
   items.Values.ItemSet += new MpeItemCollection.ItemSetHandler(OnItemSet);
   items.Values.ItemsCleared += new MpeItemCollection.ItemsClearedHandler(OnItemsCleared);
   SetLabel();
   Prepare();
 }
Exemplo n.º 13
0
 public MpeSpinButton() : base()
 {
   MpeLog.Debug("MpeSpinButton()");
   Type = MpeControlType.SpinButton;
   orientation = MpeControlOrientation.Horizontal;
   alignment = MpeControlAlignment.Right;
   reverse = false;
   spacing = 5;
   layoutStyle = MpeLayoutStyle.HorizontalFlow;
   alignment = MpeControlAlignment.Left;
   autoSize = true;
   controlLock.Size = true;
   // Label
   label = new MpeLabel();
   label.Embedded = true;
   // Images
   imageGroup = new MpeGroup();
   imageGroup.Embedded = true;
   imageGroup.ShowBorder = false;
   imageGroup.LayoutStyle = MpeLayoutStyle.VerticalFlow;
   imageUp = new MpeImage();
   imageUp.Embedded = true;
   imageUp.Size = new Size(16, 16);
   imageDown = new MpeImage();
   imageDown.Embedded = true;
   imageDown.Size = new Size(16, 16);
   // Items
   items = new MpeItemManager();
   items.Type = MpeItemType.Integer;
   items.TypeChanging += new MpeItemManager.TypeChangingHandler(OnItemTypeChanging);
   items.Values.ItemInserted += new MpeItemCollection.ItemInsertedHandler(OnItemInserted);
   items.Values.ItemRemoved += new MpeItemCollection.ItemRemovedHandler(OnItemRemoved);
   items.Values.ItemSet += new MpeItemCollection.ItemSetHandler(OnItemSet);
   items.Values.ItemsCleared += new MpeItemCollection.ItemsClearedHandler(OnItemsCleared);
   SetLabel();
   Prepare();
 }