private void ZoomPlotArea(ZoomBoundsInfo infos, PlotArea plotArea) { if (plotArea == null) { return; } if (plotArea.LocationDefault.X > 0 || plotArea.LocationDefault.Y > 0) { plotArea.LocationDefault = ZoomPoint(infos, plotArea.LocationDefault); } if (plotArea.SizeDefault.Width > 0 || plotArea.SizeDefault.Height > 0) { plotArea.SizeDefault = ZoomSize(infos, plotArea.SizeDefault); } foreach (AlarmZone alarmZone in plotArea.AlarmZones) { if (alarmZone.MinHeight > 0) { alarmZone.MinHeight = infos.Zoom(alarmZone.MinHeight); } if (alarmZone.MinWidth > 0) { alarmZone.MinWidth = infos.Zoom(alarmZone.MinWidth); } } }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { C1BarCode barcode = control as C1BarCode; barcode.ModuleSize = infos.Zoom(barcode.ModuleSize); barcode.BarHeight = infos.Zoom(barcode.BarHeight); base.ZoomBounds(control, infos); }
private void ZoomChart3DStyle(ZoomBoundsInfo infos, Chart3DStyle Style) { if (Style.SymbolStyle.Size > 0) { Style.SymbolStyle.Size = infos.Zoom(Style.SymbolStyle.Size); } Style.LineStyle.Thickness = infos.Zoom(Style.LineStyle.Thickness); }
private static Size ZoomSize(ZoomBoundsInfo infos, Size size) { int width = size.Width; int height = size.Height; width = width > 0 ? infos.Zoom(width) : width; height = height > 0 ? infos.Zoom(height) : height; return(new Size(width, height)); }
private Point ZoomPoint(ZoomBoundsInfo infos, Point point) { int x = point.X; int y = point.Y; x = x > 0 ? infos.Zoom(x) : x; y = y > 0 ? infos.Zoom(y) : y; return(new Point(x, y)); }
private void ZoomAxis(ZoomBoundsInfo infos, Axis axis) { if (axis == null) { return; } axis.Thickness = infos.Zoom(axis.Thickness); foreach (ValueLabel valueLabel in axis.ValueLabels) { if (valueLabel.MarkerSize > 0) { valueLabel.MarkerSize = infos.Zoom(valueLabel.MarkerSize); } } }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { C1OutBar outBar = control as C1OutBar; outBar.PageTitleHeight = infos.Zoom(outBar.PageTitleHeight); base.ZoomBounds(control, infos); }
private void ZoomSymbolStyle(ZoomBoundsInfo infos, ChartSymbolStyle symbolStyle) { if (symbolStyle.Size > 0 && !_zoomedSymbolStyle.Contains(symbolStyle)) { symbolStyle.Size = infos.Zoom(symbolStyle.Size); _zoomedSymbolStyle.Add(symbolStyle); } }
private void ZoomContourStyles(ZoomBoundsInfo infos, Chart3DContourStyle style) { if (style.LineStyle.Thickness > 0 && !_zoomedContourStyles.Contains(style)) { style.LineStyle.Thickness = infos.Zoom(style.LineStyle.Thickness); _zoomedContourStyles.Add(style); } }
private void ZoomLineStyle(ZoomBoundsInfo infos, ChartLineStyle lineStyle) { if (lineStyle.Thickness > 0 && !_zoomedLineStyles.Contains(lineStyle)) { lineStyle.Thickness = infos.Zoom(lineStyle.Thickness); _zoomedLineStyles.Add(lineStyle); } }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { base.ZoomBounds(control, infos); C1DockingTab dockingTab = control as C1DockingTab; try { dockingTab.ItemSize = infos.Zoom(dockingTab.ItemSize); } catch (Exception) { // When the docking tab is collapse, set ItemSize property may throw exception. // If this case occurs, set the ItemSize to Size.Empty as a workaround. dockingTab.ItemSize = Size.Empty; } dockingTab.SplitterWidth = infos.Zoom(dockingTab.SplitterWidth); dockingTab.TabsSpacing = infos.Zoom(dockingTab.TabsSpacing); dockingTab.TabAreaSpacing = infos.Zoom(dockingTab.TabAreaSpacing); }
private void ZoomAxis(ZoomBoundsInfo infos, Chart3DAxis axis) { if (axis == null) { return; } if (axis.MajorGrid.Style.Thickness > 0) { axis.MajorGrid.Style.Thickness = infos.Zoom(axis.MajorGrid.Style.Thickness); } }
private void ZoomChartLabel(ZoomBoundsInfo infos, Label label) { if (label == null) { return; } if (label.AttachMethodData.X > 0 || label.AttachMethodData.Y > 0) { double x = label.AttachMethodData.X; double y = label.AttachMethodData.Y; x = x > 0 ? infos.Zoom(x) : x; y = y > 0 ? infos.Zoom(y) : y; label.AttachMethodData.X = x; label.AttachMethodData.Y = y; } if (label.SizeDefault.Width > 0 || label.SizeDefault.Height > 0) { label.SizeDefault = ZoomSize(infos, label.SizeDefault); } }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { base.ZoomBounds(control, infos); C1Schedule schedule = control as C1Schedule; if (schedule.AppointmentHeight > 0) { schedule.AppointmentHeight = infos.Zoom(schedule.AppointmentHeight); } control.Refresh(); }
public override void ZoomBounds(System.Windows.Forms.Control control, ZoomBoundsInfo infos) { var previewPane = control as C1PreviewPane; if (previewPane.ZoomMode == ZoomModeEnum.Custom || previewPane.ZoomMode == ZoomModeEnum.ActualSize) { previewPane.ZoomFactor = infos.Zoom(previewPane.ZoomFactor); } base.ZoomBounds(control, infos); }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { var size = control.MaximumSize; // Change the MaxSize to make sure the Size can be changed. control.MaximumSize = new Size(control.Width, control.Height); base.ZoomBounds(control, infos); control.MaximumSize = infos.Zoom(size); control.Refresh(); }
public override void ZoomBounds(System.Windows.Forms.Control control, ZoomBoundsInfo infos) { C1FlexGrid flexGrid = control as C1FlexGrid; flexGrid.Cols.DefaultSize = infos.Zoom(_flexGridInfoCache[control].DefaultColSize); flexGrid.Rows.DefaultSize = infos.Zoom(_flexGridInfoCache[control].DefaultRowSize); if (flexGrid.Rows.MinSize > 0) { flexGrid.Rows.MinSize = infos.Zoom(flexGrid.Rows.MinSize); } if (flexGrid.Cols.MinSize > 0) { flexGrid.Cols.MinSize = infos.Zoom(flexGrid.Cols.MinSize); } if (!_zoomedCols.ContainsKey(flexGrid.Cols)) { // The columns may be shared by multi flex grid. _zoomedCols.Add(flexGrid.Cols, null); foreach (Column column in flexGrid.Cols) { if (column.Width > 0) { column.Width = infos.Zoom(column.Width); } } } if (!_zoomedCols.ContainsKey(flexGrid.Rows)) { // The rows may be shared by multi flex grid. _zoomedCols.Add(flexGrid.Rows, null); foreach (Row row in flexGrid.Rows) { if (row.Height > 0) { row.Height = infos.Zoom(row.Height); } } } base.ZoomBounds(control, infos); }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { base.ZoomBounds(control, infos); C1NavBar navBar = control as C1NavBar; if (navBar.ButtonHeight > 0) { navBar.ButtonHeight = infos.Zoom(navBar.ButtonHeight); } if (navBar.ImageIndent > 0) { navBar.ImageIndent = infos.Zoom(navBar.ImageIndent); } if (navBar.PanelHeaderHeight > 0) { navBar.PanelHeaderHeight = infos.Zoom(navBar.PanelHeaderHeight); } if (navBar.SectionHeaderHeight > 0) { navBar.SectionHeaderHeight = infos.Zoom(navBar.SectionHeaderHeight); } if (navBar.SectionHeaderIndent > 0) { navBar.SectionHeaderIndent = infos.Zoom(navBar.SectionHeaderIndent); } if (navBar.StripHeight > 0) { navBar.StripHeight = infos.Zoom(navBar.StripHeight); } if (!navBar.ImageScalingSize.IsEmpty) { navBar.ImageScalingSize = infos.Zoom(navBar.ImageScalingSize); } }
public override void ZoomBounds(Control control, ZoomBoundsInfo infos) { C1TrueDBGrid trueDBGrid = control as C1TrueDBGrid; if (trueDBGrid.CellTipsWidth > 0) { trueDBGrid.CellTipsWidth = infos.Zoom(trueDBGrid.CellTipsWidth); } if (trueDBGrid.DefColWidth > 0) { trueDBGrid.DefColWidth = infos.Zoom(trueDBGrid.DefColWidth); } if (trueDBGrid.RecordSelectorWidth > 0) { trueDBGrid.RecordSelectorWidth = infos.Zoom(trueDBGrid.RecordSelectorWidth); } if (trueDBGrid.ViewCaptionWidth > 0) { trueDBGrid.ViewCaptionWidth = infos.Zoom(trueDBGrid.ViewCaptionWidth); } if (trueDBGrid.ViewColumnWidth > 0) { trueDBGrid.ViewColumnWidth = infos.Zoom(trueDBGrid.ViewColumnWidth); } if (trueDBGrid.CaptionHeight > 0) { trueDBGrid.CaptionHeight = infos.Zoom(trueDBGrid.CaptionHeight); } if (trueDBGrid.RowHeight > 0) { trueDBGrid.RowHeight = infos.Zoom(trueDBGrid.RowHeight); } if (!trueDBGrid.SplitDividerSize.IsEmpty) { trueDBGrid.SplitDividerSize = infos.Zoom(trueDBGrid.SplitDividerSize); } foreach (Split split in trueDBGrid.Splits) { if (split.CaptionHeight > 0) { split.CaptionHeight = infos.Zoom(split.CaptionHeight); } if (split.ColumnCaptionHeight > 0) { split.ColumnCaptionHeight = infos.Zoom(split.ColumnCaptionHeight); } if (split.ColumnFooterHeight > 0) { split.ColumnFooterHeight = infos.Zoom(split.ColumnFooterHeight); } if (split.Height > 0) { split.Height = infos.Zoom(split.Height); } if (split.MinHeight > 0) { split.MinHeight = infos.Zoom(split.MinHeight); } if (split.MinWidth > 0) { split.MinWidth = infos.Zoom(split.MinWidth); } if (split.SplitSize > 0) { split.SplitSize = infos.Zoom(split.SplitSize); } foreach (C1DisplayColumn column in split.DisplayColumns) { if (column.Width > 0) { column.Width = infos.Zoom(column.Width); } if (column.Height > 0) { column.Height = infos.Zoom(column.Height); } } foreach (ViewRow row in split.Rows) { if (row.Width > 0) { row.Width = infos.Zoom(row.Width); } if (row.Height > 0) { row.Height = infos.Zoom(row.Height); } } } foreach (C1DataColumn column in trueDBGrid.Columns) { if (column.DataWidth > 0) { column.DataWidth = infos.Zoom(column.DataWidth); } } base.ZoomBounds(control, infos); }