Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace App3
- {
- [Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)]
- public class MainActivity : AppCompatActivity
- {
- protected override void OnCreate(Bundle savedInstanceState)
- {
- base.OnCreate(savedInstanceState);
- // Set our view from the "main" layout resource
- SetContentView(Resource.Layout.activity_main);
- Button submit = FindViewById<Button>
- (Resource.Id.btnSubmit);
- submit.Click += delegate
- {
- var userPostno = FindViewById<EditText>
- (Resource.Id.postnoValue);
- string userValue = userPostno.Text.ToString();
- var showResult = FindViewById<TextView>
- (Resource.Id.postnoResult);
- if (userValue == "00100")
- {
- showResult.Text = "S1";
- }
- else
- {
- showResult.Text = "POSTI";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement