private void adicionarPassoAbaixo(object sender, RoutedEventArgs e) { if (SelectedSuite == null) { MessageBox.Show("selectedSuite == null"); return; } if (selectedSistema == null) { MessageBox.Show("selectedSistema == null"); return; } // MessageBox.Show("SISTEMA: " + selectedSistema.Id + " - " + selectedSistema.Nome); int posPasso = SelectedSuite.PassosDoRoteiro.IndexOf(getSelectedPasso()) + 1; SelectedSuite.PassosDoRoteiro.Insert(posPasso, new PassoDoRoteiro(SelectedSuite) { deveExecutar = true, Ordem = SelectedSuite.PassosDoRoteiro.Count + 1, }); SelectedSuite.ordenarPassos(); }
private void testSuiteBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { //Teste //MessageBox.Show(this.SelectedSuite.Codigo); //foreach (TestCase testcase in SelectedSuite.TestCases) //{ // MessageBox.Show(testcase.Codigo); //} this.testSuiteGrid.DataContext = this; if (SelectedSuite == null) { this.testSuiteGrid.ItemsSource = null; } else { this.testSuiteGrid.ItemsSource = SelectedSuite.PassosDoRoteiro; //MessageBox.Show(selectedCase.Codigo + " selecionado"); SelectedSuite.GetPassosFromDB(); this.test_desc_txt.DataContext = SelectedSuite; } }
private async void removerTestSuite(object sender, RoutedEventArgs e) { MessageDialogResult result = await this.mainWindow.showQuestion("Confirmação", "Tem certeza que deseja remover o RTF " + SelectedSuite.Codigo + "? " + SelectedSuite.Id.ToString()); if (result == MessageDialogResult.Affirmative) { SelectedSuite.DeletarDoBD(); mainWindow.FlyOutFeedBack(SelectedSuite.Codigo + " deletado com sucesso."); this.refresh(); } else { mainWindow.FlyOutFeedBack("Operação Cancelada"); } //this.testCases.Remove(selectedCase); }
private async void EditarCodigoRoteiro(object sender, RoutedEventArgs e) { MetroDialogSettings st = new MetroDialogSettings(); st.AffirmativeButtonText = "Ok"; st.NegativeButtonText = "Cancelar"; st.DefaultText = SelectedSuite.Codigo; string nomeTemp = await this.mainWindow.ShowInputAsync("Alterar Código do Roteiro de Teste", "Insira Novo Código do Roteiro de Teste", st); if (!String.IsNullOrEmpty(nomeTemp)) { SelectedSuite.Codigo = nomeTemp; SelectedSuite.Salvar(); await this.mainWindow.ShowMessageAsync("Sucesso!", "Código Do Roteiro de Teste alterado com sucesso!"); } else { await this.mainWindow.ShowMessageAsync("Novo Código Não Informado", "O Código do Roteiro não foi alterado"); } }
private void excluirPasso(object sender, RoutedEventArgs e) { this.SelectedSuite.PassosDoRoteiro.Remove(getSelectedPasso()); SelectedSuite.ordenarPassos(); }