void ExecuteCommandLoadProject(object o)
        {
            try
            {
                var path = MasterView.GetLoadFilePath();

                var si = SaveLoadManager.Load(path);
                World = si.World;
                FieldPresenter.UnselectField();
                //HeightmapPresenter = si.Layer;

                MasterView.RefreshView();
                MasterView.ShowInfoOKMessage("Loaded");
            }
            catch (XmlException xe)
            {
                MasterView.ShowErrorOKMessage("Not loaded due to xml error: " + xe.Message);
            }
            catch (InvalidOperationException ioe)
            {
                MasterView.ShowErrorOKMessage("Not loaded due to Invalid Operation: " + ioe.Message);
            }
            catch (IOException ie)
            {
                MasterView.ShowErrorOKMessage("Not loaded due to IO error: " + ie.Message);
            }
            catch (Exception e)
            {
                MasterView.ShowErrorOKMessage("Not loaded due to: " + e.Message);
            }
        }
示例#2
0
        public void SetupPresenters(FieldPresenter fp, HeightMapPresenter hp, Visualization3DPresenter vp)
        {
            FieldPresenter           = fp;
            HeightmapPresenter       = hp;
            Visualization3DPresenter = vp;

            var param = new LoadItemsParameter()
            {
                Details    = FieldPresenter.GatheredDetails,
                Profiles   = FieldPresenter.GatheredProfile,
                BlendModes = FieldPresenter.GatheredFieldBlendModes
            };

            SaveLoadManager = new SaveLoadManager(param);
        }