Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Upload" /> class.
        /// </summary>
        /// <param name="viewContext">The view context.</param>
        /// <param name="clientSideObjectWriterFactory">The client side object writer factory.</param>
        public Upload(  ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory,
            IUrlGenerator urlGenerator, ILocalizationService localizationService)
            : base(viewContext, clientSideObjectWriterFactory)
        {
            ScriptFileNames.AddRange(new [] { "telerik.common.js", "telerik.upload.js" });

            ClientEvents = new UploadClientEvents();
            Enabled = true;
            Multiple = true;
            ShowFileList = true;
            Async = new UploadAsyncSettings(this);

            UrlGenerator = urlGenerator;

            Localization = new UploadLocalization(localizationService, CultureInfo.CurrentCulture);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Upload" /> class.
        /// </summary>
        /// <param name="viewContext">The view context.</param>
        /// <param name="clientSideObjectWriterFactory">The client side object writer factory.</param>
        public Upload(ViewContext viewContext, IClientSideObjectWriterFactory clientSideObjectWriterFactory,
                      IUrlGenerator urlGenerator, ILocalizationService localizationService)
            : base(viewContext, clientSideObjectWriterFactory)
        {
            ScriptFileNames.AddRange(new [] { "telerik.common.js", "telerik.upload.js" });

            ClientEvents = new UploadClientEvents();
            Enabled      = true;
            Multiple     = true;
            ShowFileList = true;
            Async        = new UploadAsyncSettings(this);

            UrlGenerator = urlGenerator;

            Localization = new UploadLocalization(localizationService, CultureInfo.CurrentCulture);
        }