예제 #1
0
파일: FrmMap.cs 프로젝트: mzaman07/kot-mono
        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;
                }
            }
        }
예제 #2
0
파일: FrmMap.cs 프로젝트: mzaman07/kot-mono
 private void _newMap()
 {
     _loadedMap     = null;
     _loadedMap     = new Map.CMap(_atlasCache);
     mpvMapView.map = _loadedMap;
 }