public override void OnEvent(object MapEvent) { if (MapEvent is FormChart) { gvChart.gvChartType oldChartType = ((FormChart)MapEvent).ChartType; try { ((FormChart)MapEvent).ChartType = this.ChartType; } catch (Exception ex) { MessageBox.Show(ex.Message); ((FormChart)MapEvent).ChartType = oldChartType; } } }
private void lstChartTypes_SelectedIndexChanged(object sender, EventArgs e) { try { gvChart.gvChartType chartType = (gvChart.gvChartType)lstChartTypes.SelectedItem; panelDisplayMode.Visible = (chartType.DisplayMode == gvChart.DisplayMode.Mixed); _gvChart.ChartType = chartType; if (panelDisplayMode.Visible == true) { _gvChart.ChartDisplayMode = (gvChart.DisplayMode)cmbDisplayMode.SelectedIndex; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public override Task <bool> OnEvent(object MapEvent) { if (MapEvent is FormChart) { gvChart.gvChartType oldChartType = ((FormChart)MapEvent).ChartType; try { ((FormChart)MapEvent).ChartType = this.ChartType; } catch (Exception ex) { MessageBox.Show(ex.Message); ((FormChart)MapEvent).ChartType = oldChartType; } } return(Task.FromResult(true)); }
public ChartTypeTool(gvChart.gvChartType chartType) : base(chartType.Name) { this.ChartType = chartType; }
public ChartTypeMenu(gvChart.gvChartType chartType) : base("Chart Type") { _chartType = chartType; }