public void ProcessPoseCombinationGridViewCell(Window window, int rowIndex, int columnIndex) { if (rowIndex >= 0) { PoseCombinationSelect poseCombinationForm = new PoseCombinationSelect(this, window, rowIndex); switch (columnIndex) { // this is delete button, we add delete columns first, then format binding columns // so delete button columns index while be 0, even we setting displayIndex is 1 case 0: window.RemovePoseCombinationByIndex(rowIndex); break; case 4: window.GetPoseCombination(rowIndex).IsEnable = !window.GetPoseCombination(rowIndex).IsEnable; break; default: poseCombinationForm.ShowDialog(); break; } } }
//新增手勢配對button click事件 private void ClickAddButton(object sender, EventArgs e) { PoseCombinationSelect PoseCombinationForm = new PoseCombinationSelect(_presentationModel, _window); PoseCombinationForm.ShowDialog(); }