Example #1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() != System.Windows.Forms.DialogResult.Cancel)
            {
                if (openFileDialog1.FileName.Trim() != string.Empty)
                {
                    string fileName = openFileDialog1.FileName;
                    _loadedMap     = new Map.CMap(fileName, _atlasCache);
                    _hitBoxCounter = _loadedMap.hitBoxCounter;
                    mpvMapView.map = _loadedMap;
                    cmbLayers.Items.Clear();

                    //load layers
                    foreach (Map.CLayer layer in _loadedMap._layers)
                    {
                        cmbLayers.Items.Add(layer.NAME);
                    }

                    cmbLayers.SelectedIndex = 0;
                }
            }
        }
Example #2
0
 private void _newMap()
 {
     _loadedMap     = null;
     _loadedMap     = new Map.CMap(_atlasCache);
     mpvMapView.map = _loadedMap;
 }