private void Button_Click(object sender, RoutedEventArgs e) { Project.ParseData.correlation result; LifeExpectancy lf1 = new LifeExpectancy(); result=lf1.processData(); string data_lifePoverty = (result.correlLifePoverty).ToString(); string data_lifeUnemp = (result.correlLifeUnemp).ToString(); string data_lifeperCapita = (result.correlLifePerCapita).ToString(); ResultBox.Text = "Correlation between Life Expectancy and Poverty is " + data_lifePoverty; ResultBox.AppendText("\n Correlation between Life Expectancy and Unemployment is " + data_lifeUnemp); ResultBox.AppendText("\n Correlation between Life Expectancy and per Capita Income is " + data_lifeperCapita); }
//logic for displaying correlation alues on click of button private void Button_Click(object sender, RoutedEventArgs e) { Project.ParseData.correlation result; LifeExpectancy lf1 = new LifeExpectancy(); result=lf1.processData(); string data_lifePoverty = (result.correlLifePoverty).ToString(); string data_lifeUnemp = (result.correlLifeUnemp).ToString(); string data_lifeperCapita = (result.correlLifePerCapita).ToString(); ///bool variables to verify if the checkboxes are checked bool isLifePovertyChked=LifePoverty.IsChecked.Value; bool isLifeUnempChked=LifeUnemployment.IsChecked.Value; bool isLifeperCapita = LifeperCapita.IsChecked.Value; ResultBox.Text = ""; //checking for the checkboxes and displaying if checked if(isLifePovertyChked) ResultBox.Text = "Correlation between Life Expectancy and Poverty is " + data_lifePoverty; if (isLifeUnempChked) ResultBox.AppendText("\nCorrelation between Life Expectancy and Unemployment is " + data_lifeUnemp); if (isLifeperCapita) ResultBox.AppendText("\nCorrelation between Life Expectancy and per Capita Income is " + data_lifeperCapita); }
static void Main(string[] args) { //bool flag = true; LifeExpectancy lf = new LifeExpectancy(); lf.processData(); }
static void Main(string[] args) { //creating object of the type life expectancy LifeExpectancy lf = new LifeExpectancy(); lf.processData(); }