private void Window_Loaded(object sender, RoutedEventArgs e)
{
Detector = null;
// Show the logo
logoBackground.Visibility = Visibility.Visible;
cornerLogo.Visibility = Visibility.Hidden;
EnabledClassifiers = AffdexMe.Settings.Default.Classifiers;
canvas.MetricNames = EnabledClassifiers;
// Enable/Disable buttons on start
btnStopCamera.IsEnabled =
btnExit.IsEnabled = true;
btnStartCamera.IsEnabled =
btnResetCamera.IsEnabled =
Points.IsEnabled =
Metrics.IsEnabled =
Appearance.IsEnabled =
Emojis.IsEnabled =
btnResetCamera.IsEnabled =
btnAppShot.IsEnabled =
btnStopCamera.IsEnabled = false;
// Initialize Button Click Handlers
btnStartCamera.Click += btnStartCamera_Click;
btnStopCamera.Click += btnStopCamera_Click;
Points.Click += Points_Click;
Emojis.Click += Emojis_Click;
Appearance.Click += Appearance_Click;
Metrics.Click += Metrics_Click;
btnResetCamera.Click += btnResetCamera_Click;
btnExit.Click += btnExit_Click;
btnAppShot.Click += btnAppShot_Click;
ShowEmojis = canvas.DrawEmojis = AffdexMe.Settings.Default.ShowEmojis;
ShowAppearance = canvas.DrawAppearance = AffdexMe.Settings.Default.ShowAppearance;
ShowFacePoints = canvas.DrawPoints = AffdexMe.Settings.Default.ShowPoints;
ShowMetrics = canvas.DrawMetrics = AffdexMe.Settings.Default.ShowMetrics;
changeButtonStyle(Emojis, AffdexMe.Settings.Default.ShowEmojis);
changeButtonStyle(Appearance, AffdexMe.Settings.Default.ShowAppearance);
changeButtonStyle(Points, AffdexMe.Settings.Default.ShowPoints);
changeButtonStyle(Metrics, AffdexMe.Settings.Default.ShowMetrics);
this.ContentRendered += MainWindow_ContentRendered;
}