private void BWriteMyFile_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); if (sfd.ShowDialog() != DialogResult.OK) { return; } XMyFile myFile = new XMyFile(); myFile.WriteFile(layer, sfd.FileName); MessageBox.Show("完成"); }
private void BReadMyFile_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() != DialogResult.OK) { return; } XMyFile myFile = new XMyFile(); layer = myFile.ReadFile(openFileDialog.FileName); MessageBox.Show("读入" + layer.FeatureCount() + "个实体"); view.UpdateExtent(layer.Extent); UpdateMap(); }