How to make Calci app in Windows Phone7………

This is window to show how the module look like.

Now,

Add a code on Add, Subtract, Multiply, Divide button written below.

private void button1_Click(object sender, RoutedEventArgs e)
{
try
{
int x = Convert.ToInt32(txt1.Text);
int y = Convert.ToInt32(txt2.Text);
int z = x + y;
txt3.Text = Convert.ToString(z);
}
catch
{
}

}

private void button2_Click(object sender, RoutedEventArgs e)
{
try
{
int x = Convert.ToInt32(txt1.Text);
int y = Convert.ToInt32(txt2.Text);
int z = x – y;
txt3.Text = Convert.ToString(z);
}
catch
{
}
}

private void button3_Click(object sender, RoutedEventArgs e)
{
try
{
int x = Convert.ToInt32(txt1.Text);
int y = Convert.ToInt32(txt2.Text);
int z = x * y;
txt3.Text = Convert.ToString(z);
}
catch
{
}
}

private void button4_Click(object sender, RoutedEventArgs e)
{
try
{
int x = Convert.ToInt32(txt1.Text);
int y = Convert.ToInt32(txt2.Text);
int z = x / y;
txt3.Text = Convert.ToString(z);
}
catch
{
}
}

And Enjoy Calci app….

SHARE THE KNOWLEDGE


  

Advertisements

About Dinesh

I am engineering student........ I am selected in Microsoft Student Partner as MSP............

Posted on January 6, 2012, in Knowledge, New Gadget, Windows Phone 7. Bookmark the permalink. 1 Comment.

  1. Pingback: URL

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: