public void Select(int index) { int selectIndex; if (CharacterModelCollection.Count() > index) { selectIndex = index; } else { selectIndex = CharacterModelCollection.Count() - 1; } SelectingIndex = selectIndex; }
/// <summary> /// 登場人物Viewを初期化する /// </summary> /// <param name="view">View</param> public void Initialize(CharacterBuilder view) { _view = view; _searchWord = ""; _view.SearchWordBox.Text = ""; GetFilteredCollection(); _view.BindData(this); if (CharacterModelCollection.Count() >= 1) { SelectingIndex = -1; SelectingIndex = 0; } else { SelectingIndex = -1; } }