public static ICoordTextPainter Create(DataTextStyles style) { if (style == DataTextStyles.Number) { return(new SimpleCoordTextPainter()); } if (style == DataTextStyles.DateTimeUTC) { return(new DateTimeTextPainter(true)); } if (style == DataTextStyles.DateTime) { return(new DateTimeTextPainter(false)); } if (style == DataTextStyles.DateUTC) { return(new DateTextPainter(true)); } if (style == DataTextStyles.Date) { return(new DateTextPainter(false)); } if (style == DataTextStyles.TimeUTC) { return(new TimeTextPainter(true)); } return(new TimeTextPainter(false)); }
private void radioButton_CheckedChanged(object sender, EventArgs e) { ICoordTextPainter p = Painter; if (p == null) { return; } foreach (RadioButton rb in o) { if (rb.Checked) { DataTextStyles style = invert[rb]; Painter = StaticChartPerformer.Create(style); performer.RefreshAll(); return; } } }