Example #1
0
        private void menuItemSaveAsKMZ_Click(object sender, EventArgs e)
        {
            if (session == null || session.IsEmpty)
            {
                MessageBox.Show("No session active");
                return;
            }

            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter     = "Kmz File (*.kmz)|*.kmz";
            dialog.DefaultExt = "kmz";
            dialog.FileName   = session.Name;
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            try
            {
                SessionExporter.ExportAsKMZ(log, session, dialog.FileName);
            }
            catch (Exception ex)
            {
                log.Error(ex.Message, ex);
            }
        }
Example #2
0
        private void menuItemSaveAsCSV_Click(object sender, EventArgs e)
        {
            if (session == null || !session.IsLoaded)
            {
                return;
            }

            // Show dialog for file selection
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter     = "Log File (*.csv)|*.csv|All Files (*.*)|*.*";
            dialog.DefaultExt = "csv";
            dialog.FileName   = session.Name;
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            try
            {
                SessionExporter.ExportAsCSV(log, session, dialog.FileName);
            }
            catch (Exception ex)
            {
                log.Error(ex.Message, ex);
            }
        }
Example #3
0
        private void menuItemSaveAsCHN_Click(object sender, EventArgs e)
        {
            if (session == null || session.IsEmpty)
            {
                MessageBox.Show("No session active");
                return;
            }

            try
            {
                FolderBrowserDialog dialog = new FolderBrowserDialog();
                dialog.ShowNewFolderButton = true;
                dialog.Description         = "Select folder to store CHN files";
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    SessionExporter.ExportAsCHN(log, session, dialog.SelectedPath);
                    log.Info("session " + session.Name + " stored with CHN format in " + dialog.SelectedPath);
                }
            }
            catch (Exception ex)
            {
                log.Error(ex.Message, ex);
            }
        }