protected override Size Relayout(Graphics g, LayoutStyle eLayoutStyle, bool bSetSize) { if (this.BaseItems.Count <= 0) { return(this.DisplayRectangle.Size); } // if (!this.BaseItems.OwnerEquals(this)) { ((ISetOwnerHelper)this.BaseItems).SetOwner(this); //key } // Rectangle rectangle = this.DisplayRectangle; Rectangle itemsRectangle = this.ItemsRectangle; // Size size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_LT(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, -1, -1, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, //this.Padding.Left, this.Padding.Top, this.Padding.Right, this.Padding.Bottom, CRT_MINWIDTH, -1, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); // if (!bSetSize) { return(size); } // this.Size = new Size(this.LockWith ? size.Width : this.DisplayRectangle.Width, this.LockHeight ? size.Height : this.DisplayRectangle.Height); // return(size); }
public void Test_CreatUIFormProperty() { //---------------Set up test pack------------------- IDefClassFactory defClassFactory = new DefClassFactory(); var label = TestUtil.GetRandomString(); var propertyName = TestUtil.GetRandomString(); var controlTypeName = TestUtil.GetRandomString(); var controlAssembly = TestUtil.GetRandomString(); var mapperTypeName = TestUtil.GetRandomString(); var mapperAssembly = TestUtil.GetRandomString(); var editable = TestUtil.GetRandomBoolean(); const bool showAsCompulsory = true; var toolTipText = TestUtil.GetRandomString(); const LayoutStyle layoutStyle = LayoutStyle.Label; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var uiFormField = defClassFactory.CreateUIFormProperty(label, propertyName , controlTypeName, controlAssembly, mapperTypeName, mapperAssembly, editable, showAsCompulsory, toolTipText, null, layoutStyle); //---------------Test Result ----------------------- Assert.AreEqual(label, uiFormField.Label); Assert.AreEqual(propertyName, uiFormField.PropertyName); Assert.AreEqual(controlTypeName, uiFormField.ControlTypeName); Assert.AreEqual(controlAssembly, uiFormField.ControlAssemblyName); Assert.AreEqual(mapperTypeName, uiFormField.MapperTypeName); Assert.AreEqual(editable, uiFormField.Editable); Assert.AreEqual(showAsCompulsory, uiFormField.IsCompulsory); Assert.AreEqual(toolTipText, uiFormField.ToolTipText); Assert.AreEqual(layoutStyle, uiFormField.Layout); }
/// <summary> /// The master constructor for all of the possible arguments /// </summary> private UIFormField(string label, string propertyName, Type controlType, string controlTypeName , string controlAssembly, string mapperTypeName, string mapperAssembly, bool editable , bool?showAsCompulsory, string toolTipText, Hashtable parameters, LayoutStyle layout) { if (controlType != null) { MyControlType = controlType; } else { _controlTypeName = controlTypeName; _controlAssembly = controlAssembly; } if (parameters == null) { parameters = new Hashtable(0); } Label = label; PropertyName = propertyName; MapperTypeName = mapperTypeName; MapperAssembly = mapperAssembly; Editable = editable; ToolTipText = toolTipText; Parameters = parameters; ShowAsCompulsory = showAsCompulsory; //_controlType = controlType; //_triggers = triggers ?? new TriggerCol(); Layout = layout; }
public static void Render(LogStatsDal dal, LiveViewOptions options, LayoutStyle layoutStyle) { Initialize(); List <DbccLogInfoItem> vlfs; try { vlfs = dal.ReadDbccLogInfo(null, true, options.ForceDbccLoginfo); } catch (Exception ex) { try { RenderException(options, ex); } catch { // Intentionally swallow any exceptions. } return; } using (Bitmap bitmap = CreateImage(vlfs, options, layoutStyle)) { if (options.DisplaySurface.InvokeRequired) { options.DisplaySurface.Invoke(new Action <LiveViewOptions, Bitmap>(SetImage), options, bitmap); } else { SetImage(options, bitmap); } } long totalLogSize = vlfs.Sum(v => v.FileSize); string displaySize = Utilities.FriendlySize(totalLogSize); DatabaseInfo dbInfo = dal.GetCurrentDatabaseInfo(); string statusMessage = $"Instance: {dal.InstanceName}; Database: {dal.DatabaseName}; Recovery model: {dbInfo.RecoveryModelDescription}; Log size: {displaySize}; VLFs: {vlfs.Count}; Wait: {dbInfo.LogReuseWaitDescription}; Last refresh: {DateTime.Now:HH:mm:ss}"; ToolStrip toolStrip = options.StatusLabel.GetCurrentParent(); if (toolStrip != null) { if (toolStrip.InvokeRequired) { toolStrip.Invoke(new Action <LiveViewOptions, string>(SetStatus), options, statusMessage); } else { SetStatus(options, statusMessage); } } }
private void LogicalToolStripMenuItem_Click(object sender, EventArgs e) { _currentLayoutStyle = LayoutStyle.Logical; physicalToolStripMenuItem.Checked = false; logicalToolStripMenuItem.Checked = true; if (_liveViewVisualizer != null) { _liveViewVisualizer.LayoutStyle = _currentLayoutStyle; } }
protected override Size Relayout(Graphics g, LayoutStyle eLayoutStyle, bool bSetSize) { Size size = base.Relayout(g, eLayoutStyle, bSetSize); // if (!size.IsEmpty) { this.Size = size; } // return(size); }
public LiveViewVisualizer(LiveViewOptions options, LayoutStyle layoutStyle) { if (options == null) { throw new ArgumentNullException(nameof(options)); } _options = options; _layoutStyle = layoutStyle; _isCancelled = false; _dal = new LogStatsDal(options.Connection); }
public override void Save(XmlDocument doc, XmlNode node, MpeParser parser, MpeControl reference) { if (doc != null && node != null) { base.Save(doc, node, parser, reference); //parser.SetValue(doc, node, "animation", Animation.ToString()); XmlElement mpenode = doc.CreateElement("mpe"); node.AppendChild(mpenode); parser.SetValue(doc, mpenode, "layout", LayoutStyle.ToString()); parser.SetValue(doc, mpenode, "spring", Spring ? "yes" : "no"); parser.SetInt(doc, mpenode, "spacing", Spacing); parser.SetPadding(doc, mpenode, "padding", Padding); if (backImage != null && backImage.Texture != null) { XmlElement image = doc.CreateElement("control"); backImage.Location = AbsoluteLocation; backImage.Save(doc, image, parser, parser.GetControl(MpeControlType.Image)); backImage.Location = Point.Empty; node.AppendChild(image); } if (reference != null) { for (int i = Controls.Count - 1; i >= 0; i--) { if (Controls[i] is MpeControl) { MpeControl control = (MpeControl)Controls[i]; try { XmlElement element = doc.CreateElement("control"); MpeControl referenceControl = parser.GetControl(control.Type); control.Save(doc, element, parser, referenceControl); node.AppendChild(element); } catch (Exception e) { MpeLog.Debug(e); MpeLog.Error(e); throw new MpeParserException(e.Message); } } } } } }
protected override Size Relayout(Graphics g, LayoutStyle eLayoutStyle, bool bSetSize) { if (this.BaseItems.Count <= 0) { return(this.Size); } // if (!this.BaseItems.OwnerEquals(this)) { ((ISetOwnerHelper)this.BaseItems).SetOwner(this); //key } // Rectangle rectangle = this.DisplayRectangle; Rectangle itemsRectangle = this.ItemsRectangle; // Size size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_LT(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, -1, -1, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, //this.Padding.Left, this.Padding.Top, this.Padding.Right, this.Padding.Bottom, CRT_MINWIDTH, -1, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); // if (!bSetSize) { return(size); } // if (!size.IsEmpty) { Size s = size; if (this.LockWith) { s.Width = size.Width; } if (this.LockHeight) { s.Height = size.Height; } this.Size = s; ((ISetBaseItemHelper)this).SetDisplayRectangle(this.Location.X, this.Location.Y, s.Width, s.Height); if (this.m_Entity != null) { this.m_Entity.Size = s; } } // return(size); }
private void LoadLayout() { string layoutAttribute = ""; try { layoutAttribute = _reader.GetAttribute("layout"); if (layoutAttribute != null) { _layout = (LayoutStyle)Enum.Parse(typeof(LayoutStyle), layoutAttribute); } } catch (Exception ex) { throw new InvalidXmlDefinitionException(String.Format( "In the definition for the field '{0}' the 'layout' " + "was set to an invalid value ('{1}'). The valid options are " + "Label and GroupBox.", _propertyName, layoutAttribute), ex); } }
private List <TableCell> CreateNumberInputCells(LayoutStyle style, int count) { List <TableCell> cells = new List <TableCell>(); if (style == LayoutStyle.Underline) { TableCell cell = CreateUnderlineCell(CalcHalfBoxCellWidth(count)); cells.Add(cell); } else if (style == LayoutStyle.Textbox) { TableCell cell = CreateBorderCell(CalcHalfBoxCellWidth(count)); cells.Add(cell); } else if (style == LayoutStyle.Box) { cells = CreateBorderCells(count, CalcHalfBoxCellWidth(1)); } return(cells); }
public void SetLayout(string title, LayoutStyle style) { // this.Page.Header.Title += ": " + title; this.Page.Header.Title = "Affinity Title Services: " + title; switch (style) { case LayoutStyle.Photo_01: this.stage.Attributes.Add("class", "stage clearfix table home"); this.leftside.Attributes.Add("class", "td logincontent"); this.rightside.Attributes.Add("class", "td photo_01"); this.content.Attributes.Add("class", "login"); break; default: // we don't need to do this because this is the default setting already, but if we did: // this.stage.Attributes.Add("class", "stage clearfix"); break; } }
public static Vector3[] CalcutePoints(int xCount, int yCount, int zCount, float xSpan, float ySpan, float zSpan, LayoutStyle style, List <Bounds> bounds) { switch (style) { case LayoutStyle.Normal: return(CalcuteNormalPoints(xCount, yCount, zCount, xSpan, ySpan, zSpan, bounds)); case LayoutStyle.Cross: return(CalcuteCrossPoints(xCount, yCount, zCount, xSpan, ySpan, zSpan, bounds)); default: break; } return(null); }
///<summary> ///</summary> ///<param name="label"></param> ///<param name="propertyName"></param> ///<param name="controlTypeName"></param> ///<param name="controlAssembly"></param> ///<param name="mapperTypeName"></param> ///<param name="mapperAssembly"></param> ///<param name="editable"></param> ///<param name="showAsCompulsory"></param> ///<param name="toolTipText"></param> ///<param name="propertyAttributes"></param> ///<param name="layout"></param> ///<returns></returns> public IUIFormField CreateUIFormProperty(string label, string propertyName, string controlTypeName, string controlAssembly, string mapperTypeName, string mapperAssembly, bool editable, bool?showAsCompulsory, string toolTipText, Hashtable propertyAttributes, LayoutStyle layout) { return(new UIFormField(label, propertyName, controlTypeName, controlAssembly, mapperTypeName, mapperAssembly, editable, showAsCompulsory, toolTipText, propertyAttributes, layout)); }
///<summary> ///</summary> ///<param name="label"></param> ///<param name="propertyName"></param> ///<param name="controlTypeName"></param> ///<param name="controlAssembly"></param> ///<param name="mapperTypeName"></param> ///<param name="mapperAssembly"></param> ///<param name="editable"></param> ///<param name="showAsCompulsory"></param> ///<param name="toolTipText"></param> ///<param name="propertyAttributes"></param> ///<param name="layout"></param> ///<returns></returns> public IUIFormField CreateUIFormProperty(string label, string propertyName, string controlTypeName, string controlAssembly, string mapperTypeName, string mapperAssembly, bool editable, bool? showAsCompulsory, string toolTipText, Hashtable propertyAttributes, LayoutStyle layout) { return new UIFormField(label, propertyName, controlTypeName, controlAssembly, mapperTypeName, mapperAssembly, editable, showAsCompulsory, toolTipText, propertyAttributes, layout); }
public override Id InitWithFrame(NSRect frame) { this.NativePointer = this.SendMessageSuper<IntPtr>(SimpleLayoutViewClass, "initWithFrame:", frame); this.layoutStyle = LayoutStyle.ColumnLayout; return this; }
/// <summary> /// The master constructor for all of the possible arguments /// </summary> private UIFormField(string label, string propertyName, Type controlType, string controlTypeName , string controlAssembly, string mapperTypeName, string mapperAssembly, bool editable , bool? showAsCompulsory, string toolTipText, Hashtable parameters, LayoutStyle layout) { if (controlType != null) { MyControlType = controlType; } else { _controlTypeName = controlTypeName; _controlAssembly = controlAssembly; } if (parameters == null) parameters = new Hashtable(0); Label = label; PropertyName = propertyName; MapperTypeName = mapperTypeName; MapperAssembly = mapperAssembly; Editable = editable; ToolTipText = toolTipText; Parameters = parameters; ShowAsCompulsory = showAsCompulsory; //_controlType = controlType; //_triggers = triggers ?? new TriggerCol(); Layout = layout; }
public string Like(string href = "", string linkReference = "", bool showFaces = false, int width = 510, string font = "arial", string style = "", LikeVerb action = LikeVerb.Like, ColorScheme colorScheme = ColorScheme.Light, LayoutStyle layout = LayoutStyle.Standard) { return string.Format("<fb:like href=\"{0}\" ref=\"{1}\" show_faces=\"{2}\" width=\"{3}\" font=\"{4}\" style=\"{5}\" action=\"{6}\" colorscheme=\"{7}\" layout=\"{8}\"></fb:like>", href, linkReference, showFaces, width, font, style, action.ToString().ToLower(), colorScheme.ToString().ToLower(), layout.ToString().ToLower()); }
partial void ChangeLayout(Id sender) { this.LayoutStyle = (LayoutStyle) sender.SendMessage<int>("selectedTag"); }
/// <summary> /// Constructor to initialise a new definition /// </summary> /// <param name="label">The label</param> /// <param name="propertyName">The property name</param> /// <param name="controlType">The control type</param> /// <param name="mapperTypeName">The mapper type name</param> /// <param name="mapperAssembly">The mapper assembly</param> /// <param name="editable">Whether the control is editable or not</param> /// <param name="toolTipText">The tool tip text to be used.</param> /// <param name="parameters">The property attributes</param> /// <param name="layout">The <see cref="LayoutStyle"/> to use</param> public UIFormField(string label, string propertyName, Type controlType, string mapperTypeName, string mapperAssembly, bool editable, string toolTipText, Hashtable parameters, LayoutStyle layout) : this(label, propertyName, controlType, null, null, mapperTypeName, mapperAssembly, editable , null, toolTipText, parameters, layout) { }
private List<TableCell> CreateNumberInputCells(LayoutStyle style, int count) { List<TableCell> cells = new List<TableCell>(); if (style == LayoutStyle.Underline) { TableCell cell = CreateUnderlineCell(CalcHalfBoxCellWidth(count)); cells.Add(cell); } else if (style == LayoutStyle.Textbox) { TableCell cell = CreateBorderCell(CalcHalfBoxCellWidth(count)); cells.Add(cell); } else if (style == LayoutStyle.Box) { cells = CreateBorderCells(count, CalcHalfBoxCellWidth(1)); } return cells; }
/// <summary> /// Constructor to initialise a new definition /// </summary> /// <param name="label">The label</param> /// <param name="propertyName">The property name</param> /// <param name="controlTypeName">The control type name</param> /// <param name="controlAssembly">The control assembly</param> /// <param name="mapperTypeName">The mapper type name</param> /// <param name="mapperAssembly">The mapper assembly</param> /// <param name="editable">Whether the control is editable or not</param> /// <param name="showAsComulsory"></param> /// <param name="toolTipText">The tool tip text to be used.</param> /// <param name="parameters">The property attributes</param> /// <param name="layout">The <see cref="LayoutStyle"/> to use</param> public UIFormField(string label, string propertyName, string controlTypeName , string controlAssembly, string mapperTypeName, string mapperAssembly, bool editable , bool?showAsComulsory, string toolTipText, Hashtable parameters, LayoutStyle layout) : this(label, propertyName, null, controlTypeName, controlAssembly, mapperTypeName, mapperAssembly, editable, showAsComulsory, toolTipText, parameters, layout) { }
protected virtual Size Relayout(Graphics g, LayoutStyle eLayoutStyle, bool bSetSize) { if (this.BaseItems.Count <= 0) { return(this.Size); } // Rectangle rectangle = this.DisplayRectangle; Rectangle itemsRectangle = this.ItemsRectangle; // Size size = Size.Empty; if (this.ReverseLayout) { switch (this.eOrientation) { case Orientation.Horizontal: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_RB(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; case Orientation.Vertical: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackV_RB(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.LineDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; default: break; } } else { switch (this.eOrientation) { case Orientation.Horizontal: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_LT(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; case Orientation.Vertical: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackV_LT(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.LineDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; default: break; } } // if (!bSetSize) { return(size); } // if (!size.IsEmpty) { if (this.LockWith && this.Dock != DockStyle.Top && this.Dock != DockStyle.Bottom && this.Dock != DockStyle.Fill) { this.Width = size.Width; } if (this.LockHeight && this.Dock != DockStyle.Left && this.Dock != DockStyle.Right && this.Dock != DockStyle.Fill) { this.Height = size.Height; } } // return(size); }
private static Bitmap CreateImage(List <DbccLogInfoItem> vlfs, LiveViewOptions options, LayoutStyle layoutStyle) { int width = Math.Max(options.DisplaySurface.Width, 1); int height = Math.Max(options.DisplaySurface.Height, 1); Bitmap bitmap = new Bitmap(width, height); if (layoutStyle == LayoutStyle.Logical) { // If logical style is requested, make a copy of the VLF list and sort by the VLF number. vlfs = new List <DbccLogInfoItem>(vlfs); vlfs.Sort(new VlfComparer()); } using (Graphics graphics = Graphics.FromImage(bitmap)) { double scale = GenerateBlocks(vlfs, options, graphics, 1.0, true); GenerateBlocks(vlfs, options, graphics, scale, false); } return(bitmap); }
public static void GetGrid(LayoutStyle style, AGrid grid) { }
public override void OnInspectorGUI() { LayoutGroup = target as LayoutGroup3D; DrawDefaultInspector(); bool shouldRebuild = false; // Record rotations of all children if not forcing alignment in radial mode if (!(LayoutGroup.Style == LayoutStyle.Radial && LayoutGroup.AlignToRadius)) { LayoutGroup.RecordRotations(); } // Element Dimensions EditorGUI.BeginChangeCheck(); ElementDimensions = EditorGUILayout.Vector3Field("Element Dimensions", LayoutGroup.ElementDimensions); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Element Dimensions"); LayoutGroup.ElementDimensions = ElementDimensions; shouldRebuild = true; } // Start Offset EditorGUI.BeginChangeCheck(); StartPositionOffset = EditorGUILayout.Vector3Field("Start Position Offset", LayoutGroup.StartPositionOffset); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Position Offset"); LayoutGroup.StartPositionOffset = StartPositionOffset; shouldRebuild = true; } EditorGUI.BeginChangeCheck(); Style = (LayoutStyle)EditorGUILayout.EnumPopup("Layout Style", LayoutGroup.Style); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Layout Style"); LayoutGroup.Style = Style; shouldRebuild = true; } EditorGUI.BeginChangeCheck(); if (Style == LayoutStyle.Linear) { LayoutAxis = (LayoutAxis3D)EditorGUILayout.EnumPopup("Layout Axis", LayoutGroup.LayoutAxis); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Layout Axis"); LayoutGroup.LayoutAxis = LayoutAxis; shouldRebuild = true; } } else if (Style == LayoutStyle.Grid) { GridLayoutAxis = (LayoutAxis2D)EditorGUILayout.EnumPopup("Primary Layout Axis", LayoutGroup.GridLayoutAxis); GridConstraintCount = EditorGUILayout.IntField("Constraint Count", LayoutGroup.GridConstraintCount); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Grid Layout Options"); LayoutGroup.GridConstraintCount = GridConstraintCount; LayoutGroup.GridLayoutAxis = GridLayoutAxis; shouldRebuild = true; } } else if (Style == LayoutStyle.Euclidean) { LayoutAxis = (LayoutAxis3D)EditorGUILayout.EnumPopup("Primary Layout Axis", LayoutGroup.LayoutAxis); SecondaryLayoutAxis = (LayoutAxis3D)EditorGUILayout.EnumPopup("Secondary Layout Axis", LayoutGroup.SecondaryLayoutAxis); GridConstraintCount = EditorGUILayout.IntField("Primary Constraint Count", LayoutGroup.GridConstraintCount); SecondaryConstraintCount = EditorGUILayout.IntField("Secondary Constraint Count", LayoutGroup.SecondaryConstraintCount); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Euclidean Layout Options"); LayoutGroup.GridConstraintCount = GridConstraintCount; LayoutGroup.SecondaryConstraintCount = SecondaryConstraintCount; LayoutGroup.LayoutAxis = LayoutAxis; LayoutGroup.SecondaryLayoutAxis = SecondaryLayoutAxis; shouldRebuild = true; } } else if (Style == LayoutStyle.Radial) { MaxArcAngle = EditorGUILayout.FloatField("Max Arc Angle", LayoutGroup.MaxArcAngle); Radius = EditorGUILayout.FloatField("Radius", LayoutGroup.Radius); StartAngleOffset = EditorGUILayout.FloatField("Start Angle Offset", LayoutGroup.StartAngleOffset); SpiralFactor = EditorGUILayout.FloatField("Spiral Factor", LayoutGroup.SpiralFactor); AlignToRadius = EditorGUILayout.Toggle("Align To Radius", LayoutGroup.AlignToRadius); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change Radial Layout Options"); LayoutGroup.MaxArcAngle = MaxArcAngle; LayoutGroup.Radius = Radius; LayoutGroup.StartAngleOffset = StartAngleOffset; LayoutGroup.SpiralFactor = SpiralFactor; LayoutGroup.AlignToRadius = AlignToRadius; shouldRebuild = true; } } if (LayoutGroup.Style != LayoutStyle.Radial) { EditorGUI.BeginChangeCheck(); Spacing = EditorGUILayout.FloatField("Spacing", LayoutGroup.Spacing); if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(LayoutGroup, "Change spacing"); LayoutGroup.Spacing = Spacing; shouldRebuild = true; } } if (!(LayoutGroup.Style == LayoutStyle.Radial && LayoutGroup.AlignToRadius)) { LayoutGroup.RestoreRotations(); } if (LayoutGroup.HasChildCountChanged() || shouldRebuild) { LayoutGroup.RebuildLayout(); } }
protected override Size Relayout(Graphics g, LayoutStyle eLayoutStyle, bool bSetSize) { if (this.BaseItems.Count <= 0) { return(this.DisplayRectangle.Size); } // Rectangle rectangle = this.DisplayRectangle; Rectangle itemsRectangle = this.ItemsRectangle; // Size size = System.Drawing.Size.Empty; if (this.eTabButtonContainerStyle == TabButtonContainerStyle.eContextButton || this.eTabButtonContainerStyle == TabButtonContainerStyle.eCloseButton || this.eTabButtonContainerStyle == TabButtonContainerStyle.eContextButtonAndCloseButton) { if (this.ReverseLayout) { switch (this.eOrientation) { case Orientation.Horizontal: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_RB(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; case Orientation.Vertical: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackV_RB(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.LineDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; default: break; } } else { switch (this.eOrientation) { case Orientation.Horizontal: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_LT(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; case Orientation.Vertical: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackV_LT(g, this, 0, this.IsStretchItems, this.IsRestrictItems, this.LineDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; default: break; } } } else { if (this.ReverseLayout) { switch (this.eOrientation) { case Orientation.Horizontal: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_RB(g, this, this.TopViewItemIndex, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; case Orientation.Vertical: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackV_RB(g, this, this.TopViewItemIndex, this.IsStretchItems, this.IsRestrictItems, this.LineDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; default: break; } } else { switch (this.eOrientation) { case Orientation.Horizontal: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackH_LT(g, this, this.TopViewItemIndex, this.IsStretchItems, this.IsRestrictItems, this.ColumnDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; case Orientation.Vertical: size = GISShare.Controls.WinForm.WFNew.LayoutEngine.LayoutStackV_LT(g, this, this.TopViewItemIndex, this.IsStretchItems, this.IsRestrictItems, this.LineDistance, this.RestrictItemsWidth, this.RestrictItemsHeight, itemsRectangle.Left - rectangle.Left, itemsRectangle.Top - rectangle.Top, rectangle.Right - itemsRectangle.Right, rectangle.Bottom - itemsRectangle.Bottom, this.MinSize, this.MaxSize, eLayoutStyle, ref this._OverflowItemsCount, ref this._DrawItemsCount); break; default: break; } } } // if (!bSetSize) { return(size); } // if (!size.IsEmpty) { this.Size = new Size(this.LockWith ? size.Width : this.Size.Width, this.LockHeight ? size.Height : this.Size.Height); } // return(size); }
private Silanis.ESL.API.PackageSettings CreateTypicalAPIPackageSettings() { Silanis.ESL.API.CeremonySettings apiCeremonySettings = new Silanis.ESL.API.CeremonySettings(); apiCeremonySettings.InPerson = false; apiCeremonySettings.Ada = true; apiCeremonySettings.DeclineButton = true; apiCeremonySettings.OptOutButton = true; apiCeremonySettings.AddDeclineReason("Decline reason one"); apiCeremonySettings.AddDeclineReason("Decline reason two"); apiCeremonySettings.AddDeclineReason("Decline reason three"); apiCeremonySettings.AddOptOutReason("Opt out reason one"); apiCeremonySettings.AddOptOutReason("Opt out reason two"); apiCeremonySettings.AddOptOutReason("Opt out reason three"); Silanis.ESL.API.Link link = new Silanis.ESL.API.Link(); link.Href = "http://www.google.ca"; link.Text = "click here"; apiCeremonySettings.HandOver = link; apiCeremonySettings.HideCaptureText = true; apiCeremonySettings.HideWatermark = true; apiCeremonySettings.MaxAuthFailsAllowed = 3; apiCeremonySettings.DisableFirstInPersonAffidavit = true; apiCeremonySettings.DisableSecondInPersonAffidavit = true; apiCeremonySettings.HideLanguageDropdown = true; apiCeremonySettings.HidePackageOwnerInPerson = true; Style style = new Style(); style.BackgroundColor = "white"; style.Color = "blue"; LayoutStyle layoutStyle = new LayoutStyle(); layoutStyle.Dialog = style; apiCeremonySettings.Style = layoutStyle; LayoutOptions layoutOptions = new LayoutOptions(); layoutOptions.Iframe = false; apiCeremonySettings.Layout = layoutOptions; HeaderOptions headerOptions = new HeaderOptions(); headerOptions.Breadcrumbs = true; headerOptions.Feedback = true; GlobalActionsOptions globalActionsOptions = new GlobalActionsOptions(); globalActionsOptions.Confirm = true; globalActionsOptions.Download = true; globalActionsOptions.SaveAsLayout = true; headerOptions.GlobalActions = globalActionsOptions; layoutOptions.Header = headerOptions; Silanis.ESL.API.PackageSettings apiPackageSettings = new Silanis.ESL.API.PackageSettings(); apiPackageSettings.Ceremony = apiCeremonySettings; return(apiPackageSettings); }
public FlexLayoutStyle(LayoutStyle style = default, int?minAlongSize = null, int?minPerpendicularSize = null) { InnerStyle = style; MinAlongSize = minAlongSize; MinPerpendicularSize = minPerpendicularSize; }
public FakeUIFormField(string label, string propertyName, string controlTypeName, string controlAssembly, string mapperTypeName, string mapperAssembly, bool editable, bool? showAsComulsory, string toolTipText, Hashtable parameters, LayoutStyle layout) : base(label, propertyName, controlTypeName, controlAssembly, mapperTypeName, mapperAssembly, editable, showAsComulsory, toolTipText, parameters, layout) { }
private void LoadLayout() { string layoutAttribute = ""; try { layoutAttribute = _reader.GetAttribute("layout"); if(layoutAttribute != null) _layout = (LayoutStyle) Enum.Parse(typeof(LayoutStyle), layoutAttribute); } catch (Exception ex) { throw new InvalidXmlDefinitionException(String.Format( "In the definition for the field '{0}' the 'layout' " + "was set to an invalid value ('{1}'). The valid options are " + "Label and GroupBox.", _propertyName, layoutAttribute), ex); } }