//編輯模式 public PoseCombinationSelect(PresentationModel model, Window window, int editIndex) { _presentationModel = model; _window = window; _isEdit = true; _editIndex = editIndex; InitializeComponent(); InitailizePoseCombination(window.GetPoseCombination(editIndex)); CheckIsContinue(); _posePictureBox.Invalidate(); _keyPictureBox.Invalidate(); }
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; } } }