/// <summary>シリーズ名抽出 メニューアイテム クリックイベント</summary> /// <param name="sender">発生元オブジェクト</param> /// <param name="e">イベント情報</param> private void SeriesTitleMenuItem_Click(object sender, EventArgs e) { string seriesName = this.books.SeriesItems[this.SeriesListView.SelectedIndices[0]].Title; SeriesList selectedList = (SeriesList)this.SeriesListView.SelectedIndices.Cast <int>() .Select(i => this.books.SeriesItems[i]).ToList(); seriesName = selectedList.GetBeginWithMatchTitle(seriesName); if (seriesName == string.Empty) { MessageBox.Show(Resources.ErrorSearchTitleError, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } string name = Resources.InfoDetailListIsSetTitle.FormatWith(seriesName); DialogResult result = MessageBox.Show(this, name, Application.ProductName, MessageBoxButtons.YesNo); if (result != DialogResult.Yes) { return; } this.Books.SearchedItems.ToList().ForEach(m => m.ReplaceTitle(seriesName)); this.Books.Refresh(); }