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 ZoomChartView(ZoomBoundsInfo infos, Chart3DView view) { if (view == null) { return; } }
private void ZoomChartGroups(ZoomBoundsInfo infos, Chart3DGroups groups) { if (groups == null) { return; } foreach (Chart3DStyle style in groups.ChartStyles) { ZoomChart3DStyle(infos, style); } foreach (Chart3DContourStyle style in groups.ContourStyles.Styles) { ZoomContourStyles(infos, style); } foreach (Chart3DGroup group in groups.ChartGroupsCollection) { if (group.Contour != null) { foreach (Chart3DContourLevel level in group.Contour.Levels) { ZoomContourStyles(infos, level.Style); } } if (group.ChartData.SetPoint != null) { foreach (Chart3DPointSeries series in group.ChartData.SetPoint.SeriesCollection) { ZoomDataSeries(infos, series); } } } }
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) { MyImageButton imageBUtton = control as MyImageButton; imageBUtton.ImageFactor = infos.TargetFactor; base.ZoomBounds(control, infos); }
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 void ZoomDataSeries(ZoomBoundsInfo infos, Chart3DPointSeries dataSeries) { if (dataSeries == null) { return; } ZoomChart3DStyle(infos, dataSeries.Style); }
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 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 ZoomLineStyle(ZoomBoundsInfo infos, ChartLineStyle lineStyle) { if (lineStyle.Thickness > 0 && !_zoomedLineStyles.Contains(lineStyle)) { lineStyle.Thickness = infos.Zoom(lineStyle.Thickness); _zoomedLineStyles.Add(lineStyle); } }
private void ZoomSymbolStyle(ZoomBoundsInfo infos, ChartSymbolStyle symbolStyle) { if (symbolStyle.Size > 0 && !_zoomedSymbolStyle.Contains(symbolStyle)) { symbolStyle.Size = infos.Zoom(symbolStyle.Size); _zoomedSymbolStyle.Add(symbolStyle); } }
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 void ZoomDataSeries(ZoomBoundsInfo infos, ChartDataSeries dataSeries) { if (dataSeries == null) { return; } ZoomSymbolStyle(infos, dataSeries.SymbolStyle); ZoomLineStyle(infos, dataSeries.LineStyle); }
private void ZoomChartLabels(ZoomBoundsInfo infos, ChartLabels labels) { if (labels == null) { return; } foreach (Label label in labels.LabelsCollection) { ZoomChartLabel(infos, label); } }
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); } }
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(Control control, ZoomBoundsInfo infos) { C1InputPanel ip = control as C1InputPanel; if (ip != null) { ip.UpdateFontZoom(infos.TargetFactor, false); float k = infos.TargetFactor / infos.CurrentFactor; control.Scale(new SizeF(k, k)); } }
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); }
private void ZoomCommandLinksBounds(ZoomBoundsInfo infos, C1CommandLinks commandLinks) { foreach (C1CommandLink commandLink in commandLinks) { if (commandLink.Command is C1CommandMenu) { C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu; ZoomCommandLinksBounds(infos, commandMenu.CommandLinks); return; } } }
public override void ZoomBounds(System.Windows.Forms.Control control, ZoomBoundsInfo infos) { C1Chart chart = control as C1Chart; ZoomChartGroups(infos, chart.ChartGroups); ZoomChartArea(infos, chart.ChartArea); ZoomTitle(infos, chart.Header); ZoomTitle(infos, chart.Footer); ZoomLegend(infos, chart.Legend); ZoomChartLabels(infos, chart.ChartLabels); 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(); }
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); } } }
private void ZoomTitle(ZoomBoundsInfo infos, Title title) { if (title == null) { return; } if (title.LocationDefault.X > 0 || title.LocationDefault.Y > 0) { title.LocationDefault = ZoomPoint(infos, title.LocationDefault); } if (title.SizeDefault.Width > 0 || title.SizeDefault.Height > 0) { title.SizeDefault = ZoomSize(infos, title.SizeDefault); } }
private void ZoomLegend(ZoomBoundsInfo infos, Legend legend) { if (legend == null) { return; } if (legend.LocationDefault.X > 0 || legend.LocationDefault.Y > 0) { legend.LocationDefault = ZoomPoint(infos, legend.LocationDefault); } if (legend.SizeDefault.Width > 0 || legend.SizeDefault.Height > 0) { legend.SizeDefault = ZoomSize(infos, legend.SizeDefault); } }
private void ZoomChartGroups(ZoomBoundsInfo infos, ChartGroups groups) { if (groups == null) { return; } foreach (ChartGroup group in groups.ChartGroupsCollection) { foreach (FunctionBase functionBase in group.ChartData.FunctionsList) { ZoomLineStyle(infos, functionBase.LineStyle); } foreach (ChartDataSeries series in group.ChartData.SeriesList) { ZoomDataSeries(infos, series); } } }
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); 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 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); } }
private void ZoomChartArea(ZoomBoundsInfo infos, Area area) { if (area == null) { return; } foreach (Axis axis in area.Axes) { ZoomAxis(infos, axis); } ZoomPlotArea(infos, area.PlotArea); if (area.LocationDefault.X > 0 || area.LocationDefault.Y > 0) { area.LocationDefault = ZoomPoint(infos, area.LocationDefault); } if (area.SizeDefault.Width > 0 || area.SizeDefault.Height > 0) { area.SizeDefault = ZoomSize(infos, area.SizeDefault); } }