public static bool TryGetBounds(this GumpEntry e, out int x, out int y, out int width, out int height) { if (e is IGumpEntryVector) { x = ((IGumpEntryVector)e).X; y = ((IGumpEntryVector)e).Y; width = ((IGumpEntryVector)e).Width; height = ((IGumpEntryVector)e).Height; return(true); } Description props; if (_PositionProps.TryGetValue(e.GetType(), out props) && // props.X != null && props.Y != null && props.Width != null && props.Height != null) { x = (int)props.X.GetValue(e, null); y = (int)props.Y.GetValue(e, null); width = (int)props.Width.GetValue(e, null); height = (int)props.Height.GetValue(e, null); return(true); } x = y = width = height = 0; return(false); }
public static bool TrySetBounds(this GumpEntry e, int x, int y, int width, int height) { if (e is IGumpEntryVector) { ((IGumpEntryVector)e).X = x; ((IGumpEntryVector)e).Y = y; ((IGumpEntryVector)e).Width = width; ((IGumpEntryVector)e).Height = height; return(true); } Description props; if (_PositionProps.TryGetValue(e.GetType(), out props) && // props.X != null && props.Y != null && props.Width != null && props.Height != null) { props.X.SetValue(e, x, null); props.Y.SetValue(e, y, null); props.Width.SetValue(e, width, null); props.Height.SetValue(e, height, null); return(true); } return(false); }
public static bool TrySetHeight(this GumpEntry e, int height) { if (e is IGumpEntrySize) { ((IGumpEntrySize)e).Height = height; return(true); } return(e.SetPropertyValue("Height", height)); }
public static bool TrySetX(this GumpEntry e, int x) { if (e is IGumpEntryPoint) { ((IGumpEntryPoint)e).X = x; return(true); } return(e.SetPropertyValue("X", x)); }
public static bool TrySetWidth(this GumpEntry e, int width) { if (e is IGumpEntrySize) { ((IGumpEntrySize)e).Width = width; return(true); } return(e.SetPropertyValue("Width", width)); }
public static bool TrySetY(this GumpEntry e, int y) { if (e is IGumpEntryPoint) { ((IGumpEntryPoint)e).Y = y; return(true); } return(e.SetPropertyValue("Y", y)); }
public static bool TryGetHeight(this GumpEntry e, out int height) { if (e is IGumpEntrySize) { height = ((IGumpEntrySize)e).Height; return(true); } return(e.GetPropertyValue("Height", out height)); }
public static bool TryGetWidth(this GumpEntry e, out int width) { if (e is IGumpEntrySize) { width = ((IGumpEntrySize)e).Width; return(true); } return(e.GetPropertyValue("Width", out width)); }
public void Remove(GumpEntry g) { if (g == null || !Entries.Contains(g)) { return; } Entries.Remove(g); g.Parent = null; }
public static bool TryGetY(this GumpEntry e, out int y) { if (e is IGumpEntryPoint) { y = ((IGumpEntryPoint)e).Y; return(true); } return(e.GetPropertyValue("Y", out y)); }
public static bool TryGetX(this GumpEntry e, out int x) { if (e is IGumpEntryPoint) { x = ((IGumpEntryPoint)e).X; return(true); } return(e.GetPropertyValue("X", out x)); }
public static bool TryOffsetBounds(this GumpEntry e, int x, int y, int width, int height) { int ox, oy, ow, oh; if (TryGetBounds(e, out ox, out oy, out ow, out oh)) { return(TrySetBounds(e, ox + x, oy + y, ow + width, oh + height)); } return(false); }
public static bool TryOffsetSize(this GumpEntry e, int width, int height) { int ow, oh; if (TryGetSize(e, out ow, out oh)) { return(TrySetSize(e, ow + width, oh + height)); } return(false); }
public static bool TryOffsetPosition(this GumpEntry e, int x, int y) { int ox, oy; if (TryGetPosition(e, out ox, out oy)) { return(TrySetPosition(e, ox + x, oy + y)); } return(false); }
public static bool TryOffsetWidth(this GumpEntry e, int width) { int ow; if (TryGetWidth(e, out ow)) { return(TrySetWidth(e, ow + width)); } return(false); }
public static bool TryOffsetY(this GumpEntry e, int y) { int oy; if (TryGetY(e, out oy)) { return(TrySetY(e, oy + y)); } return(false); }
public static bool TryOffsetX(this GumpEntry e, int x) { int ox; if (TryGetX(e, out ox)) { return(TrySetX(e, ox + x)); } return(false); }
public static bool TryGetPosition(this GumpEntry e, out int x, out int y) { if (e is IGumpEntryPoint) { x = ((IGumpEntryPoint)e).X; y = ((IGumpEntryPoint)e).Y; return(true); } return(e.GetPropertyValue("X", out x) & e.GetPropertyValue("Y", out y)); }
public static bool TrySetPosition(this GumpEntry e, int x, int y) { if (e is IGumpEntryPoint) { ((IGumpEntryPoint)e).X = x; ((IGumpEntryPoint)e).Y = y; return(true); } return(e.SetPropertyValue("X", x) & e.SetPropertyValue("Y", y)); }
public static bool TrySetSize(this GumpEntry e, int width, int height) { if (e is IGumpEntrySize) { ((IGumpEntrySize)e).Width = width; ((IGumpEntrySize)e).Height = height; return(true); } return(e.SetPropertyValue("Width", width) & e.SetPropertyValue("Height", height)); }
public static bool TryGetSize(this GumpEntry e, out int width, out int height) { if (e is IGumpEntrySize) { width = ((IGumpEntrySize)e).Width; height = ((IGumpEntrySize)e).Height; return(true); } return(e.GetPropertyValue("Width", out width) & e.GetPropertyValue("Height", out height)); }
public static bool TryOffsetHeight(this GumpEntry e, int height) { int oh; if (TryGetHeight(e, out oh)) { return(TrySetHeight(e, oh + height)); } return(false); }
public void Remove(GumpEntry g) { if (g == null || !m_Entries.Contains(g)) { return; } Invalidate(); m_Entries.Remove(g); g.Parent = null; }
public void Add(GumpEntry g) { if (g.Parent != this) { g.Parent = this; } else if (!Entries.Contains(g)) { Entries.Add(g); } }
public void Add(GumpEntry g) { if (g.Parent != this) { g.Parent = this; } else if (!m_Entries.Contains(g)) { Invalidate(); m_Entries.Add(g); } }
public void Add(GumpEntry g) { if (g.Parent != this) { g.Parent = this; return; } if (!this.m_Entries.Contains(g)) { this.Invalidate(); this.m_Entries.Add(g); } }
public static bool TryGetBounds(this GumpEntry e, out int x, out int y, out int width, out int height) { if (e is IGumpEntryVector) { x = ((IGumpEntryVector)e).X; y = ((IGumpEntryVector)e).Y; width = ((IGumpEntryVector)e).Width; height = ((IGumpEntryVector)e).Height; return(true); } return(e.GetPropertyValue("X", out x) & e.GetPropertyValue("Y", out y) & // e.GetPropertyValue("Width", out width) & e.GetPropertyValue("Height", out height)); }
public static bool TrySetBounds(this GumpEntry e, int x, int y, int width, int height) { if (e is IGumpEntryVector) { ((IGumpEntryVector)e).X = x; ((IGumpEntryVector)e).Y = y; ((IGumpEntryVector)e).Width = width; ((IGumpEntryVector)e).Height = height; return(true); } return(e.SetPropertyValue("X", x) & e.SetPropertyValue("Y", y) & // e.SetPropertyValue("Width", width) & e.SetPropertyValue("Height", height)); }
public static bool TrySetHeight(this GumpEntry e, int height) { if (e is IGumpEntrySize) { ((IGumpEntrySize)e).Height = height; return(true); } Description props; if (_PositionProps.TryGetValue(e.GetType(), out props) && props.Height != null) { props.Height.SetValue(e, height, null); return(true); } return(false); }
public static bool TrySetWidth(this GumpEntry e, int width) { if (e is IGumpEntrySize) { ((IGumpEntrySize)e).Width = width; return(true); } Description props; if (_PositionProps.TryGetValue(e.GetType(), out props) && props.Width != null) { props.Width.SetValue(e, width, null); return(true); } return(false); }
public void Remove( GumpEntry g ) { Invalidate(); m_Entries.Remove( g ); g.Parent = null; }
public void Add( GumpEntry g ) { if ( g.Parent != this ) { g.Parent = this; } else if ( !m_Entries.Contains( g ) ) { Invalidate(); m_Entries.Add( g ); } }
private void CreateElement(GumpEntry e) { _CurrentNode = _Document.CreateElement(e.GetType().Name); }
public void Remove( GumpEntry g ) { if (g == null || !m_Entries.Contains(g)) return; Invalidate(); m_Entries.Remove( g ); g.Parent = null; }
public void Remove( GumpEntry g ) { m_Entries.Remove( g ); g.Parent = null; }