84 lines
2.8 KiB
C#
84 lines
2.8 KiB
C#
using Emoji.Wpf;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Security.Policy;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
using TeamsNetphoneLink.WPF.MVVM;
|
|
|
|
namespace TeamsNetphoneLink.WPF
|
|
{
|
|
/// <summary>
|
|
/// Interaktionslogik für SetupLocalTeamsAPI.xaml
|
|
/// </summary>
|
|
public partial class SetupLocalTeamsAPI : Window
|
|
{
|
|
private Teams.TeamsLocalAPI teamsLocalAPI;
|
|
public FinishPanelViewModel finishPanelViewModel { get; }
|
|
|
|
public SetupLocalTeamsAPI(Syncronisation sync)
|
|
{
|
|
teamsLocalAPI = sync.TeamsEvents;
|
|
finishPanelViewModel = sync.FinishPanelViewModel;
|
|
DataContext = finishPanelViewModel;
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Step1Link_RequestNavigate(object sender, RequestNavigateEventArgs e)
|
|
{
|
|
// Öffnet den Link, um die Teams API zu aktivieren
|
|
Process.Start(new ProcessStartInfo(e.Uri.ToString().Replace("&", "^&")) { UseShellExecute = true });
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void Step1Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Schritt 1 abgeschlossen - Schalte auf den nächsten Schritt
|
|
Step1Panel.IsEnabled = false;
|
|
Step2Panel.IsEnabled = true;
|
|
Step1Panel.Effect = new TintEffect { Tint = Colors.DarkGray };
|
|
Step2Panel.Effect = null;
|
|
}
|
|
|
|
// Schritt 2: Teams Meeting starten
|
|
private void Step2Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Öffne die URL, um ein Meeting zu starten (Hier muss der genaue Link oder die API-Integration erfolgen)
|
|
Step2Panel.IsEnabled = false;
|
|
Step3Panel.IsEnabled = true;
|
|
Step2Panel.Effect = new TintEffect { Tint = Colors.DarkGray };
|
|
Step3Panel.Effect = null;
|
|
}
|
|
|
|
// Schritt 3: Authentifizierung durchführen
|
|
private async void Step3Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Simuliere den Authentifizierungsprozess
|
|
Step3Button.Content = "Authentifizierung gesendet...";
|
|
Step3Button.IsEnabled = false;
|
|
|
|
this.finishPanelViewModel.FinishPanelFinishTextText = "Authentifizierung läuft...";
|
|
this.finishPanelViewModel.FinishPanelFinishTextColor = new SolidColorBrush(Colors.Orange);
|
|
|
|
teamsLocalAPI.SendDummyCommand();
|
|
}
|
|
|
|
private void FinishButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|