Exemple #1
0
 private void ClearEditor()
 {
     ChangeEditorMode(EditorMode.Design);
     _currentAnimationId = 0;
     NodeSelection.Clear();
     KeySelection.Clear();
     _currentDocument = null;
 }
Exemple #2
0
        /// <summary>
        /// Loads a <see cref="Document"/> into the editor.
        /// </summary>
        public void LoadDocument(Document document)
        {
            CloseCurrentDocument();

            _currentDocument           = document;
            _currentDocument.Modified += CurrentDocumentOnModified;

            // todo probably replace this with a FullReload() concept to do clean switch to different data
            ChangeCurrentAnimationInternal(_currentDocument.GetFirstAnimationId()); // documents always have at least 1 animation
            _messageBus.Publish(new DocumentLoaded(_currentDocument));
            DoChangeEditorMode(EditorMode.Design);
            DoChangeEditorTool(EditorTool.Modify);
        }
Exemple #3
0
        public void CreateNewDocument()
        {
            var document = Document.CreateNew(_messageBus);

            LoadDocument(document);
        }