Deserialize() public method

public Deserialize ( string path ) : OpenedDocumentsList
path string
return OpenedDocumentsList
コード例 #1
0
        /// <summary>
        /// Ru: Загружает формы для редактирования из списка
        /// En: Loads edit forms from list from file
        /// </summary>
        public void LoadEditorFormsState()
        {
            //Загрузка редакторов
            OpenedDocumentsList modlist = new OpenedDocumentsList();

            if (File.Exists(Application.StartupPath + "\\" + FileName))
            {
                modlist = modlist.Deserialize(Application.StartupPath + "\\" + FileName);
                foreach (string path in modlist.Files)
                {
                    SFE = new Forms.Editors.SourceFileEditor();
                    SFE.OpenContainingFolderEvent += new EventHandler <Forms.BaseForms.PathEventArgs>(OpenContainingFolderEvent);
                    SFE.SetFile(path);
                    SFE.Show(DockPanel, DockState.Document);
                }
                foreach (ComponentWrapper comp in modlist.Components)
                {
                    this.ShowEditor(comp);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Ru: Загружает формы для редактирования из списка
 /// En: Loads edit forms from list from file
 /// </summary>
 public void LoadEditorFormsState()
 {
     //Загрузка редакторов
     OpenedDocumentsList modlist = new OpenedDocumentsList();
     if (File.Exists(Application.StartupPath + "\\" + FileName))
     {
         modlist = modlist.Deserialize(Application.StartupPath + "\\" + FileName);
         foreach (string path in modlist.Files)
         {
             SFE = new Forms.Editors.SourceFileEditor();
             SFE.OpenContainingFolderEvent += new EventHandler<Forms.BaseForms.PathEventArgs>(OpenContainingFolderEvent);
             SFE.SetFile(path);
             SFE.Show(DockPanel, DockState.Document);
         }
         foreach (ComponentWrapper comp in modlist.Components)
         {
             this.ShowEditor(comp);
         }
     }
 }