Exemple #1
0
        public void LoadStatus(XmlReader reader)
        {
            layouts.Clear();
            XmlSerializer          ser = new XmlSerializer(typeof(DockToolbarFrameStatus));
            DockToolbarFrameStatus col = (DockToolbarFrameStatus)ser.Deserialize(reader);

            SetStatus(col);
        }
Exemple #2
0
        public DockToolbarFrameStatus GetStatus()
        {
            SaveCurrentLayout();
            DockToolbarFrameStatus col = new DockToolbarFrameStatus();

            col.Version = DockToolbarFrameStatus.CurrentVersion;

            foreach (var layout in layouts)
            {
                col.Status.Add(new DockToolbarFrameLayout()
                {
                    Id   = layout.Key,
                    Bars = layout.Value,
                });
            }
            return(col);
        }
Exemple #3
0
 public void SetStatus(DockToolbarFrameStatus status)
 {
     layouts.Clear();
     if (status != null && status.Status != null)
     {
         foreach (DockToolbarFrameLayout c in status.Status)
         {
             if (status.Version < 2)
             {
                 // Convert from old to new toolbar id
                 foreach (DockToolbarStatus ts in c.Bars)
                 {
                     ts.BarId = ConvertToolbarId(ts.BarId);
                 }
             }
             layouts [c.Id] = c.Bars;
         }
     }
     RestoreLayout("");
 }
Exemple #4
0
 public void SetStatus(DockToolbarFrameStatus status)
 {
     layouts.Clear ();
     if (status != null && status.Status != null) {
         foreach (DockToolbarFrameLayout c in status.Status) {
             if (status.Version < 2) {
                 // Convert from old to new toolbar id
                 foreach (DockToolbarStatus ts in c.Bars)
                     ts.BarId = ConvertToolbarId (ts.BarId);
             }
             layouts [c.Id] = c.Bars;
         }
     }
     RestoreLayout ("");
 }
Exemple #5
0
        public DockToolbarFrameStatus GetStatus()
        {
            SaveCurrentLayout ();
            DockToolbarFrameStatus col = new DockToolbarFrameStatus ();
            col.Version = DockToolbarFrameStatus.CurrentVersion;

            foreach (var layout in layouts) {
                col.Status.Add (new DockToolbarFrameLayout () {
                    Id = layout.Key,
                    Bars = layout.Value,
                });
            }
            return col;
        }