42 lines
905 B
C#
42 lines
905 B
C#
![]() |
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace WindowsFormsApp8
|
|||
|
{
|
|||
|
public partial class Form2 : Form
|
|||
|
{
|
|||
|
public Form2()
|
|||
|
{
|
|||
|
InitializeComponent();
|
|||
|
}
|
|||
|
|
|||
|
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
|||
|
{
|
|||
|
if (checkBox1.Checked)
|
|||
|
{
|
|||
|
textBox2.Text = "PC";
|
|||
|
textBox2.Enabled = false;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
textBox2.Text = "";
|
|||
|
textBox2.Enabled = true;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void button2_Click(object sender, EventArgs e)
|
|||
|
{
|
|||
|
Form1.setName(textBox1.Text, textBox2.Text);
|
|||
|
this.Close();
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|