Bubbles3/Models/BblBook.cs
/// <summary>
/// Serialize Image viewing parameters
/// save each image's last view transforms
/// </summary>
Serialize Image viewing parameters
save each image's last view transforms
Serialize Image viewing parameters save each image ' s last view transforms
public virtual void SerializeIVP()
        {
            try
            {
                if (_ivps == null || _pages == null || _pages.Count == 0 || !Directory.Exists(System.IO.Path.GetDirectoryName(IvpPath)))
                    throw new InvalidOperationException();
            }
            catch
            {
                return;
            }
            foreach (BblPage p in _pages)
            {
                if (_ivps[p.Filename].isDirty) 
                {
                    var ivp = _ivps[p.Filename];
                    ivp.isDirty = false;
                    _ivps[p.Filename] = ivp;
                }
            }
            List<ImageViewingParams> ivps = _ivps.Values.ToList();
            if (Directory.Exists(Path))
            {
                var serializer = new System.Xml.Serialization.XmlSerializer(typeof(IvpCollection));
                using (TextWriter writer = new StreamWriter(IvpPath))
                {
                    serializer.Serialize(writer, new IvpCollection(ivps));
                }
            }
        }
public virtual void SerializeIVP ( ) { try { if ( _ivps == null || _pages == null || _pages . Count == 0 || ! Directory . Exists ( System . IO . Path . GetDirectoryName ( IvpPath ) ) ) throw new InvalidOperationException ( ) ; } catch { return ; } foreach ( BblPage p in _pages ) { if ( _ivps [ p . Filename ] . isDirty ) { var ivp = _ivps [ p . Filename ] ; ivp . isDirty = false ; _ivps [ p . Filename ] = ivp ; } } List < ImageViewingParams > ivps = _ivps . Values . ToList ( ) ; if ( Directory . Exists ( Path ) ) { var serializer = new System . Xml . Serialization . XmlSerializer ( typeof ( IvpCollection ) ) ; using ( TextWriter writer = new StreamWriter ( IvpPath ) ) { serializer . Serialize ( writer , new IvpCollection ( ivps ) ) ; } } }
Serialize Image viewing parameters
save each image's last view transforms
Serialize Image viewing parameters save each image ' s last view transforms