Exemplo n.º 1
0
        private void menuItem_saveScene_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();

            var dialogResult = dlg.ShowDialog();

            if (dialogResult == true)
            {
                GraphicsProjectIO.WriteToXmlFile(dlg.FileName, Scene);
            }
        }
Exemplo n.º 2
0
        //TODO Change this to something more adequate
        private void menuItem_openScene_Click(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();

            var dialogResult = dlg.ShowDialog();

            if (dialogResult == true)
            {
                var deserialaziedScene = GraphicsProjectIO.ReadFromXmlFile <Scene>(dlg.FileName);

                Scene = deserialaziedScene;

                screen.Source = Scene.Render();
            }
        }