private void FillListByDate()
        {
            typeOfSelection = globalDatasingleton.TypeOfSelection.BYDATE;
            SurfaceListBoxItem il = null;
            ItemListCategory ilc = null;

            CategoriesXml xmlcat = globalDatasingleton.getInstance().getCategories();

            if (fs.isEmpty == true)
            {
                foreach (string dirs in xmlcat.getListDirectory())
                {
                    fs.AddDirectory(dirs);
                }
            }

            surfaceListBox1.Items.Clear();

            il = new SurfaceListBoxItem();
            ilc = new ItemListCategory();
            ilc.Label = LocalizationManager.ResourceManager.GetString("ChoicebyCategory");
            il.Content = ilc;
            surfaceListBox1.Items.Add(il);

            // On ajoute un item dans la liste pour correspondre au index de la surfaceListbox
            dateTimeItemsList.Add(DateTime.Today);

            DateTime curTime = DateTime.Today;
            for (int i = 0; i < 15; i++)
            {
                if (fs.getFiles(curTime).Count > 0)
                {
                  //  string spaceString = "";
                    il = new SurfaceListBoxItem();
                    ilc = new ItemListCategory();
                    ilc.GrowingStep = 0;
                    /*for (int n = 20-curTime.DayOfWeek.ToString().Length; n>0 ; n--)
                    {
                        spaceString += " ";
                    }
                     */

                    ilc.Label = curTime.Day.ToString() + " / " + curTime.Month + " / " + curTime.Year;
                    il.Content = ilc;
                    surfaceListBox1.Items.Add(il);
                    DateTime dateTmp = new DateTime(curTime.Year, curTime.Month, curTime.Day);
                    dateTimeItemsList.Add(dateTmp);
                }
                curTime = curTime.AddDays(-1);
            }
        }
        public void UpdateList()
        {
            typeOfSelection = globalDatasingleton.TypeOfSelection.BYCATEGORY;
            SurfaceListBoxItem il = null;
            ItemListCategory ilc = null;
            List<String> name = null;
            List<String> bitmapname = null;

            if (currentElm == null)
            {
                name = xmlCat.GetNameCategories();
                bitmapname = xmlCat.GetBitmapsCategories();
            }
            else
            {
                name = xmlCat.GetNameChildCategories(ref currentElm);
                bitmapname = xmlCat.GetBitmapsChildCategories(ref currentElm);
            }

            surfaceListBox1.Items.Clear();
            int i = 0;

            if (currentElm != null)
            {
                il = new SurfaceListBoxItem();
                ilc = new ItemListCategory();

                textBlockName.Text = xmlCat.getLanguageName(currentElm);

                //ilc.Label = LocalizationManager.ResourceManager.GetString("Back");
                //ilc.ImageSource = "pack://application:,,,/Images/previous.png";
                //il.Content = ilc;
                //surfaceListBox1.Items.Add(il);
            }
            else
            {
                textBlockName.Text = "";
            }

            foreach (String n in name)
            {
                il = new SurfaceListBoxItem();
                ilc = new ItemListCategory();
                ilc.GrowingStep = 0;
                if (File.Exists(bitmapname[i]) == true)
                {
                    ilc.ImageSource = bitmapname[i];
                }
                ilc.Label = n;
                il.Content = ilc;
                surfaceListBox1.Items.Add(il);
                i++;
            }
        }