示例#1
0
 private void SingleChoice_Tapped(object sender, TappedEventArgs e)
 {
     if (SingleChoice)
     {
         var selected = e.Parameter as DropMenuItemModel;
         HeaderText = selected.Name;
         var list = ListSource.Cast <DropMenuItemModel>().ToList();
         list.Select(x =>
         {
             x.IsSelected = false;
             if (x.Id == selected.Id)
             {
                 x.IsSelected = true;
             }
             return(x);
         }).ToList();
         TapGestureRecognizer_Tapped("", new EventArgs());
     }
 }
 /// <summary>
 /// Export CSV de la grille de données. Attention le DTO en question doit implémenter l'interface ISerializableCSV
 /// </summary>
 /// <param name="obj"></param>
 private void ExportCSVDelegate(object obj)
 {
     if (IsLoading == Visibility.Visible)
     {
         ShowMessageBox.Show(TYPE_WINDOW_BOX.AVERTISSEMENT, messLoading, "");
     }
     else
     {
         ParamExportCSV          p = Client.GetParam();
         ReadAndWriteCSV         readAndWriteCSV = new ReadAndWriteCSV(p.Path, p.Separateur);
         List <ISerializableCSV> list            = new List <ISerializableCSV>(ListSource.Cast <ISerializableCSV>());
         readAndWriteCSV.WriteCSV(p.GetHeaderBody(), list);
     }
 }