コード例 #1
0
 private void tsbExportGPX_Click(object sender, EventArgs e)
 {
     if (sfdGPX.ShowDialog() == DialogResult.OK)
     {
         Cursor = Cursors.WaitCursor;
         try
         {
             neoFlyData.ExportToGPXFile(sfdGPX.FileName);
         }
         finally
         {
             Cursor = Cursors.Default;
         }
     }
 }
コード例 #2
0
 static void Main()
 {
     if (CommandLine.Arguments.Count == 0)
     {
         SearchExternalViewers();
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new MainForm());
     }
     else
     {
         try
         {
             NeoFlyData neoFlyData = new NeoFlyData();
             neoFlyData.Load();
             neoFlyData.ExportToGPXFile(CommandLine.Arguments);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "NeoFlyExport error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }