WFA_psychometric_chart.Form1_main.addTemporarySeries C# (CSharp) Method

addTemporarySeries() public method

public addTemporarySeries ( ) : void
return void
        public void addTemporarySeries()
        {

            //--then redraw it again...
            addDottedSeries.Points.Clear();
            addDottedSeries.ChartType = SeriesChartType.FastLine;
            addDottedSeries.BorderDashStyle = ChartDashStyle.Dash;//--This gives the dashed style
            addDottedSeries.Color = Color.Black;
            addDottedSeries.BorderWidth = 3;

            double xAxisValue = 0.00;
            double yAxisvalue = 0.00;

            if(flagForDisconnectLineFromNode_PrevNode_Or_NextNode == 0)
            {
                //--If the line is not reseted then return form here
                return;
            }

            //We need to find the previous point
            for (int i = 0; i < menuStripNodeInfoValues.Count; i++)
            {
                //1 means prev node is selected 
                if (flagForDisconnectLineFromNode_PrevNode_Or_NextNode == 2) //This is done because we are detaching from node1
                {
                    if (menuStripNodeInfoValues[i].id == indexOfPrevPointForLineMovement)
                    {
                        //This is the node of previous point we need to find the x and y coordinate of
                        xAxisValue = menuStripNodeInfoValues[i].xVal;
                        yAxisvalue = menuStripNodeInfoValues[i].yVal;
                        break;//If value found no need to search all exit of loop


                    }

            } //2 means next node is selected 0 means off
                else if (flagForDisconnectLineFromNode_PrevNode_Or_NextNode == 1)//--This is done we are detaching form node2
            {
                if (menuStripNodeInfoValues[i].id == indexOfNextNodeForLineMovement)
                {
                    //This is the node of previous point we need to find the x and y coordinate of
                    xAxisValue = menuStripNodeInfoValues[i].xVal;
                    yAxisvalue = menuStripNodeInfoValues[i].yVal;
                    break;//If value found no need to search all exit of loop


                }

            }


        }


            //addDottedSeries.Points.AddXY(menuStripNodeInfoValues[indexOfPrevPointForLineMovement].xVal, menuStripNodeInfoValues[indexOfPrevPointForLineMovement].yVal);
            addDottedSeries.Points.AddXY(xAxisValue, yAxisvalue);//--this is the new changed code:bbk305
            addDottedSeries.Points.AddXY(currentXAxis, currentYAxis);

        }
Form1_main