Пример #1
0
        protected ImageItem(SerializationInfo info, StreamingContext context)
        {
            _includeFlag      = (IncludeFlags)info.GetInt32("IncludeFlag");
            _fileName         = info.GetString("FileName");
            _filePath         = info.GetString("FilePath");
            _stretchType      = (StretchTypes)info.GetInt32("StretchType");
            _textDisplayFlag  = (ThreeWayFlags)info.GetInt32("TextDisplayFlag");
            _recursiveDirFlag = info.GetBoolean("RecursiveDirFlag");
            _offset           = (Point)info.GetValue("Offset", typeof(Point));
            _scaleFactor      = (float)info.GetDouble("ScaleFactor");
            _keywordList      = (ArrayList)info.GetValue("KeywordList", typeof(ArrayList));
// ??		_previewScaleFactor = (float) info.GetDouble("PreviewScaleFactor");

            SetPathAndFilename(_filePath + _fileName);
            _appLog = new TSOP.AppLog();
            try
            {
                tf = new ThumbnailFile(this.GetThumbnailPathAndFileName());
                //_imageObj = Image.FromFile(PathAndFileName);
            }
            catch (Exception ex)
            {
                _appLog.LogError("failed to deserialize image item", ex, "ImageItem", "Constructor");
            }
        }
Пример #2
0
 private void Init()
 {
     this._keywordList        = new ArrayList();
     this._includeFlag        = IncludeFlags.UseDefault;
     this._offset             = new Point(0, 0);
     this._recursiveDirFlag   = false;
     this._scaleFactor        = 1.0f;
     this._stretchType        = StretchTypes.UseDefault;
     this._textDisplayFlag    = ThreeWayFlags.UseDefault;
     this._previewScaleFactor = 1.0f;
     this._imageObj           = null;
     this._index  = -1;
     this._appLog = new TSOP.AppLog();
 }
        public ThumbnailFile(string fileName)
        {
            _fileName = fileName;

            _type = new Byte[4] {
                84, 72, 78, 76
            };

            _blank    = new Byte[131];
            _blank[0] = 1;
            _blank[1] = 1;

            _appLog = new TSOP.AppLog();
        }
        private void _slideTimer_Tick(object sender, System.EventArgs e)
        {
            int i = DateTime.Now.Second % 4;

            try
            {
                if (_processor != null)
                {
                    CleanupImageMemory();
                    _currentImage = _processor.GetNextImage();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                TSOP.AppLog appLog = new TSOP.AppLog();
                appLog.LogError("failed to get next image", ex, "ScreenSaverForm", "_slideTimer_Tick");
            }
            Refresh();
        }