Exemple #1
0
        private void Inicializar(Archivos archivo, string seccion, string tipoaventura, int?indice, PanelMostrarArchivos mostrararchivos = null)
        {
            NombreArchivo    = archivo.NombreArchivo;
            DireccionArchivo = archivo.Direccion;
            if (File.Exists(DireccionArchivo))
            {
                BotonUbicacion.IsEnabled = true;
                ImagenUbicacion.Source   = new BitmapImage(new Uri("/Images/icons/icons8-folder.png", UriKind.Relative));
            }
            else
            {
                BotonUbicacion.IsEnabled = false;
                ImagenUbicacion.Source   = new BitmapImage(new Uri("/Images/icons/icons8-lock.png", UriKind.Relative));
            }

            UrlArchivo = archivo.Url;

            if (ComprobarUrl().Result)
            {
                BotonUrl.IsEnabled = true;
                ImagenUrl.Source   = new BitmapImage(new Uri("/Images/icons/icons8-web.png", UriKind.Relative));
            }
            else
            {
                BotonUrl.IsEnabled = false;
                ImagenUrl.Source   = new BitmapImage(new Uri("/Images/icons/icons8-lock.png", UriKind.Relative));
            }

            IconoExtension.Source = Extensiones.IconoExtension(archivo.Extension);
            IconoExtension.Width  = 35;

            Extension = archivo.Extension;

            this.Seccion         = seccion;
            this.TipoAventura    = tipoaventura;
            this.Indice          = indice.Value;
            this.MostrarArchivos = mostrararchivos;
        }
Exemple #2
0
 public DetallesArchivoCampana(Archivos archivo, string seccion, string tipoaventura, int?indice, PanelMostrarArchivos mostrararchivos = null)
 {
     InitializeComponent();
     Inicializar(archivo, seccion, tipoaventura, indice, mostrararchivos);
     Traducir();
     this.DataContext = this;
 }