private void ReplaceLIVEQuestion_toolStripButton_Click(object sender, EventArgs e) { FORM_ReplacementQuestion replaceQtoDB = new FORM_ReplacementQuestion(StackSettings.Default.LiveStackID, StackSettings.Default.LiveStackTypeChosen, LevelSelectedFromLIVEStack, CategorySelectedFromLIVEStack, SubcategorySelectedFromLIVEStack); replaceQtoDB.ShowDialog(); QAStack.InsertQuestionsInLIVEStack(StackSettings.Default.LiveStackID, StackTypeChosen); //Because MK WWTBAM QuizOperator is made like that... int LevelTemp = QuestionsLIVEPreview_dataGridView.CurrentCell.RowIndex; RemainQStackLevelIndex(StackSettings.Default.LiveStackID, LevelTemp, QuestionsLIVEPreview_dataGridView); if (LevelTemp > 0) { QuestionsLIVEPreview_dataGridView.ClearSelection(); QuestionsLIVEPreview_dataGridView.CurrentCell = QuestionsFromStackPreview_dataGridView.Rows[LevelTemp].Cells["Question"]; QuestionsLIVEPreview_dataGridView.Rows[LevelTemp].Selected = true; QuestionLIVESelectionChanged(); } }
private void ReplaceQuestion_toolStripButton_Click(object sender, EventArgs e) { FORM_ReplacementQuestion replaceQtoDB = new FORM_ReplacementQuestion(StackIDselected, StackTypeChosen, LevelSelectedFromStack, CategorySelected, SubcategorySelected); replaceQtoDB.ShowDialog(); int LevelTemp = QuestionsFromStackPreview_dataGridView.CurrentCell.RowIndex; RefreshQAinStack(QuestionsFromStackPreview_dataGridView, StackIDselected); if (LevelTemp > 0) { QuestionsFromStackPreview_dataGridView.ClearSelection(); //StacksOfQuestions_SelectionChanged(QuestionsFromStackPreview_dataGridView, null); //QuestionsFromStackPreview_dataGridView.FirstDisplayedScrollingRowIndex = QuestionsFromStackPreview_dataGridView.RowCount-1; QuestionsFromStackPreview_dataGridView.CurrentCell = QuestionsFromStackPreview_dataGridView.Rows[LevelTemp].Cells["Question"]; QuestionsFromStackPreview_dataGridView.Rows[LevelTemp].Selected = true; QuestionSelectionChanged(); //QuestionInStack_SelectionChanged(QuestionsFromStackPreview_dataGridView, new EventArgs()); //MessageBox.Show(""); } }