private void addButton_Click(object sender, EventArgs e) { if (nameInput.Text == "") { MessageBox.Show("登録名を入力してください。"); return; } this.Result = BookmarkFormResult.ADD; this.City = new BookmarkedCity.City(nameInput.Text, CityLocation.Lat, CityLocation.Lng); this.Close(); }
private void deleteButton_Click(object sender, EventArgs e) { if (nameInput.Text == "") { MessageBox.Show("登録名を入力してください。"); return; } this.Result = BookmarkFormResult.DELETE; this.CityName = nameInput.Text; this.Close(); }
private void cancelButton_Click(object sender, EventArgs e) { this.Result = BookmarkFormResult.CANCEL; this.Close(); }
public BookmarkForm() { InitializeComponent(); Result = BookmarkFormResult.CANCEL; }