protected override void ReleaseCore ()
 {
     if (_region != null)
         _region.Close();
     _region = null;
     Nodes.Clear();
 }
Exemple #2
0
        protected override void ExpandCore()
        {
            try {
                if (_region == null)
                {
                    _region = new CubicRegionFile(_path);
                }

                for (int x = 0; x < 32; x++)
                {
                    for (int z = 0; z < 32; z++)
                    {
                        if (_region.HasChunk(x, z))
                        {
                            Nodes.Add(new RegionChunkDataNode(_region, x, z));
                        }
                    }
                }
            }
            catch {
                if (FormRegistry.MessageBox != null)
                {
                    FormRegistry.MessageBox("Not a valid cubic region file.");
                }
            }
        }
Exemple #3
0
 protected override void ReleaseCore()
 {
     if (_region != null)
     {
         _region.Close();
     }
     _region = null;
     Nodes.Clear();
 }
        protected override void ExpandCore()
        {
            try {
                if (_region == null)
                    _region = new CubicRegionFile(_path);

                for (int x = 0; x < 32; x++) {
                    for (int z = 0; z < 32; z++) {
                        if (_region.HasChunk(x, z)) {
                            Nodes.Add(new RegionChunkDataNode(_region, x, z));
                        }
                    }
                }
            }
            catch {
                if (FormRegistry.MessageBox != null)
                    FormRegistry.MessageBox("Not a valid cubic region file.");
            }
        }