private void RemoveToolStripMenuItem_Click(object sender, EventArgs e) { layer = null; if (attributeDialog != null) { attributeDialog.Close(); attributeDialog = null; } backwindow = null; Graphics graphics = panel1.CreateGraphics(); graphics.Clear(Color.AliceBlue); }
private void OpenToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "Shapefile文件|*.shp"; openFileDialog.RestoreDirectory = false; openFileDialog.FilterIndex = 1; openFileDialog.Multiselect = false; if (openFileDialog.ShowDialog() != DialogResult.OK) { return; } layer = FShapefile.ReadShapeFile(openFileDialog.FileName); view.MyMapExtent.CopyFrom(layer.Extent); DrawMap(); }
public void FillValue(FLayer layer) { dataGridView1.Columns.Clear(); dataGridView1.Columns.Add("InternalID", "InternalID"); dataGridView1.Columns[0].Visible = false; for (int i = 0; i < layer.Fields.Count; i++) { dataGridView1.Columns.Add(layer.Fields[i].name, layer.Fields[i].name); } for (int i = 0; i < layer.Features.Count; i++) { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = i; for (int j = 0; j < layer.Fields.Count; j++) { dataGridView1.Rows[i].Cells[j + 1].Value = layer.Features[i].getAttributeValue(j); } dataGridView1.Rows[i].Selected = layer.Features[i].selected; } }
public MainMenu() { mainLayer = new MainMenuLayer(this); this.AddChild(mainLayer); }
public Form1(FLayer _layer, Form2 _mapwindow) { InitializeComponent(); layer = _layer; mapwindow = _mapwindow; }
public GameScene() { mainLayer = new GameLayer(this); this.AddChild(mainLayer); }
public ExpositionScene() { mainLayer = new ExpositionLayer(this); this.AddChild(mainLayer); }