Esempio n. 1
0
        public CreateNewForm(string initialRouteFileName)
        {
            InitializeComponent();

            mapImageFileName.Items.AddRange(Util.ApplicationSettings.RecentMapImageFileNames.ToArray());
            routeFileName.Items.AddRange(Util.ApplicationSettings.RecentRouteFileNames.ToArray());

            supportedMapImageFileFormats          = SupportedImportFormatManager.GetSupportedMapFileFormats();
            mapImageFileFormatComboBox.DataSource = supportedMapImageFileFormats;

            supportedRouteFileFormats          = SupportedImportFormatManager.GetSupportedRouteFileFormats();
            routeFileFormatComboBox.DataSource = supportedRouteFileFormats;

            supportedGPSDevices = SupportedImportFormatManager.GetSupportedGPSDevices();

            bool gpsDevicesFound = SearchForGPSDevices();

            if (initialRouteFileName != null)
            {
                routeFileName.Text    = initialRouteFileName;
                routeFromFile.Checked = true;
            }
            else
            {
                if (!gpsDevicesFound)
                {
                    routeFromFile.Checked = true;
                }
            }

            InitialTransformation = new Transformation();

            UpdateUI();

            UpdateImageSizeLabel();
        }