Esempio n. 1
0
 public MpeControl()
 {
     MpeLog.Debug("MpeControl()");
     preparing = true;
     SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     SetStyle(ControlStyles.DoubleBuffer, true);
     SetStyle(ControlStyles.AllPaintingInWmPaint, true);
     SetStyle(ControlStyles.UserPaint, true);
     SetStyle(ControlStyles.ResizeRedraw, true);
     Animation                = new MpeAnimationType();
     BackColor                = Color.Transparent;
     Size                     = new Size(64, 64);
     Location                 = new Point(8, 8);
     alignment                = MpeControlAlignment.Left;
     autoSize                 = false;
     borderPen                = new Pen(Color.FromArgb(128, 255, 255, 255), 1.0f);
     borderPen.DashStyle      = DashStyle.Dash;
     controlLock              = new MpeControlLock();
     controlLock.LockChanged += new MpeControlLock.LockChangedHandler(OnLockChanged);
     description              = "";
     diffuseColor             = Color.FromArgb(255, 255, 255, 255);
     dimColor                 = Color.FromArgb(0x60ffffff);
     embedded                 = false;
     enabled                  = true;
     focused                  = false;
     id       = 0;
     masked   = false;
     modified = false;
     onLeft   = 0;
     onRight  = 0;
     onUp     = 0;
     onDown   = 0;
     padding  = new MpeControlPadding(0);
     padding.PaddingChanged += new MpeControlPadding.PaddingChangedHandler(OnPaddingChanged);
     parser           = null;
     textBrush        = new SolidBrush(Color.Black);
     type             = MpeControlType.Empty;
     visible          = "true";
     screen           = null;
     tags             = new MpeTagCollection();
     tags.TagAdded   += new MpeTagCollection.TagAddedHandler(OnTagCollectionChanged);
     tags.TagChanged += new MpeTagCollection.TagChangedHandler(OnTagCollectionChanged);
     tags.TagRemoved += new MpeTagCollection.TagRemovedHandler(OnTagCollectionChanged);
     preparing        = false;
     reference        = false;
 }
Esempio n. 2
0
 public MpeControl(MpeControl control) : this()
 {
     MpeLog.Debug("MpeControl(control)");
     preparing                = true;
     Size                     = control.Size;
     Location                 = control.Location;
     alignment                = control.alignment;
     autoSize                 = control.autoSize;
     borderPen                = control.borderPen;
     controlLock              = new MpeControlLock(control.controlLock);
     controlLock.LockChanged += new MpeControlLock.LockChangedHandler(OnLockChanged);
     description              = control.description;
     diffuseColor             = control.diffuseColor;
     dimColor                 = control.dimColor;
     animation                = control.animation;
     embedded                 = control.embedded;
     enabled                  = control.enabled;
     focused                  = control.focused;
     id       = control.id;
     masked   = control.masked;
     modified = control.modified;
     onLeft   = control.onLeft;
     onRight  = control.onRight;
     onUp     = control.onUp;
     onDown   = control.onDown;
     padding  = new MpeControlPadding(control.padding);
     padding.PaddingChanged += new MpeControlPadding.PaddingChangedHandler(OnPaddingChanged);
     parser           = control.parser;
     textBrush        = (SolidBrush)control.textBrush.Clone();
     type             = control.type;
     visible          = control.visible;
     screen           = control.screen;
     tags             = new MpeTagCollection(control.tags);
     tags.TagAdded   += new MpeTagCollection.TagAddedHandler(OnTagCollectionChanged);
     tags.TagChanged += new MpeTagCollection.TagChangedHandler(OnTagCollectionChanged);
     tags.TagRemoved += new MpeTagCollection.TagRemovedHandler(OnTagCollectionChanged);
     preparing        = false;
 }
Esempio n. 3
0
    //public MpeAnimationType GetAnimation(XPathNodeIterator iterator, string tagName, MpeAnimationType defaultValue)
    //{
    //  //string s = GetString(iterator, tagName, "");
    //  //if (s.Equals(MpeAnimationType.FlyInFromBottom.ToString()))
    //  //{
    //  //  return MpeAnimationType.FlyInFromBottom;
    //  //}
    //  //else if (s.Equals(MpeAnimationType.FlyInFromLeft.ToString()))
    //  //{
    //  //  return MpeAnimationType.FlyInFromLeft;
    //  //}
    //  //else if (s.Equals(MpeAnimationType.FlyInFromRight.ToString()))
    //  //{
    //  //  return MpeAnimationType.FlyInFromRight;
    //  //}
    //  //else if (s.Equals(MpeAnimationType.FlyInFromTop.ToString()))
    //  //{
    //  //  return MpeAnimationType.FlyInFromTop;
    //  //}
    //  //else if (s.Equals(MpeAnimationType.None.ToString()))
    //  //{
    //  //  return MpeAnimationType.None;
    //  //}
    //  //else
    //  //{
    //  //  return defaultValue;
    //  //}
    //  return new MpeAnimationType();
    //}

    public MpeControlAlignment GetAlignment(XPathNodeIterator iterator, string tagName, MpeControlAlignment defaultValue)
    {
      string s = GetString(iterator, tagName, "");
      if (s.ToLower().Equals("right"))
      {
        return MpeControlAlignment.Right;
      }
      else if (s.ToLower().Equals("left"))
      {
        return MpeControlAlignment.Left;
      }
      else if (s.ToLower().Equals("center"))
      {
        return MpeControlAlignment.Center;
      }
      return defaultValue;
    }
Esempio n. 4
0
 public MpeControl()
 {
   MpeLog.Debug("MpeControl()");
   preparing = true;
   SetStyle(ControlStyles.SupportsTransparentBackColor, true);
   SetStyle(ControlStyles.DoubleBuffer, true);
   SetStyle(ControlStyles.AllPaintingInWmPaint, true);
   SetStyle(ControlStyles.UserPaint, true);
   SetStyle(ControlStyles.ResizeRedraw, true);
   Animation = new MpeAnimationType();
   BackColor = Color.Transparent;
   Size = new Size(64, 64);
   Location = new Point(8, 8);
   alignment = MpeControlAlignment.Left;
   autoSize = false;
   borderPen = new Pen(Color.FromArgb(128, 255, 255, 255), 1.0f);
   borderPen.DashStyle = DashStyle.Dash;
   controlLock = new MpeControlLock();
   controlLock.LockChanged += new MpeControlLock.LockChangedHandler(OnLockChanged);
   description = "";
   diffuseColor = Color.FromArgb(255, 255, 255, 255);
   dimColor = Color.FromArgb(0x60ffffff);
   embedded = false;
   enabled = true;
   focused = false;
   id = 0;
   masked = false;
   modified = false;
   onLeft = 0;
   onRight = 0;
   onUp = 0;
   onDown = 0;
   padding = new MpeControlPadding(0);
   padding.PaddingChanged += new MpeControlPadding.PaddingChangedHandler(OnPaddingChanged);
   parser = null;
   textBrush = new SolidBrush(Color.Black);
   type = MpeControlType.Empty;
   visible = "true";
   screen = null;
   tags = new MpeTagCollection();
   tags.TagAdded += new MpeTagCollection.TagAddedHandler(OnTagCollectionChanged);
   tags.TagChanged += new MpeTagCollection.TagChangedHandler(OnTagCollectionChanged);
   tags.TagRemoved += new MpeTagCollection.TagRemovedHandler(OnTagCollectionChanged);
   preparing = false;
   reference = false;
 }
Esempio n. 5
0
 public MpeControl(MpeControl control) : this()
 {
   MpeLog.Debug("MpeControl(control)");
   preparing = true;
   Size = control.Size;
   Location = control.Location;
   alignment = control.alignment;
   autoSize = control.autoSize;
   borderPen = control.borderPen;
   controlLock = new MpeControlLock(control.controlLock);
   controlLock.LockChanged += new MpeControlLock.LockChangedHandler(OnLockChanged);
   description = control.description;
   diffuseColor = control.diffuseColor;
   dimColor = control.dimColor;
   animation = control.animation;
   embedded = control.embedded;
   enabled = control.enabled;
   focused = control.focused;
   id = control.id;
   masked = control.masked;
   modified = control.modified;
   onLeft = control.onLeft;
   onRight = control.onRight;
   onUp = control.onUp;
   onDown = control.onDown;
   padding = new MpeControlPadding(control.padding);
   padding.PaddingChanged += new MpeControlPadding.PaddingChangedHandler(OnPaddingChanged);
   parser = control.parser;
   textBrush = (SolidBrush) control.textBrush.Clone();
   type = control.type;
   visible = control.visible;
   screen = control.screen;
   tags = new MpeTagCollection(control.tags);
   tags.TagAdded += new MpeTagCollection.TagAddedHandler(OnTagCollectionChanged);
   tags.TagChanged += new MpeTagCollection.TagChangedHandler(OnTagCollectionChanged);
   tags.TagRemoved += new MpeTagCollection.TagRemovedHandler(OnTagCollectionChanged);
   preparing = false;
 }