Ejemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            _settings = UploadConfigurationSection.GetConfig();

            if (String.IsNullOrEmpty(ImagePath))
            {
                ImagePath = _settings == null ? DEFAULT_IMAGE_PATH : _settings.ImagePath;
            }

            ImagePath = ImagePath.TrimEnd('/') + "/";

            if (String.IsNullOrEmpty(CSSPath))
            {
                CSSPath = _settings == null ? DEFAULT_CSS_PATH : _settings.CSSPath;
            }

            CSSPath = CSSPath.TrimEnd('/') + "/";

            if (String.IsNullOrEmpty(ScriptPath))
            {
                ScriptPath = _settings == null ? DEFAULT_JS_PATH : _settings.ScriptPath;
            }

            if (String.IsNullOrEmpty(ProgressUrl))
            {
                ProgressUrl = _settings == null ? DEFAULT_PROGRESS_URL : _settings.ProgressUrl;
            }

            if (_settings != null)
            {
                AllowedFileExtensions  = _settings.AllowedFileExtensions;
                ShowCancelButton       = _settings.ShowCancelButton;
                ShowProgressBar        = _settings.ShowProgressBar;
                EnableManualProcessing = _settings.EnableManualProcessing;
            }

            ScriptPath = ScriptPath.TrimEnd('/') + "/";

            if (UploadManager.Instance.ModuleInstalled)
            {
                _status = UploadManager.Instance.Status;
                UploadManager.Instance.Status = null;
            }
        }
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            _settings = UploadConfigurationSection.GetConfig();

            if (String.IsNullOrEmpty(ImagePath))
            {
                ImagePath = _settings == null ? DEFAULT_IMAGE_PATH : _settings.ImagePath;
            }

            ImagePath = ImagePath.TrimEnd('/') + "/";

            if (String.IsNullOrEmpty(CSSPath))
            {
                CSSPath = _settings == null ? DEFAULT_CSS_PATH : _settings.CSSPath;
            }

            CSSPath = CSSPath.TrimEnd('/') + "/";

            if (String.IsNullOrEmpty(ScriptPath))
            {
                ScriptPath = _settings == null ? DEFAULT_JS_PATH : _settings.ScriptPath;
            }

            if (String.IsNullOrEmpty(ProgressUrl))
            {
                ProgressUrl = _settings == null ? DEFAULT_PROGRESS_URL : _settings.ProgressUrl;
            }

            if (_settings != null)
            {
                AllowedFileExtensions = _settings.AllowedFileExtensions;
                ShowCancelButton = _settings.ShowCancelButton;
                ShowProgressBar = _settings.ShowProgressBar;
                EnableManualProcessing = _settings.EnableManualProcessing;
            }

            ScriptPath = ScriptPath.TrimEnd('/') + "/";

            if (UploadManager.Instance.ModuleInstalled)
            {
                _status = UploadManager.Instance.Status;
                UploadManager.Instance.Status = null;
            }
        }