public static MgLine cast(MgBaseShape obj) { global::System.IntPtr cPtr = touchvgPINVOKE.MgLine_cast(MgBaseShape.getCPtr(obj)); MgLine ret = (cPtr == global::System.IntPtr.Zero) ? null : new MgLine(cPtr, false); return(ret); }
public static MgLine fromHandle(int h) { global::System.IntPtr cPtr = touchvgPINVOKE.MgLine_fromHandle(h); MgLine ret = (cPtr == global::System.IntPtr.Zero) ? null : new MgLine(cPtr, false); return(ret); }
internal void setCommonProperties(Control control, Color bgColor, Color fgColor) { if (control.Enabled != _enabled || ((TagData)control.Tag).Enabled != _enabled) { GuiUtilsBase.setEnabled(control, Enabled); } if (control.Visible != Visible) { GuiUtilsBase.setVisible(control, Visible); } // fixed bug #:942320, the setFont is closed the combo box, need to do it only // if the font was changed if (Font == null || !Font.Equals(control.Font)) { ControlUtils.SetFont(control, Font); } GuiUtils.setRightToLeft(control, RightToLeft); MgLine line = control as MgLine; if (!(line != null && line.CreateAsTableHeaderChild)) { SetColors(control, bgColor, fgColor); } GuiUtils.SetControlName(control, Name); }
public static MgLine create() { global::System.IntPtr cPtr = touchvgPINVOKE.MgLine_create(); MgLine ret = (cPtr == global::System.IntPtr.Zero) ? null : new MgLine(cPtr, false); return(ret); }
protected override void UpdateControlInfo(Control control, int height) { MgLine line = control as MgLine; if (line != null) { TableCoordinatorBase coordinator = BoundsComputer as TableCoordinatorBase; if (coordinator != null) { Point start = coordinator.GetLeftTop(); Point end = coordinator.GetRightBottom(); if (start.X == end.X) { line.DirectionOfLine = LineDirection.Vertical; } else if (start.Y == end.Y) { line.DirectionOfLine = LineDirection.Horizontal; } else if ((start.X > end.X && start.Y < end.Y) || (start.X < end.X && start.Y > end.Y)) { line.DirectionOfLine = LineDirection.NESW; } else { line.DirectionOfLine = LineDirection.NWSE; } } } if (control is MgComboBox) { ControlUtils.SetComboBoxItemHeight(control, height); } }
/// <summary> /// sets prorties on MgLine /// </summary> /// <param name="control"></param> void SetControlProperties(Control control) { #if !PocketPC MgLine lineControl = control as MgLine; lineControl.LineColor = FgColor; lineControl.ControlStyle = LineHelper.Style; lineControl.LineWidth = LineHelper.LineWidth; lineControl.CtrlLineType = LineHelper.LineStyle; lineControl.BackColor = Color.Transparent; lineControl.ForeColor = Color.Transparent; #endif }
internal override void setSpecificControlProperties(Control control) { #if !PocketPC MgLine line = (MgLine)control; if (X1 == X2) { line.DirectionOfLine = LineDirection.Vertical; } else if (Y1 == Y2) { line.DirectionOfLine = LineDirection.Horizontal; } else if ((X1 < X2) == (Y1 > Y2)) // points 1 and 2 sizes can be in any order. What realy matters is if X is big when Y is big { line.DirectionOfLine = LineDirection.NESW; } else { line.DirectionOfLine = LineDirection.NWSE; } if (!GuiMgControl.IsTableHeaderChild) { line.StartPoint = new Point(X1, Y1); line.EndPoint = new Point(X2, Y2); } // base label control values line.Height = Math.Abs(Y2 - Y1); line.Width = Math.Abs(X2 - X1); line.Top = Math.Min(Y1, Y2); line.Left = Math.Min(X1, X2); if (GuiMgControl.IsTableHeaderChild) { SetControlProperties(control); } #endif }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MgLine obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MgLine obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }