ProjetThe/ProjetTheAlone/View/Accueil.xaml.cs

69 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
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.Shapes;
namespace ProjetTheAlone.View
{
/// <summary>
/// Logique d'interaction pour Accueil.xaml
/// </summary>
public partial class Accueil : Window
{
public Accueil()
{
InitializeComponent();
Settings1.Default.schCon = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename='C:\Users\Hugues\Haute Ecole de la ville de Liège\Adrien VAN DAMME - ProjetTheAlone\ProjetTheAlone\ProjetThe.mdf';Integrated Security = True";
}
private static bool openaffichage = false;
private static bool openencodage = false;
public static bool Openaffichage { get => openaffichage; set => openaffichage = value; }
public static bool Openencodage { get => openencodage; set => openencodage = value; }
private void BtnAffichage_Click(object sender, RoutedEventArgs e)
{
if (!Openaffichage)
{
Openaffichage = true;
DashBoard w = new DashBoard();
w.Show();
}
else
{
MessageBox.Show("Fenêtre d'affichage déjà ouverte.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
private void BtnEncodage_Click(object sender, RoutedEventArgs e)
{
if (!Openencodage)
{
Openencodage = true;
FicEncodage w = new FicEncodage();
w.Show();
}
else
{
MessageBox.Show("Fenêtre d'encodage déjà ouverte.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
private void BtnQuitter_Click(object sender, RoutedEventArgs e)
{
Close();
}
}
}