Commit 19dc9b60 authored by Mohamed Guirat's avatar Mohamed Guirat

version .exe

parents
This diff is collapsed.
This diff is collapsed.

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "consignelaWpf", "consignelaWpf\consignelaWpf.csproj", "{CC63F2E5-3DA5-453F-B2C2-E146AA17A6C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC63F2E5-3DA5-453F-B2C2-E146AA17A6C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC63F2E5-3DA5-453F-B2C2-E146AA17A6C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC63F2E5-3DA5-453F-B2C2-E146AA17A6C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC63F2E5-3DA5-453F-B2C2-E146AA17A6C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
\ No newline at end of file
<Application x:Class="consignelaWpf.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:consignelaWpf"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
using consignelaWpf.Model;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using static System.Environment;
namespace consignelaWpf
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static ListConsignes consignesSelect = new ListConsignes();
public static Prescription prescriptionSelect = new Prescription();
public static PrescriptionTab prescriptionTabSelect = new PrescriptionTab();
public static String experimentateur = "";
public static String date = "";
public static String type = "";
public static String utilisation = "";
public static String pilulier = "";
public static String format = "";
public static String mode = "";
public static String navigation = "";
public static bool expSansAUthen = false;
public static bool authentification = false;
public static String codeParticipant;
public static string logIn = "";
public static string password = "";
public static string jsonFromCheckAccess;
//public static StorageFolder storageFolder = ApplicationData.Current.LocalFolder;
//public static StorageFolder imageFolder;
public static string txtresponseLogin;
public static bool verifDataPage = false;
//public static SpecialFolder storageFolder = SpecialFolder.LocalApplicationData;
}
}
<Window x:Class="consignelaWpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:consignelaWpf"
xmlns:HamburgerMenu="clr-namespace:HamburgerMenu;assembly=HamburgerMenu"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d"
Title="Consignela" Height="725.5" Width="1215" x:Name="main" Loaded="main_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="#00838f">
<!--<Button Name="menuButton"
FontFamily="Segoe MDL2 Assets"
FontSize="36"
Width="50"
HorizontalAlignment="Left"
Content="&#xE700;"
Background="#FF00575F"
Foreground="White"
Click="menuButton_Click"/>-->
<Button Name="BackButton"
FontFamily="Segoe MDL2 Assets"
FontSize="36"
Width="50"
HorizontalAlignment="Left"
Click="BackButton_Click"
Content="&#xE0C4;"
Background="#FF00575F"
Foreground="White"
/>
<TextBlock Name="titleTextBlock"
Text="Consignela"
FontSize="28"
MaxWidth="200"
FontWeight="Bold"
Foreground="White"
VerticalAlignment="Center"/>
<Button Name="conexion"
Width="200"
Height="50"
HorizontalAlignment="Right"
Margin="0,0,50,0"
FontSize="25"
Foreground="White"
Background="#FF02AC7E"
>
<StackPanel Orientation="Horizontal" >
<TextBlock FontFamily="Segoe MDL2 Assets" FontSize="36" Text="&#xE13D;" Margin="0,0,20,0"/>
<TextBlock x:Name="profilNom" Text="Connexion" x:FieldModifier="public"/>
</StackPanel>
</Button>
<Button Name="quit"
FontFamily="Segoe MDL2 Assets"
FontSize="36"
Width="50"
HorizontalAlignment="Right"
Content="&#xE10A;"
Background="#FF00575F"
Foreground="White"
Click="quit_Click"/>
</Grid>
<Grid Grid.Row="1" >
<Frame x:Name="framePages" Margin="50,0,0,0">
</Frame>
<HamburgerMenu:HamburgerMenu Background="WhiteSmoke" MenuIconColor="#FF011C64" SelectionIndicatorColor="White" MenuItemForeground="White" HorizontalAlignment="Left">
<HamburgerMenu:HamburgerMenu.Content>
<HamburgerMenu:HamburgerMenuItem x:Name="experienceItem" Icon="Assets/experience.png" Text="Experience" SelectionCommand="{Binding ElementName=pages.experience}" Foreground="#FF011C64" Selected="experienceItem_Selected"/>
<HamburgerMenu:HamburgerMenuItem x:Name="parametresItem" Icon="Assets/parametres.png" Text="Configuration&#xD;&#xA;expérimentation" Foreground="#FF011C64" Selected="parametresItem_Selected"/>
<HamburgerMenu:HamburgerMenuItem x:Name="analyseItem" Icon="Assets/analyse.png" Text="Analyse et récuperation&#xD;&#xA;des données" Foreground="#FF011C64" Selected="analyseItem_Selected"/>
</HamburgerMenu:HamburgerMenu.Content>
</HamburgerMenu:HamburgerMenu>
</Grid>
</Grid>
</Window>
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.Navigation;
using System.Windows.Shapes;
namespace consignelaWpf
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
public event EventHandler CanExecuteChanged;
public bool CanExecute(object parameter)
{
return true;
}
public void Execute(object parameter)
{
MessageBox.Show("Selection Binding");
}
private void experienceItem_Selected(object sender, RoutedEventArgs e)
{
framePages.NavigationService.Navigate(new Uri("pages/PrepareExperience.xaml", UriKind.Relative));
//framePages.Navigate("Experience.xaml");
}
private void parametresItem_Selected(object sender, RoutedEventArgs e)
{
framePages.NavigationService.Navigate(new Uri("pages/ConfigPage.xaml", UriKind.Relative));
}
private void quit_Click(object sender, RoutedEventArgs e)
{
System.Windows.Application.Current.Shutdown();
}
private void BackButton_Click(object sender, RoutedEventArgs e)
{
if (framePages.CanGoBack){framePages.GoBack();}
}
private void analyseItem_Selected(object sender, RoutedEventArgs e)
{
framePages.NavigationService.Navigate(new Uri("pages/DataPage.xaml", UriKind.Relative));
}
private void main_Loaded(object sender, RoutedEventArgs e)
{
framePages.NavigationService.Navigate(new Uri("pages/MainPage.xaml", UriKind.Relative));
}
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consignelaWpf.Model
{
class Analyse
{
[JsonProperty("prescriptionID")]
public int prescriptionID { get; set; }
[JsonProperty("momentJour")]
public List<MomentJour> momentJour { get; set; }
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consignelaWpf.Model
{
class AnalyseExperience
{
[JsonProperty("experimentateur")]
public String experimentateur { get; set; }
[JsonProperty("Code_Participant")]
public String Code_Participant { get; set; }
[JsonProperty("date")]
public String date { get; set; }
[JsonProperty("pilulier")]
public String pilulier { get; set; }
[JsonProperty("format")]
public String format { get; set; }
[JsonProperty("Analyse")]
public Analyse Analyse { get; set; }
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
namespace consignelaWpf.Model
{
public class Consigne
{
[JsonProperty("id")]
public int id { get; set; }
[JsonProperty("description")]
public String description { get; set; }
[JsonProperty("img_path")]
public String img_path { get; set; }
[JsonProperty("imgBitmap")]
public BitmapImage imgBitmap { get; set; }
[JsonProperty("imgNom")]
public String imgNom { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consignelaWpf.Model
{
public class Date
{
public String day { get; set; }
public String month { get; set; }
public String year { get; set; }
public String time { get; set; }
public String monthToStr()
{
switch (month)
{
case "1":
return "Janvier";
case "2":
return "Février";
case "3":
return "Mars";
case "4":
return "Avril";
case "5":
return "Mai";
case "6":
return "Juin";
case "7":
return "Juillet";
case "8":
return "Aout";
case "9":
return "Septembre";
case "10":
return "Octobre";
case "11":
return "Novembre";
case "12":
return "Décembre";
}
return "mois";
}
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consignelaWpf.Model
{
class Etape
{
[JsonProperty("Temps-ecoule")]
public int Temps_ecoule { get; set; }
[JsonProperty("Action")]
public String Action { get; set; }
[JsonProperty("Codage-evenement")]
public String Codage_evenement { get; set; }
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consignelaWpf.Model
{
class ExperienceConf
{
[JsonProperty("id")]
public int id { get; set; }
[JsonProperty("nom")]
public String nom { get; set; }
[JsonProperty("dateTime")]
public DateTime dateTime { get; set; }
[JsonProperty("listeConsigne")]
public ListConsignes listeConsigne { get; set; }
[JsonProperty("prescription")]
public Prescription prescription { get; set; }
[JsonProperty("prescriptionTab")]
public PrescriptionTab prescriptionTab { get; set; }
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consignelaWpf.Model
{
class ExperiencePrescResult
{
[JsonProperty("experimentateur")]
public String experimentateur { get; set; }
[JsonProperty("date")]
public String date { get; set; }
[JsonProperty("Code_Participant")]
public String Code_Participant { get; set; }
[JsonProperty("type")]
public String type { get; set; }
[JsonProperty("utilisation")]
public String utilisation { get; set; }
[JsonProperty("pilulier")]
public String pilulier { get; set; }
[JsonProperty("format")]
public String format { get; set; }
[JsonProperty("mode")]
public String mode { get; set; }
[JsonProperty("navigation")]
public String navigation { get; set; }
[JsonProperty("etapes")]
public List<Etape> etapes { get; set; }
[JsonProperty("prescription")]
public PrescriptionTab prescription { get; set; }
[JsonProperty("Resultat")]
public Resultat Resultat { get; set; }
}
}
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace consignelaWpf.Model
{
class Index
{
static JObject jsonNote;
static string user, jsonFromUrl;
static List<CheckBox> checkBoxList;
static string[] ArrayForSharingSpace, jsonArrayIndexTab;
static List<string> nom_cpt, prefixOrConceptPrefix, PrefixList, ConceptPrefixList, distributor, SharingSpaceList, indexOfSelectedCHeckBox, nouveauList;
static List<string> index;
public static List<string> getnom_cpt()
{
return nom_cpt;
}
public static void getIndex()
{
nom_cpt = new List<string>();
index = new List<string>();
prefixOrConceptPrefix = new List<string>();
ConceptPrefixList = new List<string>();
PrefixList = new List<string>();
PrefixList = SharingSpace.getPrefixList();
ConceptPrefixList = SharingSpace.getConceptPrefixList();
jsonFromUrl = SharingSpace.getJsonFromUrl("http://memorae.hds.utc.fr/api/" + ConceptPrefixList[0] + "/graph");
// System.Diagnostics.Debug.Write("\njsonfrom Url " + jsonFromUrl);
JObject jsonObject = JObject.Parse(jsonFromUrl);
foreach (JProperty p in jsonObject.Properties())
{
if (p.Name.Equals("concepts"))
{
JArray jsonArrayConcept = JArray.Parse(p.Value.ToString());
// System.Diagnostics.Debug.Write("\n jsonArrayConcept " + jsonArrayConcept);
foreach (JObject o in jsonArrayConcept.Children<JObject>())
{
foreach (JProperty pp in o.Properties())
{
if (pp.Name.Equals("nom_cpt"))
{
string x = pp.Value.ToString();
nom_cpt.Add(x);
}
if (pp.Name.Equals("type_cpt"))
{
string y = pp.Value.ToString();
if (y.Equals("0"))
{
index.Add(ConceptPrefixList[0]);
prefixOrConceptPrefix.Add(ConceptPrefixList[0]);
foreach (JProperty ppp in o.Properties())
{
if (ppp.Name.Equals("id_cpt_second"))
index.Add(ppp.Value.ToString());
}
}
else
{
if (y.Equals("1"))
{
index.Add(PrefixList[0]);
prefixOrConceptPrefix.Add(ConceptPrefixList[0]);
foreach (JProperty ppp in o.Properties())
{
if (ppp.Name.Equals("id_cpt_second"))
index.Add(ppp.Value.ToString());
}
}
}
}
}
}
}
}
}
//public static async void showInfo(List<CheckBox> listCheckBoxTmp, StorageFile sampleFile, List<string> idSharingSpaceClass)