public BitmapViewer() { _browserImageFormat = BrowserImageFormat.Auto; _browserJpegQuality = 70; _firstBitmapAccess = true; _imageLoadMode = ImageLoadMode.AdaptiveTile; _previewImageResizeRatio = 8; _previewImageEnabled = true; _tileSize = 300; _postedState = BitmapViewerState.Empty; _fileCache = FileCache.GetInstance(); if (!DesignMode) { _bitmapChanged = false; } ScriptFiles.Add("BitmapViewer"); ScriptClassName = "Aurigma.GraphicsMill.BitmapViewer"; }
protected override bool LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection postCollection) { var baseLoadPostData = base.LoadPostData(postDataKey, postCollection); var state = postCollection[GetStateFieldId()]; if (string.IsNullOrEmpty(state)) { return(false); } _postedState = new JavaScriptSerializer().Deserialize <BitmapViewerState>(state); if (string.IsNullOrEmpty(_postedState.Source_FileName)) { return(false); } _scaleToActualSize = _postedState.ScaleToActualSize; SourceCacheFilename = _postedState.Source_FileName; return(baseLoadPostData); }