?? form1.cs
字號:
?using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace first1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
static double PI = 3.14159;
double CircleArea(double r)
{
return PI * r * r;
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
double radius; //記錄輸入圓的的半徑
double area; //返回圓的面積
radius = Convert.ToInt32(TXT1.Text);
area=CircleArea(radius);
TXT2.Text = Convert.ToString(area);
}
private void button2_Click(object sender, EventArgs e)
{
TXT1.Text = "";
TXT2.Text = "";
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -