ProjetThe/ProjetTheAlone/View/DashBoard.xaml.cs

112 lines
3.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
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;
using ProjetTheAlone.Model;
using ProjetTheAlone.Classes;
using ProjetTheAlone.ViewModel;
namespace ProjetTheAlone.View
{
/// <summary>
/// Interaction logic for DashBoard.xaml
/// </summary>
///
public partial class DashBoard : Window
{
ObservableCollection<string> cl = new ObservableCollection<string>();
RepaModel rm = new RepaModel();
public ObservableCollection<string> Cl
{
get
{
if (cl.Count <= 0)
{
cl.Add("1) Minou");
cl.Add("2) Minette");
cl.Add("3) Miaw");
cl.Add("4) Chat");
}
return cl;
}
set
{
cl = value;
}
}
public EventPasseModel Epm { get => epm; set => epm = value; }
internal RepaModel Rm { get => rm; set => rm = value; }
ProjetTheAlone.Model.EventPasseModel epm;
public DashBoard()
{
InitializeComponent();
//EventPasse2.DataContext = EventPasse1.DataContext = Epm;
testQuand.DataContext = RepasAjd.DataContext = new RepaModel(DateTime.Now);
RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1));
RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2));
var a = testQuand.DataContext;
}
private void wnd_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
Accueil.Openaffichage = false;
}
private void RepasMatin_Loaded(object sender, RoutedEventArgs e)
{
}
private void wnd_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
this.DragMove();
}
private void PackIcon_MouseDown(object sender, MouseButtonEventArgs e)
{
this.Close();
}
private void wnd_Loaded(object sender, RoutedEventArgs e)
{
this.Alert.DataContext = new ViewModel.TextDefilant(this.Alert, "UNE ALERTE QUELQUONQUE", 100);
}
}
public class DebugDummyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Debugger.Break();
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
Debugger.Break();
return value;
}
}
}