예제 #1
0
 public void Store(IDecoupledStorage storage, string parentSection, int index)
 {
     string section = parentSection + STR_DocView + index;
     storage.WriteString(section, STR_FileName, FileName);
     storage.WriteInt32(section, STR_SelectionActive, SelectionActive);
     storage.WriteInt32(section, STR_SelectionAnchor, SelectionAnchor);
     storage.WriteInt32(section, STR_TopLine, TopLine);
 }
예제 #2
0
 // Alt+Home to drop a marker. Escape gets me back.
 public static DocView FromStorage(IDecoupledStorage storage, string parentSection, int index)
 {
     string section = parentSection + STR_DocView + index;
     DocView newDocView = new DocView();
     newDocView.FileName = storage.ReadString(section, STR_FileName);
     newDocView.SelectionActive = storage.ReadInt32(section, STR_SelectionActive);
     newDocView.SelectionAnchor = storage.ReadInt32(section, STR_SelectionAnchor);
     newDocView.TopLine = storage.ReadInt32(section, STR_TopLine);
     return newDocView;
 }
예제 #3
0
 public static SuperView FromStorage(IDecoupledStorage storage, int index)
 {
     SuperView superView = new SuperView();
     string section = STR_SuperView + index.ToString();
     superView.Name = storage.ReadString(section, STR_Name);
     superView.ActiveFile = storage.ReadString(section, STR_ActiveFile);
     int docViewCount = storage.ReadInt32(section, STR_DocViewCount);
     for (int i = 0; i < docViewCount; i++)
     {
         DocView newDocView = DocView.FromStorage(storage, section, i);
         superView.DocViews.Add(newDocView);
     }
     return superView;
 }
예제 #4
0
 public void Store(IDecoupledStorage storage, int index)
 {
     string section = STR_SuperView + index.ToString();
     storage.WriteString(section, STR_Name, Name);
     storage.WriteString(section, STR_ActiveFile, ActiveFile);
     storage.WriteInt32(section, STR_DocViewCount, DocViews.Count);
     for (int i = 0; i < DocViews.Count; i++)
         DocViews[i].Store(storage, section, i);
 }