public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService editorService = null; if (context != null && context.Instance != null && provider != null) { editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (editorService != null) { NewRadarChart control = null; if (context.Instance is NewRadarChart) { control = context.Instance as NewRadarChart; } RadarApperenceFrm form1 = new RadarApperenceFrm(); form1.ChartParent = control as NewRadarChart; DataSource ds = control.Apperence.Clone(); form1.PMSChartAppearance = ds.PMSChartAppearance; form1.chartAreaList = ds.ChartAreaList; form1.legendList = ds.LegendList; form1.seriesList = ds.SeriesList; form1.titleList = ds.TitleList; DialogResult dr = editorService.ShowDialog(form1); if (DialogResult.OK == dr) { value = ds; control.isIntial = true; } return(value); } } return(value); }
protected override void DealWithApperence() { if (this != null) { RadarApperenceFrm form1 = new RadarApperenceFrm(); form1.ChartParent = this; DataSource ds = this.Apperence.Clone(); form1.PMSChartAppearance = this.Apperence.PMSChartAppearance; form1.chartAreaList = ds.ChartAreaList; form1.legendList = ds.LegendList; form1.seriesList = ds.SeriesList; form1.titleList = ds.TitleList; if (DialogResult.OK == form1.ShowDialog()) { isIntial = true; InitailColumnData(); } } }