Example #1
0
        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);
            }
        }
Example #2
0
 public string ExportToJson() => JsonMap.Save(ras.ExportMap());