示例#1
0
        private void UITestConfigInstructionMoveUpBtn_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection selectedRows = UITestConfigIntructionListGrid.SelectedRows;

            if (selectedRows.Count == 0 || activeTestConfiguration.IsRunning)
            {
                return;
            }

            int oldIndex = UITestConfigIntructionListGrid.Rows.IndexOf(selectedRows[0]);
            int newIndex = oldIndex - 1;

            if (newIndex >= 0)
            {
                UITestConfigIntructionListGrid.ClearSelection();
                foreach (DataGridViewRow row in selectedRows)
                {
                    UITestConfigIntructionListGrid.Rows.RemoveAt(row.Index);
                }

                for (int i = 0; i < selectedRows.Count; i++)
                {
                    UITestConfigIntructionListGrid.Rows.Insert(newIndex, selectedRows[i]);
                    UITestConfigIntructionListGrid.Rows[newIndex].Selected = true;
                    newIndex++;
                }
            }
        }
示例#2
0
        private void OnTestQueueAdvance(InstructionEntry instructionEntry)
        {
            UITestConfigIntructionListGrid.ClearSelection();
            Instruction instruction = instructionEntry.instruction;

            //int index = instructionEntry.instruction._ui_index; //
            int index = activeTestConfiguration.InstructionEntryIndex(instructionEntry);

            if (last_instruction_index > -1)
            {
                UITestConfigIntructionListGrid.Rows[last_instruction_index].Cells[2].Value = "Finished ";
                UITestConfigIntructionListGrid.Rows[last_instruction_index].Cells[3].Value = instruction.feedbackStatus.ToString();
            }

            if (index > -1)
            {
                UITestConfigIntructionListGrid.Rows[index].Cells[2].Value = "Running ";
                UITestConfigIntructionListGrid.Rows[index].Selected       = true;
                last_instruction_index = index;
            }
        }