void box_MouseClick(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right || ras == null) { return; } var map = ras.ExportMap(); var json = JsonMap.Save(map); var sfd = new SaveFileDialog(); sfd.Filter = "Json Map (*.jm)|*.jm|All Files (*.*)|*.*"; if (sfd.ShowDialog() == DialogResult.OK) { File.WriteAllText(sfd.FileName, json); } }
public string ExportToJson() => JsonMap.Save(ras.ExportMap());