WFA_psychometric_chart.Form1_main.ReDrawPoints C# (CSharp) Method

ReDrawPoints() public method

public ReDrawPoints ( System.Windows.Forms.DataVisualization.Charting.Series s1, double x, double y, Color c, string source_temperature, string source_humidity, string name1, string labelValueText, int marker_size_value ) : void
s1 System.Windows.Forms.DataVisualization.Charting.Series
x double
y double
c Color
source_temperature string
source_humidity string
name1 string
labelValueText string
marker_size_value int
return void
        public void ReDrawPoints(Series s1, double x, double y, Color c, string source_temperature, string source_humidity ,string name1,  string labelValueText, int marker_size_value)
        {
            // lock (this) { 

            //s1.ChartType = SeriesChartType.Point;

            //string s = "source => temp:" + source_temperature+",hum : "+source_humidity + "\n Name : " + name1 + "\nLable : " + label1x;// + "\nindex=" + indexForSeriesNodePoint;
            string s = "source \t\n temp: " + source_temperature + ",\t\n hum : " + source_humidity + "\n Name : " + name1;// + "\nindex=" + indexForSeriesNodePoint;
            if (chart1.InvokeRequired)
            {
                chart1.Invoke(new Action(() => s1.ChartType = SeriesChartType.Point));
                chart1.Invoke(new Action(() => s1.MarkerSize = marker_size_value));//= 20;
                chart1.Invoke(new Action(() => s1.MarkerStyle = MarkerStyle.Circle));
                chart1.Invoke(new Action(() => s1.Points.AddXY(x, y)));
                chart1.Invoke(new Action(() => chart1.Series["My Series"].Points[indexForSeriesNodePoint].ToolTip = s));
                chart1.Invoke(new Action(() => chart1.Series["My Series"].Points[indexForSeriesNodePoint].Label = labelValueText));
                //chart1.Invoke(new Action(() => chart1.Series["My Series"].Points[indexForSeriesNodePoint].Label));
                chart1.Invoke(new Action(() => chart1.Series["My Series"].Points[indexForSeriesNodePoint].Color = c));
                chart1.Invoke(new Action(() => s1.Points[indexForSeriesNodePoint].MarkerStyle = MarkerStyle.Circle));
                chart1.Invoke(new Action(() => s1.Points[indexForSeriesNodePoint].Color = c));
                chart1.Invoke(new Action(() => s1.Points[indexForSeriesNodePoint].MarkerSize = marker_size_value));
               
            }
            else
            {
                s1.ChartType = SeriesChartType.Point;
                s1.MarkerSize = marker_size_value;//= 20;
                s1.MarkerStyle = MarkerStyle.Circle;
                s1.Points.AddXY(x, y);
                chart1.Series["My Series"].Points[indexForSeriesNodePoint].ToolTip = s;
                chart1.Series["My Series"].Points[indexForSeriesNodePoint].Label = labelValueText;
                chart1.Series["My Series"].Points[indexForSeriesNodePoint].Color = c;
                s1.Points[indexForSeriesNodePoint].MarkerStyle = MarkerStyle.Circle;
                s1.Points[indexForSeriesNodePoint].Color = c;
                s1.Points[indexForSeriesNodePoint].MarkerSize = marker_size_value;

            }

          //  }//--Close of lock 

        }
Form1_main