public PictureManager(PictureBox pb, Form mainForm, CameraTrack cameraTrack)
 {
     m_pictureBox = pb;
     m_mainForm = mainForm;
     m_cameraTrack = cameraTrack;
     This = this;
 }
        public DlgEarthquakesHistorical(PictureManager pictureManager)
        {
            m_pictureManager = pictureManager;

            InitializeComponent();

            string wrn =
                  "    This program displays data that you select from publically available databases.\n"
                + "    Author and distributors of this program do not have any control over data collection,\n"
                + "    selection or the quality of the data. This program may contain bugs and distort data.\n"
                + "    Analysing and interpreting this data requires a qualified seismologist.\n"
                + "    Do not jump to conclusions and make your own judgement about risks and probabilities\n"
                + "    based on what you see. Ask qualified professional for help.";

            warningLabel.Text = wrn;

            string msg =  "To display historical earthquakes in your area, use the following steps:\n\n"
                        + "    1. visit one of ANSS/NGDC search forms and select time and your area of interest\n\n"
                        + "    2. save result of your search on your hard drive\n\n"
                        + "    3. invoke File Import Wizard to read the file (and optionally make it persistent)";

            messageLabel.Text = msg;

            Project.setDlgIcon(this);
        }
        public LayerWaypoints(PictureManager pm, CameraManager cm)
            : base(pm, cm)
        {
            WaypointsCache.PictureManager = pm;
            WaypointsCache.CameraManager = cm;

            WaypointsCache.init();
            This = this;
        }
        public LayerCustomMaps(PictureManager pm, CameraManager cm)
            : base(pm, cm)
        {
            This = this;

            CustomMapsCache.DynamicObjectCreateCallback += new DynamicObjectCreateHandler(CustomMapCreateHandler);
            CustomMapsCache.DynamicObjectDeleteCallback += new DynamicObjectDeleteHandler(CustomMapDeleteHandler);
            CustomMapsCache.DynamicObjectMoveCallback += new DynamicObjectMoveHandler(CustomMapMoveHandler);
            CustomMapsCache.init();
        }
        public LayerEarthquakes(PictureManager pm, CameraManager cm)
            : base(pm, cm)
        {
            EarthquakesCache.PictureManager = pm;
            EarthquakesCache.CameraManager = cm;

            EarthquakesCache.DynamicObjectCreateCallback += new DynamicObjectCreateHandler(EarthquakeCreateHandler);
            EarthquakesCache.DynamicObjectDeleteCallback += new DynamicObjectDeleteHandler(EarthquakeDeleteHandler);
            EarthquakesCache.DynamicObjectMoveCallback += new DynamicObjectMoveHandler(EarthquakeMoveHandler);

            EarthquakesCache.init();
            This = this;
        }
        public DlgWeeklyCacheImport(PictureManager pictureManager)
        {
            m_pictureManager = pictureManager;
            m_stop = false;

            InitializeComponent();

            msgLabel.Text =
                  "Copy some text with the closest links from your Geocaching Weekly Notification email into the text box below."
                + "Then click Import button at the bottom and wait till the program imports all data. You can later access individual geocaches pages by clicking on their names on the map.\n\n"
                + "There is a limit of " + m_maxLinks + " geocaches and an artificial " + m_processingDelaySec + " seconds delay in processing, that helps to keep the load of Geocaching servers low.";

            importTextBox.Text = "\r\n\r\nPaste your Geocaching Weekly Notification email here.";

            Project.setDlgIcon(this);
        }
        public OptionsLandmarksForm(PictureManager pictureManager, bool getLmInfo)
        {
            m_pictureManager = pictureManager;
            m_getLmInfo = getLmInfo;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            try
            {
                if(checkboxes.Length > 0)
                {
                    this.SuspendLayout();
                    int i = 0;
                    int y = 18;
                    foreach(string lpt in TerraserverCache.landmarkPointTypes)
                    {
                        checkboxes[i] = new CheckBox();
                        checkboxes[i].Location = new System.Drawing.Point(16, y);
                        checkboxes[i].Name = "checkboxxx" + i;
                        checkboxes[i].Size = new System.Drawing.Size(224, 24);
                        checkboxes[i].TabIndex = 1;
                        checkboxes[i].Text = lpt;
                        checkboxes[i].Checked = TerraserverCache.landmarkPointShow[i];
                        y += 24;
                        i++;
                    }
                    this.Controls.AddRange(checkboxes);
                    this.ClientSize = new System.Drawing.Size(352, y + 30);
                    this.ResumeLayout();
                }
            }
            catch {}

            Project.setDlgIcon(this);
            closeButton.Focus();
        }
Exemple #8
0
        public TileSetTerra(PictureManager pm, CameraManager cm)
            : base(pm, cm)
        {
            TerraserverCache.PictureManager = pm;
            TerraserverCache.CameraManager = cm;

            if(This == null)
            {
                This = this;	// let camera manager and others use coordinate transformers
                TerraserverCache.init();
            }
            else
            {
                m_isSecond = true;	// we are topo when the first one is aerial/color
            }

            m_font = Project.getLabelFont(m_fontSize);
            m_evalWordLength = m_evalWord.Length;

            m_opacity = 0;
        }
 public LayerTerraserver(PictureManager pm, CameraManager cm)
     : base(pm, cm)
 {
 }
Exemple #10
0
        public DlgGpsManager(GpsInsertWaypoint insertWaypoint, CameraManager cameraManager,
			PictureManager pictureManager, ArrayList waypoints, ArrayList routes, string command)
        {
            //LibSys.StatusBar.Trace("DlgGpsManager()");
            if(isUp)
            {
                // duplicate for this instance stays true, so that all functions are disabled
                // and the form will be closed on load.
                this.duplicate = true;
                this.Load += new System.EventHandler(this.DlgGpsManager_Load);	// we will close this instance on load
            }
            else
            {
                This = this;
                duplicate = false;

                m_insertWaypoint = insertWaypoint;
                m_cameraManager = cameraManager;
                m_pictureManager = pictureManager;
                m_waypoints = waypoints == null ? WaypointsCache.WaypointsAll : waypoints;
                m_routes = routes == null ? WaypointsCache.RoutesAll : routes;
                m_command = command;

                //
                // Required for Windows Form Designer support
                //
                InitializeComponent();

                this.SuspendLayout();
                populateGpsPanel();

                //#if DEBUG
                //			Project.gpsLogProtocol = true;
                //			Project.gpsLogPackets = true;
                //			Project.gpsLogErrors = true;
                //#else
                Project.gpsLogProtocol = false;
                Project.gpsLogPackets = false;
                Project.gpsLogErrors = false;
                //#endif

                Project.setDlgIcon(this);
                //LibSys.StatusBar.Trace("DlgGpsManager() done");

                m_initialColor = gpsBasicsGroupBox.BackColor;
                gpsBasicsGroupBox.BackColor = Color.Yellow;
                gpsBasicsGroupBox.Text = "stopped";

                progressDetailDelta = progressGroupBox.Height;
                maxShrinkDelta = progressDetailDelta + Math.Abs(this.PointToScreen(progressDetailButton.Bounds.Location).Y - this.PointToScreen(shrinkMaxButton.Bounds.Location).Y) - slopeLabel.Height;
                this.ResumeLayout(true);
            }
        }
Exemple #11
0
 public LayersManager(PictureManager pm)
 {
     m_pictureManager = pm;
 }
Exemple #12
0
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            LibSys.StatusBar.WriteLine("On Load");

            this.hintsLabel.Text = "Mouse tips:\n\n"
                                    + "    double click - to recenter\n"
                                    + "    drag and click inside - to zoom\n"
                                    + "    right click on map for more options\n"
                                    + "    press F1 for Help\n"
                                    + "    check out Help->Sample Files menu\n";

            #if !DEBUG
            //gridCheckBox.Visible = false;
            vehCheckBox.Visible = false;
            #endif
            Project.favoritesFirstIndex = this.favMainMenuItem.MenuItems.Count;
            Project.recentFilesFirstIndex = this.fileMainMmenuItem.MenuItems.Count;
            Project.toolsFirstIndex = this.toolsMainMenuItem.MenuItems.Count;

            backLinkLabel.Enabled = false;
            forwardLinkLabel.Enabled = false;

            ProgressMonitor.Indicator = progressButton;
            progressButton.Text = "";

            this.Text = Project.PROGRAM_NAME_HUMAN;

            //this.hintsPanel.BackColor = System.Drawing.Color.FromArgb(255, Color.Navy);

            if(m_firstTime)
            {
                this.notAssociatedButton.Visible = true;
                this.notAssociatedLabel.Visible = true;
            }
            else
            {
                // first time the greeting does not start, so HideGreeting will not set hintsPanel to visible
                this.hintsPanel.Visible = Project.showHelpAtStart && !hintsPanelClicked;
            }

            // good place to have camera coordinates set here, if supplied in command line:
            //        /lat=34.123 /lon=-117.234 /elev=5000 /map=aerial (topo,color)
            processArgs();

            // we need it as early as possible, before first web load - TileCache.init(Project.CGIBINPTR_URL) below - occured.
            Project.ApplyGlobalHTTPProxy(false);

            if(Project.mainFormMaximized)
            {
                this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            }
            else if(Project.fitsScreen(Project.mainFormX, Project.mainFormY, Project.mainFormWidth, Project.mainFormHeight)
                && Project.mainFormWidth > 300 && Project.mainFormHeight > 200)
            {
                this.Location = new Point(Project.mainFormX, Project.mainFormY);
                this.ClientSize = new System.Drawing.Size(Project.mainFormWidth, Project.mainFormHeight);		// causes Resize()
                //this.Bounds = new System.Drawing.Rectangle(Project.mainFormX, Project.mainFormY, Project.mainFormWidth, Project.mainFormHeight);
            }

            reliefCheckBox.Checked = Project.drawRelief;
            overlayCheckBox.Checked = Project.terraUseOverlay;

            gridCheckBox.Enabled = Project.drawRelief || Project.drawTerraserver;
            citiesCheckBox.Enabled = Project.drawRelief;
            gridCheckBox.Checked = Project.drawGrid;
            if(Project.drawTerraserver)
            {
                if(Project.drawTerraserverMode.Equals("aerial"))
                {
                    aerialCheckBox.Checked = true;
                }
                else if(Project.drawTerraserverMode.Equals("color aerial"))
                {
                    colorAerialCheckBox.Checked = true;
                }
                else if(Project.drawTerraserverMode.Equals("topo"))
                {
                    topoCheckBox.Checked = true;
                    overlayCheckBox.Enabled = false;
                }
                lmCheckBox.Enabled = true;
            }
            else
            {
                Project.terraserverAvailable = false;
                aerialCheckBox.Checked = false;
                colorAerialCheckBox.Checked = false;
                topoCheckBox.Checked = false;
                lmCheckBox.Enabled = false;
            }
            //opacityPanel.Visible = Project.drawTerraserver;
            citiesCheckBox.Checked = Project.drawCities;
            lmCheckBox.Checked = Project.drawLandmarks;
            eqCheckBox.Checked = Project.drawEarthquakes;
            eqStylePanelVisible(Project.drawEarthquakes);
            wptCheckBox.Checked = Project.drawWaypoints;
            vehCheckBox.Checked = Project.drawVehicles;

            TileCache.init(Project.CGIBINPTR_URL);		// try to reach the QuakeMap server

            if(TileCache.ZipcodeServer == null)
            {
                setInternetAvailable(false);

                this.hintsLabel.Text = "\n[offline]\n\nuse Internet-->Offline\n   or Map-->Options-->Proxy menu\nif you think you should be connected\n ";

                string message = "\nWarning: couldn't reach server: " + Project.PROGRAM_MAIN_SERVER	+ "\n\nWorking offline.\n ";
                if(m_greetingForm == null)
                {
                    Project.ErrorBox(null, message);
                }
                else
                {
                    Point popupOffset = new Point(34, 230);
                    Point screenPoint = m_greetingForm.PointToScreen(popupOffset);
                    Project.ShowPopup (m_greetingForm, message, screenPoint);
                }
            }
            else
            {
                setInternetAvailable(true);
            }

            m_cameraTrack = new CameraTrack();
            m_cameraManager = new CameraManager(this, m_cameraTrack);

            m_pictureManager = new PictureManager(mainPictureBox, this, m_cameraTrack);

            m_cameraManager.init(m_pictureManager);
            m_pictureManager.init(m_cameraManager);

            if(Project.hasOldTerrafolderStyleFiles())
            {
                HideGreeting();
                Project.AttemptTerrafolderMigration();
            }

            findLinkLabel.Focus();

            // on the very first run, bring up "Find by zipcode" window and try positioning
            // the map there:
            if(m_firstTime && TileCache.ZipcodeServer != null)
            {
                Project.findKeyword = Project.zipcode;
                FindForm findForm = new FindForm(m_cameraManager, true);
                findForm.ShowDialog();
            }

            LibSys.StatusBar.WriteLine("IP: running init thread");
            //add dt worker method to the thread pool / queue a task
            //Project.threadPool.PostRequest (new WorkRequestDelegate (runInit), "MainForm init");
            //ThreadPool2.QueueUserWorkItem(new WaitCallback (runInit), "MainForm init");
            runInit("MainForm init");

            //ThreadPool2.QueueUserWorkItem(new WaitCallback (timeEater), "MainForm timeEater");

            periodicMaintenanceTimer = new System.Windows.Forms.Timer();
            periodicMaintenanceTimer.Interval = 1200;
            periodicMaintenanceTimer.Tick += new EventHandler(periodicMaintenance);
            periodicMaintenanceTimer.Start();
            LibSys.StatusBar.WriteLine("OK: Maintenance ON");

            if(!Project.showHelpAtStart)
            {
                if(!hasShownUpdateForm && Project.upgradeMessage.Length > 0)
                {
                    hasShownUpdateForm = true;
                    new DlgUpgradeMessage(Project.upgradeMessage).ShowDialog();
                }
            }

            inResize = false;

            LibSys.StatusBar.WriteLine("On Load done");
        }
Exemple #13
0
 public TileSet(PictureManager pm, CameraManager cm)
     : base(pm, cm)
 {
 }
Exemple #14
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;
        }
Exemple #15
0
 public LayerBasicMap(PictureManager pm, CameraManager cm)
     : base(pm, cm)
 {
 }
Exemple #16
0
 public Layer(PictureManager pm, CameraManager cm)
 {
     m_pictureManager = pm;
     m_cameraManager = cm;
 }
Exemple #17
0
        public void init(PictureManager pm)
        {
            m_pictureManager = pm;
            m_cameraManager = this;		// part of the Layer functionality

            if(Project.cameraElev > 0.0d)
            {
                m_location = new GeoCoord(Project.cameraLng, Project.cameraLat, Project.cameraElev);
            #if DEBUG
                LibSys.StatusBar.WriteLine("CameraManager:init() elev=" + Project.cameraElev + "   " + m_location);
            #endif
                Project.cameraPositionsBackStack.Push(new CamPos(m_location.Lng, m_location.Lat, m_location.Elev, "", Project.drawTerraserverMode));
            }
            else
            {
                //m_location = new GeoCoord(-121.0d, 39.0d, 500000.0d);
                //m_location = new GeoCoord(20.0d, 40.0d, 1020000.0d);			// Europe - Italy
                //m_location = new GeoCoord(20.0d, 35.0d, 1020000.0d);			// Mediterranian sea
                //m_location = new GeoCoord(140.0d, 40.0d, 3000000.0d);			// Japan y-level
                //m_location = new GeoCoord(179.88d, -17.5d, 1900000.0d);		// 180
                //m_location = new GeoCoord(-117.06d, 32.74d, 310000.0d);		// San Diego x-level
                //m_location = new GeoCoord(-116.45d, 32.05d, 99000.0d);		// Mexico - edge of CA coverage a-level
                //m_location = new GeoCoord(-113.07d, 33.28d, 299000.0d);		// Phoenix - edge of CA coverage degree-level
                //m_location = new GeoCoord(-113.97d, 33.90d, 69000.0d);		// Phoenix - edge of CA coverage a-level
                //m_location = new GeoCoord(-110.05d, 37.05d, 299000.0d);		//
                //m_location = new GeoCoord(-102.05d, 40.05d, 299000.0d);		//
                //m_location = new GeoCoord(48.0d, 42.0d, 420000.0d);
                //m_location = new GeoCoord(-117.87d, 33.74d, 30000.0d);		// Santa Ana
                //m_location = new GeoCoord(-116.75d, 34.0d, 450000.0d);
                m_location = new GeoCoord(-66.1127516186667d, 18.4640733896667d, 1000.0d);	// Puerto Rico port

                Project.cameraLat = m_location.Lat;
                Project.cameraLng = m_location.Lng;
                Project.cameraElev = m_location.Elev;
            }
        }
        public DlgWaypointsManager(PictureManager pictureManager, CameraManager cameraManager, int mode, long trackIdToSelect)
        {
            LayerWaypoints.This.makeRouteMode = false;	// just in case route mode is still on

            if(This != null)
            {
                This.Dispose();
                //GC.Collect();
                //GC.WaitForPendingFinalizers();
            }
            This = this;

            m_pictureManager = pictureManager;
            m_cameraManager = cameraManager;
            m_trackIdToSelect = trackIdToSelect;
            m_routeIdToSelect = trackIdToSelect;

            InitializeComponent();

            this.SuspendLayout();
            if(Project.fitsScreen(wptManagerX, wptManagerY, Project.wptManagerWidth, Project.wptManagerHeight))
            {
                inResize = true;
                this.Location = new Point(wptManagerX, wptManagerY);
                this.ClientSize = new System.Drawing.Size(Project.wptManagerWidth, Project.wptManagerHeight);
                inResize = false;
            }

            this.fromTimeDateTimePicker.CustomFormat = "h:mm tt";
            this.toTimeDateTimePicker.CustomFormat = "h:mm tt";
            this.aroundTimeTimeDateTimePicker.CustomFormat = "h:mm tt";

            SetTimeFilterDefaults();

            showWaypointsCheckBox.Checked = Project.drawWaypoints;
            showTrackpointsCheckBox.Checked = Project.drawTrackpoints;
            showNumbersCheckBox.Checked = Project.showTrackpointNumbers;
            showNamesCheckBox.Checked = Project.showWaypointNames;
            sanityCheckBox.Checked = Project.sanityFilter;
            colorElevTracksCheckBox.Checked  = Project.trackElevColor;
            colorSpeedTracksCheckBox.Checked = Project.trackSpeedColor;

            // order of tabs: tracks-trackpoints-routes-waypoints-filter-options
            switch(mode)
            {
                default:
                case 0:
                    // stay on the last chosen
                    rebuildTracksTab();
                    rebuildRoutesTab();
                    rebuildWaypointsTab();
                    // never jump straight to trackpoints tab:
                    tabControl1.SelectedIndex = (selectedTabIndex == 1 || selectedTabIndex == 2) ? 0 : selectedTabIndex;
                    if(tabControl1.SelectedTab == tracksTabPage || tabControl1.SelectedTab == routesTabPage)
                    {
                        prevSelectedTab = tabControl1.SelectedTab;
                    }
                    break;
                case 1:
                    // tracks tab, show the grid:
                    rebuildTracksTab();
                    rebuildRoutesTab();
                    prevSelectedTab = this.tracksTabPage;
                    break;
                case 2:
                    // go to Options tab
                    rebuildTracksTab();
                    rebuildRoutesTab();
                    prevSelectedTab = this.tracksTabPage;
                    tabControl1.SelectedTab = this.optionsTabPage;
                    break;
                case 3:
                    // routes tab, show the grid:
                    rebuildTracksTab();
                    rebuildRoutesTab();
                    tabControl1.SelectedTab = this.routesTabPage;
                    prevSelectedTab = this.routesTabPage;
                    break;
            }

            switch(m_timeFilterMode)
            {
                case 0:		// from/to
                    setFilterModeFromTo();
                    fromToRadioButton.Checked = true;
                    break;
                case 1:		// around time
                    setFilterModeAroundTime();
                    aroundTimeRadioButton.Checked = true;
                    break;
                default:	// no filter
                    setFilterModeNone();
                    noFilterRadioButton.Checked = true;
                    break;
            }

            breakTimeComboBox.SelectedIndex = breakTimeIndex(Project.breakTimeMinutes);
            aroundTimeComboBox.SelectedIndex = aroundTimeIndex(aroundTimeMinutes);
            playSleepTimeMs = 500 + (playSpeedTrackBar.Maximum - playSpeedTrackBar.Value) * 200;
            Project.setDlgIcon(this);

            this.waypointsDataGrid.MouseUp += new System.Windows.Forms.MouseEventHandler(this.waypointsDataGrid_MouseUp);
            this.trackpointsDataGrid.MouseUp += new System.Windows.Forms.MouseEventHandler(this.trackpointsDataGrid_MouseUp);
            setColorPaletteButtons();
            colorPaletteMessageLabel.Text = "Note: track/route colors are picked\nrandomly from the choices above, unless explicitly set.";
            try
            {
                trackThicknessNumericUpDown.Value = (decimal)TrackPalette.penTrackThickness;
                routeThicknessNumericUpDown.Value = (decimal)TrackPalette.penRouteThickness;
                this.pointsPerRouteNumericUpDown.Value = (decimal)Project.gpsMaxPointsPerRoute;
            }
            catch {}

            graphByTimeControl = new LibGui.GraphByTimeControl();
            this.graphPanel.Controls.Add(graphByTimeControl);
            this.graphByTimeControl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.graphByTimeControl.Name = "graphByTimeControl";

            inSet = true;

            timeUtcRadioButton.Checked  = Project.useUtcTime;
            timeLocalRadioButton.Checked  = !Project.useUtcTime;
            setUtcLabels();

            inSet = false;

            this.ResumeLayout(true);
        }
        public FileImportForm(bool startOnList, int mode, int type)
        {
            m_pictureManager = PictureManager.This;
            m_mode = mode;
            m_type = type;

            m_statusTab	= new StatusTab(this);
            m_formatTab	= new FormatTab(this);
            m_fileTab	= new FileTab(this);
            m_importTab = new ImportTab(this);
            m_finishTab = new FinishTab(this);

            // Required for Windows Form Designer support
            InitializeComponent();

            //tabControl1.FlatStyle = FlatStyle.Flat;

            setLockedFeatures();

            detailComboBox.Items.Clear();
            detailComboBox.Text = "";

            previousButton.Enabled = false;
            nextButton.Enabled = true;
            doPersist = false;

            m_statusTab.tabActivated();		// make sure the list of current imports appears there, in case the Back button is clicked
            m_tab = startOnList ? 0 : 1;
            this.tabControl1.SelectedIndex = m_tab;
            m_formatTab.tabActivated();

            /*
             * how do we make tabs not clickable?
            tabControl1.
            fileTabPage.CanSelect = false;
            importTabPage.CanSelect = false;
            resultsTabPage.CanSelect = false;
            */

            Project.setDlgIcon(this);
        }
        public DlgEarthquakesManager(PictureManager pictureManager, CameraManager cameraManager, int mode, int scope)
        {
            m_pictureManager = pictureManager;
            m_cameraManager = cameraManager;
            m_mode = mode;
            if(scope != -1)		// or, stay with previously selected scope
            {
                m_scope = scope;
            }

            //EarthquakesCache.RefreshEarthquakesDisplayed();	// make sure we have correct data to fill the datagrid
            //												// for the visible map.

            InitializeComponent();

            Project.setDlgIcon(this);
        }