コード例 #1
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            string fitFile = textBoxFitFilename.Text;
            string tcxFile = textBoxTcxFilename.Text;

            Tcx tcx = Fit.ReadFitFileIntoTcxObject(fitFile);

            if (checkBoxDistance.Checked)
            {
                tcx.DistanceMeters = double.Parse(textBoxDistance.Text);
            }


            tcx.FixHeartRate();

            tcx.AdjustPoints();

            if (checkBoxVirtualRoute.Checked)
            {
                tcx.CreateVirtualRoute(double.Parse(textBoxLatitude.Text), double.Parse(textBoxLongitude.Text),
                                       (Tcx.RouteType)Enum.Parse(typeof(Tcx.RouteType), comboBoxRouteType.SelectedItem.ToString()), checkBoxUseDistance.Checked);
            }

            tcx.Save(tcxFile);

            Clipboard.Clear();
            Clipboard.SetText(tcxFile);

            MessageBox.Show("Completed");
        }