Esempio n. 1
0
        private void LoadMap(Map map)
        {
            var actionLoadMetadataMap =
                new ActionLoadMetadataMap(_accessMap.GetFullPathWithoutExtension(map.MetadataFileName + ".bmm"));

            actionLoadMetadataMap.Executar();
            LoadMetadataMap(actionLoadMetadataMap.MetadataMap);

            MapDisplay.Map = map;
            UpdateListBoxLayer();

            TextBoxMapWidth.Text  = map.Width.ToString(CultureInfo.InvariantCulture);
            TextBoxMapHeight.Text = map.Height.ToString(CultureInfo.InvariantCulture);
        }
        public DialogResult ShowDialog()
        {
            var result = _dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                ActionLoadMetadataMap = new ActionLoadMetadataMap(_dialog.FileName);
                ActionLoadMetadataMap.Executar();

                if (!File.Exists(_dialog.FileName))
                {
                    return(DialogResult.Cancel);
                }
            }

            return(result);
        }