Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. namespace App3
  2. {
  3. [Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)]
  4. public class MainActivity : AppCompatActivity
  5. {
  6. protected override void OnCreate(Bundle savedInstanceState)
  7. {
  8. base.OnCreate(savedInstanceState);
  9. // Set our view from the "main" layout resource
  10. SetContentView(Resource.Layout.activity_main);
  11. Button submit = FindViewById<Button>
  12. (Resource.Id.btnSubmit);
  13. submit.Click += delegate
  14. {
  15. var userPostno = FindViewById<EditText>
  16. (Resource.Id.postnoValue);
  17. string userValue = userPostno.Text.ToString();
  18. var showResult = FindViewById<TextView>
  19. (Resource.Id.postnoResult);
  20. if (userValue == "00100")
  21. {
  22. showResult.Text = "S1";
  23. }
  24. else
  25. {
  26. showResult.Text = "POSTI";
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement