Exemplo n.º 1
0
 private void RestoreXML_Handler(object sender, RoutedEventArgs e)
 {
     using (StreamReader stream = new StreamReader(XmlSaveFilename))
     {
         XmlSerializer serializer = new XmlSerializer(typeof(Yawn.Layout.DockDescriptor));
         object        layout     = serializer.Deserialize(stream);
         MyDock.Clear();
         Yawn.Layout.Restore(layout, MyDock, MyContentCreator);
     }
 }
Exemplo n.º 2
0
 private void Restore_Handler(object sender, RoutedEventArgs e)
 {
     using (FileStream stream = new FileStream(BinarySaveFilename, FileMode.Open))
     {
         BinaryFormatter formatter = new BinaryFormatter();
         object          layout    = formatter.Deserialize(stream);
         MyDock.Clear();
         Yawn.Layout.Restore(layout, MyDock, MyContentCreator);
     }
 }
Exemplo n.º 3
0
 private void Clear_Handler(object sender, RoutedEventArgs e)
 {
     MyDock.Clear();
 }