예제 #1
0
        /// <summary>
        /// Menu command: New
        /// </summary>
        public static void SetNewMap()
        {
            var result = MessageBox.Show("Clear the map? Unsaved changes will be lost.", "New map", MessageBoxButtons.YesNo);

            if (result != DialogResult.No)
            {
                MapEditor.Instance.CurrentMap = MapFactory.BuildNew();
                ViewMapProperties();
            }
        }
예제 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public GridForm()
        {
            InitializeComponent();

            // an empty map.
            _mapEditor.CurrentMap = MapFactory.BuildNew();

            // load the sheet
            _sheetEditor.CurrentSheet = SheetFactory.LoadSheetFromFile();

            // setup form components
            RefreshDisplay();
        }