Ejemplo n.º 1
0
        public KmlOptionsPopup()
        {
            InitializeComponent();

            Project.setDlgIcon(this);

            dontShowCheckBox.Checked = Project.kmlOptions.DontShowInPopup;

            //			dontShowCheckBox.DataBindings.Add("Checked", Project.kmlOptions, "DontShowInPopup");

            KmlDocumentControl kdc = new KmlDocumentControl();
            kdc.Dock = System.Windows.Forms.DockStyle.Fill;
            mainPanel.Controls.Add(kdc);
        }
Ejemplo n.º 2
0
        public OptionsForm(PictureManager pictureManager, int mode)
        {
            m_pictureManager = pictureManager;

            inSet = true;

            InitializeComponent();

            distanceUnitsComboBox.SelectedIndex = Project.unitsDistance;
            coordStyleComboBox.SelectedIndex = Project.coordStyle;
            distortionFactorTextBox.Text = "" + Project.distortionFactor;
            mapPopupsCheckBox.Checked = Project.allowMapPopups;
            showEarthquakesCheckBox.Checked = Project.drawEarthquakes;
            eqUseOldDataCheckBox.Checked = Project.eqUseOldData;
            fetchOnStartCheckBox.Checked = Project.eqFetchOnStart;
            showWaypointsCheckBox.Checked = Project.drawWaypoints;
            eqFillOnlyRecentCheckBox.Checked = Project.earthquakeStyleFillRecent;
            eqFillModeTimeComboBox.SelectedIndex = Project.earthquakeStyleFillHowRecentIndex;

            waypointNameStyleComboBox.Items.AddRange(Project.waypointNameStyleChoices);
            waypointNameStyleComboBox.SelectedIndex = Project.waypointNameStyle;

            suspendKeepAliveCheckBox.Checked = Project.suspendKeepAlive;
            useProxyCheckBox.Checked = Project.useProxy;
            forceEmptyProxyCheckBox.Checked = Project.forceEmptyProxy;
            forceEmptyProxyCheckBox.Enabled = !Project.useProxy;
            proxyServerTextBox.Text  = Project.proxyServer;
            proxyPortTextBox.Text    = "" + Project.proxyPort;

            kmlShowPopupCheckBox.Checked = Project.kmlOptions.ShowInPopup;

            //			kmlShowPopupCheckBox.DataBindings.Add("Checked", Project.kmlOptions, "ShowInPopup");

            KmlDocumentControl kdc = new KmlDocumentControl();
            kdc.Dock = System.Windows.Forms.DockStyle.Fill;
            kmlPanel.Controls.Add(kdc);

            switch(mode)
            {
                default:
                case 0:
                    // stay on the last chosen
                    tabControl.SelectedIndex = (selectedTab == 1) ? 0 : selectedTab;
                    break;
                case 1:
                    // first tab
                    break;
                case 2:
                    // go to Earthquakes tab
                    tabControl.SelectedIndex = 1;
                    break;
                case 3:
                    // go to Waypoints tab
                    tabControl.SelectedIndex = 2;
                    break;
                case 4:
                    // go to GE export options tab
                    tabControl.SelectedIndex = 3;
                    break;
                case 5:
                    // go to Files tab
                    tabControl.SelectedIndex = 4;
                    break;
            }
            Project.setDlgIcon(this);

            string imageFileName = Project.GetMiscPath("depthcc.gif");
            try
            {
                if(!File.Exists(imageFileName))
                {
                    // load the file remotely, don't hold diagnostics if load fails:
                    string url = Project.MISC_FOLDER_URL + "/depthcc.gif";
            //					DloadProgressForm loaderForm = new DloadProgressForm(url, imageFileName, false, true);
            //					loaderForm.ShowDialog();
                    new DloadNoForm(url, imageFileName, 3000);
                }
                this.depthCcPictureBox.Image = new Bitmap(imageFileName);
            }
            catch {}

            drawCameraAimCheckBox.Checked = Project.drawCentralPoint;
            drawCornersCheckBox.Checked = Project.drawCornerArrows;
            drawRulersCheckBox.Checked = Project.drawRulers;
            printShadowRulersCheckBox.Checked = Project.printMinuteRulersUseShadow;
            showNumbersCheckBox.Checked = Project.showTrackpointNumbers;
            showNamesCheckBox.Checked = Project.showWaypointNames;

            for(int i=0; i < camAlts.Length ;i++)
            {
                if(Project.cameraHeightMin >= camAlts[i])
                {
                    minCamAltComboBox.SelectedIndex = i;
                    break;
                }
            }

            cacheFolderTextBox.Text = Project.mapsPath;
            useIconsCheckBox.Checked = Project.useWaypointIcons;
            helpAtStartCheckBox.Checked = Project.showHelpAtStart;

            string iconsPath = Project.GetWptPath("");
            iconsHintLabel.Text = "Note: place your .gif icons in\r\n     " + iconsPath;

            if(Project.mouseWheelAction == 0)
            {
                mouseWheelActionNoneRadioButton.Checked = true;
            }
            else if(Project.mouseWheelAction == 1)
            {
                mouseWheelActionZoomRadioButton.Checked = true;
            }
            else if(Project.mouseWheelAction == 2)
            {
                mouseWheelActionZoomRevRadioButton.Checked = true;
            }
            else if(Project.mouseWheelAction == 3)
            {
                mouseWheelActionPanRadioButton.Checked = true;
            }

            wheelNoteLabel.Text = "1. Hold Shift key to enable Pan when Zoom is selected and vice versa.\r\n\r\n2. Hold Ctrl to pan horizontally.";

            inSet = false;
        }