public StageDocument(ProjectDocument project, StageInfo info, StageLinkInfo linkInfo)
        {
            Project = project;
            History = new History();
            _map = info;
            Tileset = new TilesetDocument(_map.Tileset);
            LinkName = linkInfo.Name;

            // wrap all map screens in screendocuments
            // this should be the only time MegaMan.Screen's are touched directly
            foreach (var pair in _map.Screens)
            {
                WrapScreen(pair.Value);
            }
        }
Exemple #2
0
        public StageDocument(ProjectDocument project, StageLinkInfo linkInfo)
        {
            Project = project;
            History = new History();
            var stageReader = new StageXmlReader();
            map = stageReader.LoadStageXml(linkInfo.StagePath);
            Tileset = new TilesetDocument(map.Tileset);
            LinkName = linkInfo.Name;

            // wrap all map screens in screendocuments
            // this should be the only time MegaMan.Screen's are touched directly
            foreach (var pair in map.Screens)
            {
                WrapScreen(pair.Value);
            }
        }
Exemple #3
0
 public StageDocument(ProjectDocument project)
 {
     Project = project;
     map = new StageInfo();
     History = new History();
 }
        private void StageChanged(object sender, StageChangedEventArgs e)
        {
            if (e.Stage != null)
            {
                if (_history != null)
                {
                    _history.Updated -= UpdateActions;
                }

                _history = e.Stage.History;
                OnPropertyChanged("Items");

                _history.Updated += UpdateActions;
            }
        }