Exemplo n.º 1
0
        private void exportTracksBtn_Click(object sender, EventArgs e)
        {
            using (SaveFileDialog sDialog = new SaveFileDialog())
            {
                sDialog.Title      = "Exporting tracks...";
                sDialog.Filter     = "Google KML (*.kml)|*.kml";
                sDialog.FileName   = string.Format("{0}.kml", StrUtils.GetHMSString());
                sDialog.DefaultExt = "kml";

                if (sDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    SaveTracks(sDialog.FileName);
                }
            }
        }
Exemplo n.º 2
0
        private void SaveFullSnapshot()
        {
            Bitmap target = new Bitmap(this.Width, this.Height);

            this.DrawToBitmap(target, this.DisplayRectangle);

            try
            {
                if (!Directory.Exists(snapshotsPath))
                {
                    Directory.CreateDirectory(snapshotsPath);
                }

                target.Save(Path.Combine(snapshotsPath, string.Format("{0}.{1}", StrUtils.GetHMSString(), ImageFormat.Png)));
            }
            catch
            {
                //
            }
        }