Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace Kadai01
  11. {
  12. public partial class FrmNyuryoku : Form
  13. {
  14. public FrmNyuryoku()
  15. {
  16. InitializeComponent();
  17. }
  18.  
  19. private void btnOK_Click(object sender, EventArgs e)
  20. {
  21. if (txtGakusekiNo.Text != "" && txtName.Text != "")
  22. {
  23. FrmKakunin form = new FrmKakunin();
  24. form.str1 = txtGakusekiNo.Text;
  25. form.str2 = txtName.Text;
  26.  
  27. DialogResult ret = form.ShowDialog();
  28.  
  29. if (ret == DialogResult.OK)
  30. {
  31.  
  32. txtGakusekiNo.Text = "";
  33. txtName.Text = "";
  34. }
  35. }
  36. }
  37.  
  38. private void btnEnd_Click(object sender, EventArgs e)
  39. {
  40. this.Close();
  41. }
  42.  
  43. private void FrmNyuryoku_FormClosing(object sender, FormClosingEventArgs e)
  44. {
  45. DialogResult ret = MessageBox.Show("終了してもいいですか?", "終了確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
  46.  
  47. if (ret == DialogResult.No)
  48. {
  49. e.Cancel = true;
  50. }
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement