Image_Viewer = {}
function Image_Viewer:Create_Window()
   screen:fillRect(0,MACXT_Barre1:height(),Image_Loaded_Finder:width(),15,Color.new(192,192,192))
   screen:blit(0,MACXT_Barre1:height() + 15,Image_Loaded_Finder)
   screen:print(15,MACXT_Barre1:height() + 5,"Image Viewer")
end
function Image_Viewer:Run_Image_Viewer()
   if Viewer_Image == 1 then
      Afficher_Finder_MACXT = 0
      if Image_Loaded_Finder then
         Image_Viewer:Create_Window()
       else
         Message_Image_Viewer = "Impossible de charger l'image ou de l'afficher"
         screen:fillRect(480/2-string.len(Message_Image_Viewer)*8.5,MACXT_Barre1:height(),string.len(Message_Image_Viewer)*8.5,20,Color.new(255,255,255))
         screen:print(480/2-string.len(Message_Image_Viewer)*8.5,MACXT_Barre1:height()+5,Message_Image_Viewer,Color.new(0,0,0))
      end
      screen:blit(5,MACXT_Barre1:height() + 2,Exit_MACXT)
      if x >= 0 and x <= 20 and y >= MACXT_Barre1:height() and y <= MACXT_Barre1:height() + 15 then
         MACXTAide = "Fermer l'Image Viewer"
         if MACXTKeyPad:cross() then
            screen.waitVblankStart(10)
            Viewer_Image = 0
            Afficher_Finder_MACXT = 1
         end
      end
      if x >= 0 and x <= Image_Loaded_Finder:width() and y >= MACXT_Barre1:height()+15 and y <= MACXT_Barre1:height()+15+Image_Loaded_Finder:height() then
         MACXT_Objets_Properties[1] = {Caption = "Definir fond d'ecran",Action = "Set_Fond"}
         if Action_Properties == "Set_Fond" then
            Nom_Dossier = "MACXT"
            Nom_Value = "Image_Wallpaper"
            VALUE_WRITE = System.currentDirectory().."/"..fichiers[Selecteur_Finder].name
            REGISTRY:Write_On_File()
            Nom_Dossier = "MACXT"
            Nom_Value = "Wallpaper"
            VALUE_WRITE = "Default_Directory = 0"
            REGISTRY:Write_On_File()
            MACXT_Wallpaper = nil
            MACXT_Wallpaper = Image.load(System.currentDirectory().."/"..fichiers[Selecteur_Finder].name)
            MACXT_Repertoire:Anti_Bug() 
         end
         MACXT_Repertoire:Actualise_Properties()
      end
   end
end
