Révision 42456640 GES_PAC/ViewModel/MainViewModel.cs
GES_PAC/ViewModel/MainViewModel.cs | ||
---|---|---|
1 | 1 |
using GES_PAC.Model; |
2 |
using GES_PAC.Services; |
|
3 | 2 |
using GES_PAC.View; |
4 | 3 |
using System.Windows.Input; |
5 | 4 |
|
... | ... | |
13 | 12 |
private string _currentDayText; |
14 | 13 |
#endregion |
15 | 14 |
|
16 |
#region Services |
|
17 |
private readonly ConnexionService connService; |
|
18 |
#endregion |
|
15 |
|
|
19 | 16 |
|
20 | 17 |
#region Commandes |
21 | 18 |
public ICommand GoToCreateDayCommand { get; } |
... | ... | |
53 | 50 |
#endregion |
54 | 51 |
|
55 | 52 |
#region Constructeur |
56 |
public MainViewModel(ConnexionService connService)
|
|
53 |
public MainViewModel() |
|
57 | 54 |
{ |
58 | 55 |
//ONLY FOR TESTS |
59 |
var date = DateTime.Now; |
|
60 |
var newDay = new Journee(date, PersonViewModel.Instance.Persons[0], PlaceViewModel.Instance.Places[0], ""); |
|
61 |
newDay.AddSet(new Serie(date, date, 25, 25, 25)); |
|
62 |
newDay.AddCalibration(new MesureCalibration(date, 50, 40, 500, TypeCalibration.Air, ""), PhaseCalibration.Debut); |
|
63 |
newDay.AddCalibration(new MesureCalibration(date, 0, 0, 1000000, TypeCalibration.Methane, "dazdazd"), PhaseCalibration.Debut); |
|
64 |
newDay.AddCalibration(new MesureCalibration(date, 30, 30, 3000, TypeCalibration.Melange, "deqsfsdf"), PhaseCalibration.Debut); |
|
65 |
newDay.GetCurrentSet().AddSerieAnimal(new SerieAnimal(1, 500, date, "")); |
|
66 |
newDay.GetCurrentSet().AddMeasure(new Mesure(date, 50, 50, 50), 1, false); |
|
67 |
JourneeViewModel.Instance.Journees.Add(newDay); |
|
56 |
//var date = DateTime.Now;
|
|
57 |
//var newDay = new Journee(date, PersonViewModel.Instance.Persons[0], PlaceViewModel.Instance.Places[0], "");
|
|
58 |
//newDay.AddSet(new Serie(date, date, 25, 25, 25));
|
|
59 |
//newDay.AddCalibration(new MesureCalibration(date, 50, 40, 500, TypeCalibration.Air, ""), PhaseCalibration.Debut);
|
|
60 |
//newDay.AddCalibration(new MesureCalibration(date, 0, 0, 1000000, TypeCalibration.Methane, "dazdazd"), PhaseCalibration.Debut);
|
|
61 |
//newDay.AddCalibration(new MesureCalibration(date, 30, 30, 3000, TypeCalibration.Melange, "deqsfsdf"), PhaseCalibration.Debut);
|
|
62 |
//newDay.GetCurrentSet().AddSerieAnimal(new SerieAnimal(1, 500, date, ""));
|
|
63 |
//newDay.GetCurrentSet().AddMeasure(new Mesure(date, 50, 50, 50), 1, false);
|
|
64 |
//JourneeViewModel.Instance.Journees.Add(newDay);
|
|
68 | 65 |
//ONLY FOR TESTS |
69 | 66 |
|
70 | 67 |
GoToCreateDayCommand = new Command(async () => await GoToCreateDayPage()); |
71 | 68 |
ResumeDayCommand = new Command(async () => await ResumeDay()); |
72 | 69 |
|
73 |
this.connService = connService; |
|
74 |
|
|
75 | 70 |
GetLastDay(); |
76 | 71 |
} |
77 | 72 |
#endregion |
Formats disponibles : Unified diff