private void ActivitiesBDDHyperLink_Click(object sender, RoutedEventArgs e) { if (!Ldap.IsAuthificated) { new AuthentificationWindow(ref teacher).ShowDialog(this); } OpenBDDWindow openBDD = null; if (Ldap.IsAuthificated) { openBDD = new OpenBDDWindow(teacher); openBDD.ShowDialog(this); if (!string.IsNullOrEmpty(openBDD.ActivityInformations)) { Hide(); new MainWindow(openBDD.ActivityInformations, ref teacher).ShowDialog(this); } } if (!isClosed && !string.IsNullOrEmpty(openBDD.ActivityInformations)) { ShowDialog(); } }
private void OpenCommandBinding_Executed(object sender, ExecutedRoutedEventArgs e) { if (!Ldap.IsAuthificated) { new AuthentificationWindow(ref teacher).ShowDialog(this); } if (Ldap.IsAuthificated) { OpenBDDWindow openBDD = new OpenBDDWindow(teacher); openBDD.ShowDialog(this); if (openBDD.ActivityInformations != "" && openBDD.ActivityInformations != null) { activity = ActivityPathParser.Parser(openBDD.ActivityInformations); if (activity.IDActivity != -2) { BDDAccess bddAccess = new BDDAccess(); if (bddAccess.Connect()) { activity = bddAccess.GetActivity(activity.IDActivity); activity.ProvidedWords = activity.ProvidedWords.Where(s => !string.IsNullOrWhiteSpace(s)).Distinct().ToList(); TexteTextBox.DataContext = activity; ProvidedWordsListBox.ItemsSource = activity.ProvidedWords; if (!string.IsNullOrEmpty(bddAccess.Information)) { MessageBox.Show(bddAccess.Information, new AssemblyInformations(Assembly.GetExecutingAssembly().GetName().Name).Product, MessageBoxButton.OK, bddAccess.MessageBoxImage, MessageBoxResult.OK); } } } } } }