ProjetThe/ProjetTheAlone/View/Accueil.xaml.cs

68 lines
1.9 KiB
C#
Raw Normal View History

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
{
public Accueil()
{
InitializeComponent();
}
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();
}
}
}