protected override void PrepareControlHierarchy() { RenderUtils.AssignAttributes(this, RootTable); if (KeyboardSupport) { RootTable.AccessKey = string.Empty; } RenderUtils.SetVisibility(RootTable, IsClientVisible(), true); var appearanceStyle = IsEnabled() ? RenderHelper.GetRootTableStyle() : RenderHelper.GetDisabledRootTableStyle(); PrepareRootTableStyle(appearanceStyle); appearanceStyle.AssignToControl(RootTable, false); appearanceStyle.Paddings.AssignToControl(RootCell); if (Browser.IsIE && Browser.Version >= 8.0) { var paddings = new Paddings(0, 0, 0, 0); paddings.CopyFrom(appearanceStyle.Paddings); paddings.AssignToControl(RootCell); } RootTable.CellPadding = 0; RootTable.CellSpacing = 0; RootTable.Width = RenderHelper.GetRootTableWidth(); }
private static void smethod_3(Paddings A_0, Paddings A_1) { A_0.Bottom = A_1.Bottom; A_0.Top = A_1.Top; A_0.Left = A_1.Left; A_0.Right = A_1.Right; }
public static Bitmap RemoveFrame(Bitmap bitmap, Paddings padding, Color color) { int height = bitmap.Height; int width = bitmap.Width; var top = padding.Top; var right = width - padding.Right; var bottom = height - padding.Bottom; var left = padding.Left; Bitmap newbmp = new Bitmap(width, height); Color c; for (int i = 1; i < width - 1; i++) { for (int j = 1; j < height - 1; j++) { c = bitmap.GetPixel(i, j); if (i <= left || i >= right || j <= top || j >= bottom) { newbmp.SetPixel(i, j, color); } else { newbmp.SetPixel(i, j, c); } } } return(newbmp); }
public RemoveFrameFilter() { Padding = new Paddings { Left = 0, Top = 0, Right = 0, Bottom = 0 }; }
protected void method_18(RectangleF A_0, Paddings A_1) { this.method_2().imethod_0().method_1((double)A_1.Left); this.method_2().imethod_0().method_9((double)A_1.Right); this.method_2().imethod_0().method_5((double)A_1.Top); this.method_2().imethod_0().method_13((double)A_1.Bottom); this.class774_0 = new Class774(A_0, this.method_2(), this.interface1_1); }
private void AddTableRows(ITable table) { ITableRow tableRow; ITableCell tableCell; IText cellText; int i = 0; Paddings cellPaddings = new Paddings(3, 0, 5, 3); string modifiedDate; foreach (Order order in this.ordersData) { tableRow = table.AddRow(); tableRow.Height = new FixedHeight(30); Background cellBackgroundColor = (i % 2 == 0) ? new Background(Colors.White) : new Background(new Color(235, 235, 235)); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; cellText.AddContent(order.OrderID.ToString()); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; cellText.AddContent(order.ContactName.ToString()); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; cellText.AddContent(order.ShipAddress.ToString()); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; modifiedDate = order.OrderDate != null?string.Format("{0:d}", order.OrderDate) : ""; cellText.AddContent(modifiedDate); i++; } }
protected virtual void FixHeaderPaddings() { // Приходится менять Paddings у CellHeaderContent именно на этом этапе // Это самый простой способ реализовать видимость "корректного" поведения var defaultPaddings = new Paddings(6, 5, 5, 5); var rightToLeftPaddings = new Paddings(5, 5, 6, 5); var paddings = RoundPanel.RightToLeft == DefaultBoolean.True ? rightToLeftPaddings : defaultPaddings; RenderUtils.SetPaddings(CellHeaderContent, paddings); }
private void radioButton13_CheckedChanged(object sender, EventArgs e) { if (radioButton13.Checked) { padding = Paddings.Zeros; sa.Padding = PaddingMode.Zeros; } if (algorithm != 0 && mode != 0 && padding != 0) { textBox3.ReadOnly = false; button1.Enabled = true; } }
private void method_1(TableCell A_0, WordAttrCollection A_1) { VerticalAlignment bottom = VerticalAlignment.Bottom; TextOrientation horizontal = TextOrientation.Horizontal; bool flag = false; for (int i = 0; i < A_1.Count; i++) { int num3 = A_1.method_18(i); object obj2 = A_1.method_19(i); if (obj2 != null) { this.class86_0.int_0++; switch (num3) { case 1: { Borders borders = obj2 as Borders; if (!borders.Top.IsDefault) { this.class86_0.class1048_0.class411_0.border_0 = borders.Top; } if (!borders.Bottom.IsDefault) { this.class86_0.class1048_0.class411_1.border_0 = borders.Bottom; } if (!borders.Left.IsDefault) { this.class86_0.class1048_0.class411_2.border_0 = borders.Left; } if (!borders.Right.IsDefault) { this.class86_0.class1048_0.class411_3.border_0 = borders.Right; } this.class86_0.int_0--; continue; } case 2: { Paddings paddings = obj2 as Paddings; float top = paddings.Top; this.class86_0.class1048_0.class411_0.string_2 = Class576.smethod_42((double)paddings.Top); float single2 = paddings.Bottom; this.class86_0.class1048_0.class411_1.string_2 = Class576.smethod_42((double)paddings.Bottom); float left = paddings.Left; this.class86_0.class1048_0.class411_2.string_2 = Class576.smethod_42((double)paddings.Left); float right = paddings.Right; this.class86_0.class1048_0.class411_3.string_2 = Class576.smethod_42((double)paddings.Right); this.class86_0.int_0--; continue; } case 0xbea: { horizontal = (TextOrientation)obj2; this.class86_0.string_2 = Class922.smethod_12((TextOrientation)obj2); if (this.class86_0.string_2 == null) { this.class86_0.int_0--; } continue; } case 0xbf4: { flag = true; bottom = (VerticalAlignment)obj2; continue; } case 0xc62: { this.class86_0.string_0 = Class576.smethod_83((Class16)obj2); continue; } case 0x271a: { this.class86_0.class580_0 = (Class580)obj2; continue; } } this.class86_0.int_0--; } } this.method_2(A_0, bottom, horizontal, flag); this.method_4(A_0); this.method_3(A_0, (CellFormat)A_1); }
/// <summary> /// Initializes the drag drop object's constraints to restrict movement to a certain element. /// </summary> /// <param name="constrainTo">The element to constrain to.</param> /// <param name="pad">Pad provides a way to specify "padding" of the constraints</param> /// <param name="inContent">Constrain the draggable in the content box of the element (inside padding and borders)</param> public void ConstrainTo(string constrainTo, Paddings pad, bool inContent) { this.Call("constrainTo", new JRawValue(string.Concat("Ext.net.getEl(", TokenUtils.ParseAndNormalize(constrainTo), ")")), new JRawValue(pad.ToString()), inContent); }
protected override void PrepareControlHierarchy() { RenderUtils.AssignAttributes(this, RootTable); if (KeyboardSupport) RootTable.AccessKey = string.Empty; RenderUtils.SetVisibility(RootTable, IsClientVisible(), true); var appearanceStyle = IsEnabled() ? RenderHelper.GetRootTableStyle() : RenderHelper.GetDisabledRootTableStyle(); PrepareRootTableStyle(appearanceStyle); appearanceStyle.AssignToControl(RootTable, false); appearanceStyle.Paddings.AssignToControl(RootCell); if (Browser.IsIE && Browser.Version >= 8.0) { var paddings = new Paddings(0, 0, 0, 0); paddings.CopyFrom(appearanceStyle.Paddings); paddings.AssignToControl(RootCell); } RootTable.CellPadding = 0; RootTable.CellSpacing = 0; RootTable.Width = RenderHelper.GetRootTableWidth(); }
private void AddTableRows(ITable table) { ITableRow tableRow; ITableCell tableCell; IText cellText; int i = 0; Paddings cellPaddings = new Paddings(3, 0, 5, 3); string modifiedDate; foreach (Order order in this.ordersData) { tableRow = table.AddRow(); tableRow.Height = new FixedHeight(30); Background cellBackgroundColor = (i % 2 == 0) ? new Background(Colors.White) : new Background(new Color(235, 235, 235)); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; cellText.AddContent(order.OrderID.ToString()); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; cellText.AddContent(order.ContactName.ToString()); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; cellText.AddContent(order.ShipAddress.ToString()); tableCell = tableRow.AddCell(); tableCell.Paddings = cellPaddings; tableCell.Background = cellBackgroundColor; tableCell.Borders = bordersStyle; cellText = tableCell.AddText(); cellText.Style.Font = fontStyle; modifiedDate = order.OrderDate != null ? string.Format("{0:d}", order.OrderDate) : ""; cellText.AddContent(modifiedDate); i++; } }
private void method_160() { Paddings paddings = this.tableCell_0.CellFormat.Paddings; float left = this.tableCell_0.CellFormat.Paddings.Left; float right = this.tableCell_0.CellFormat.Paddings.Right; float top = this.tableCell_0.CellFormat.Paddings.Top; float bottom = this.tableCell_0.CellFormat.Paddings.Bottom; int num5 = this.method_132(); int num6 = (((Interface1)this.tableCell_0.OwnerRow).imethod_0() as Class211).method_101(); int num7 = this.tableCell_0.OwnerRow.Cells.Count - 1; int num8 = this.tableCell_0.OwnerRow.OwnerTable.Rows.Count - 1; float num9 = this.method_161(num5); float num10 = this.method_162(num5, num6); float num11 = this.method_163(num5, num7); float num12 = this.method_164(num5, num7, num6, num8); float num13 = 0f; if (this.tableCell_0.OwnerRow.OwnerTable.TableFormat.CellSpacingEx > 0f) { num13 = this.tableCell_0.OwnerRow.OwnerTable.TableFormat.CellSpacingEx * 2f; } if (this.tableCell_0.CellFormat.SamePaddingsAsTable) { if (this.tableCell_0.OwnerRow.HasTblPrEx) { left = this.tableCell_0.OwnerRow.RowFormat.Paddings.Left; right = this.tableCell_0.OwnerRow.RowFormat.Paddings.Right; top = this.tableCell_0.OwnerRow.RowFormat.Paddings.Top; bottom = this.tableCell_0.OwnerRow.RowFormat.Paddings.Bottom; } else { left = this.tableCell_0.OwnerRow.OwnerTable.TableFormat.Paddings.Left; right = this.tableCell_0.OwnerRow.OwnerTable.TableFormat.Paddings.Right; top = this.tableCell_0.OwnerRow.OwnerTable.TableFormat.Paddings.Top; bottom = this.tableCell_0.OwnerRow.OwnerTable.TableFormat.Paddings.Bottom; } for (int i = 0; i < this.tableCell_0.OwnerRow.Cells.Count; i++) { if (!this.tableCell_0.OwnerRow.Cells[i].CellFormat.SamePaddingsAsTable) { this.method_174(ref top, i); } } for (int j = 0; j < this.tableCell_0.OwnerRow.Cells.Count; j++) { if (!this.tableCell_0.OwnerRow.Cells[j].CellFormat.SamePaddingsAsTable) { this.method_176(ref bottom, j); } } } else { left = this.method_171(); right = this.method_172(); top = this.method_173(); bottom = this.method_175(); } base.Interface22.imethod_0().method_1(((left - num9) <= 0f) ? ((double)0f) : ((double)(left - num9))); base.Interface22.imethod_0().method_5((top > 0f) ? ((double)top) : ((this.tableCell_0.OwnerRow.RowFormat.Paddings.Top > 0f) ? ((double)this.tableCell_0.OwnerRow.RowFormat.Paddings.Top) : ((double)0f))); base.Interface22.imethod_0().method_9(((right - num11) <= 0f) ? ((double)0f) : ((double)(right - num11))); base.Interface22.imethod_0().method_13((bottom > 0f) ? ((double)bottom) : ((this.tableCell_0.OwnerRow.RowFormat.Paddings.Bottom > 0f) ? ((double)this.tableCell_0.OwnerRow.RowFormat.Paddings.Bottom) : ((double)0f))); base.Interface22.imethod_1().method_1((double)(num13 + num9)); base.Interface22.imethod_1().method_5((double)(num13 + num10)); base.Interface22.imethod_1().method_9((double)(num13 + num11)); base.Interface22.imethod_1().method_13((double)(num13 + num12)); }