Esempio n. 1
0
        private void Bt_CreateNewTest_Click(object sender, RoutedEventArgs e)
        {
            Logger.WriteMessage("Opening CreateNewTest");

            Test questionnaire = new Test {
                Name = "Nouveau test"
            };

            EditTest cnt = new EditTest(questionnaire);

            this.Hide();
            cnt.ShowDialog();
            this.Show();

            if (cnt.Validate)
            {
                m_tests.Tests.Add(questionnaire);
                Wf_dg_testsList.Items.Refresh();
            }
        }
Esempio n. 2
0
        private void Wf_bt_Modify_Click(object sender, RoutedEventArgs e)
        {
            Test testSelectionne = Wf_dg_testsList.SelectedItem as Test;

            if (testSelectionne != null)
            {
                Test questionnaire = new Test(testSelectionne);

                EditTest cnt = new EditTest(questionnaire);

                this.Hide();
                cnt.ShowDialog();
                this.Show();

                if (cnt.Validate)
                {
                    m_tests.Tests.Add(questionnaire);
                    m_tests.Tests.Remove(testSelectionne);
                    Wf_dg_testsList.Items.Refresh();
                }
            }
        }