private void Close_Click(object sender, EventArgs e) { MapMain.Refresh(); Program.ReSetCurrentMap(); graphics = Graphics.FromImage(Program.CurrentMap); MapMain.Image = Program.CurrentMap; ChangeObjCon con = new ChangeObjCon(); con.Show(); this.Close(); }
private void Change_Click(object sender, EventArgs e) { var rows = Program.CurrentOpertedDataBase.Tables[2].Select("[" + UFilter.Text + "] = '" + Input.Text + "'"); if (rows.Length == 0) { MessageBox.Show("Ни одного подходящего элемента найдено не было", "Изменение", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { var row = rows[0]; PixelMap map = Program.MapPositionUObj[Convert.ToInt32(row[0])]; ClearObject(map); Program.uobject = new UObj(); Program.uobject.Id = Convert.ToInt32(row[0]); ChangeObjCon con = new ChangeObjCon(); con.Show(); this.Close(); } }