2014年9月26日 星期五
2014年9月19日 星期五
第一周:移動按鈕&Unity
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 第一周_移動按鈕
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
button1.Text = "移動";
button2.Text = "車子";
}
private void button1_Click(object sender, EventArgs e)
{
if (button2.Location.ToString() == "{X=20,Y=20}")
button2.Location = new Point(40, 40);
else button2.Location = new Point(20, 20);
}
}
}
訂閱:
文章 (Atom)


