2019-01-19 11:04:17 +01:00
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
{
2019-01-27 10:22:31 +01:00
DashBoard W_DashBoard ;
FicEncodage W_FicEncodage ;
FicGestionAlert W_GestionAlert ;
2019-01-19 11:04:17 +01:00
public Accueil ( )
{
InitializeComponent ( ) ;
2019-01-27 10:22:31 +01:00
//// 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";
//W_DashBoard = new DashBoard();
//W_FicEncodage = new FicEncodage();
//W_GestionAlert = new FicGestionAlert();
2019-01-19 11:04:17 +01:00
}
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 ( ) ;
2019-01-27 10:22:31 +01:00
2019-01-19 11:04:17 +01:00
}
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 ( ) ;
}
2019-01-25 16:23:52 +01:00
private void Window_MouseDown ( object sender , MouseButtonEventArgs e )
{
if ( e . ChangedButton = = MouseButton . Left )
this . DragMove ( ) ;
}
2019-01-27 10:22:31 +01:00
private void BtnGestionAlert_Click ( object sender , RoutedEventArgs e )
{
FicGestionAlert w = new FicGestionAlert ( ) ;
w . Show ( ) ;
}
}
2019-01-19 11:04:17 +01:00
}