public void Clear() { Board = new Board(); if (Board.Pages != null) Board.Pages.Clear(); Filename = null; }
public void LoadSelectedBoard(Board board, StorageFile retrievedFile) { SelectedBoard.Board = board; SelectedBoard.Filename = retrievedFile; RaisePropertyChanged("SelectedBoard"); }
/// <summary> /// XML에서 구축. /// </summary> /// <param name="xml"></param> /// <param name="templates"></param> /// <returns></returns> public static Board FromXml(XElement xml, IEnumerable<LbTemplate> templates) { var board = new Board() { Title = xml.Attribute("Title").Value, Author = xml.Attribute("Author").Value, AuthorEmail = xml.Attribute("AuthorEmail").Value, IsLoop = Convert.ToBoolean(xml.Attribute("IsLoop").Value), LoopCount = Convert.ToInt32(xml.Attribute("LoopCount").Value), RunUntil = DateTime.FromBinary(Convert.ToInt64(xml.Attribute("RunUntil").Value)), Pages = new ObservableCollection<IPage>(xml.Element("Pages").Elements("Page").Select(p => ExportToPage(p, templates))) }; return board; }