Beispiel #1
0
        private void M_btnExportTradenodes_Click(object sender, EventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter = "00_tradenode.txt (*.txt)|*.txt";

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    m_provinceEditor.Export(dialog.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Cant write file!" + ex.Message, "Cant write file!");
                }
            }
        }
Beispiel #2
0
        private void BtnExportTradenodes_Click(object sender, EventArgs e)
        {
            var saveFileDialog = new SaveFileDialog
            {
                Filter = "00_tradenode.txt (*.txt)|*.txt"
            };

            if (saveFileDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            try
            {
                m_provinceEditor.Export(saveFileDialog.FileName);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Cant write file!" + ex.Message, "Cant write file!");
            }
        }