コード例 #1
0
        private void exportButton_Click(object sender, System.EventArgs e)
        {
            ArrayList waypoints = new ArrayList();		// array of Waypoint
            for (int i=0; i < PhotoWaypoints.WaypointsWithThumbs.Count; i++)
            {
                Waypoint wpt = (Waypoint)PhotoWaypoints.WaypointsWithThumbs.GetByIndex(i);
                Waypoint wptClone = new Waypoint(wpt);
                wptClone.LiveObjectType = LiveObjectTypes.LiveObjectTypeWaypoint;
                if(wptClone.WptName == null || wptClone.WptName.Length == 0)
                {
                    wptClone.WptName = wpt.Desc;
                }
                wptClone.Url = wpt.ThumbSource;
                waypoints.Add(wptClone);
            }

            if(waypoints.Count > 0)
            {
                FileExportForm fileExportForm = new FileExportForm(null, false, waypoints, true);
                fileExportForm.ShowDialog();
            }
            else
            {
                Project.ShowPopup(exportButton, "\nno photo points to export", Point.Empty);
            }
        }
コード例 #2
0
 private void wptSaveButton_Click(object sender, System.EventArgs e)
 {
     ArrayList selected = GetSelectedRowsView(waypointsDataGrid);
     if(selected.Count > 0)
     {
         ClearMessages();
     #if DEBUG
         string str = "";
     #endif
         int columnWptId = 0;
         DataTable table = m_waypointsDS.Tables[0];
         ArrayList waypoints = new ArrayList();		// array of Waypoint
         for(int i=0; i < selected.Count ;i++)
         {
             int row = (int)selected[i];
             int waypointId = (int)waypointsDataGrid[row, columnWptId];
     #if DEBUG
             str += "" + row + "=" + waypointId + " ";
     #endif
             Waypoint wpt = WaypointsCache.getWaypointById(waypointId);
             if(wpt != null)
             {
                 //m_wptIdToSelect = wpt.Id;
                 waypoints.Add(wpt);
             }
         }
     #if DEBUG
         messageWptLabel.Text = "selected: " + str;
     #else
         messageWptLabel.Text = "";
     #endif
         FileExportForm fileExportForm = new FileExportForm(null, false, waypoints, true);
         fileExportForm.ShowDialog();
     }
     else if (Project.goingDown)		// make it a little bit more easy on closing
     {
         FileExportForm fileExportForm = new FileExportForm(null, true, null, true);
         fileExportForm.ShowDialog();
     }
     else
     {
         //messageWptLabel.Text = "Error: select a waypoint first";
         Project.ShowPopup(wptSaveButton, "\nselect a waypoint(s) first" + Project.SELECT_HELP, Point.Empty);
     }
 }
コード例 #3
0
 private void saveTracksRoutes(DataGrid dataGrid, DataSet dataSet)
 {
     ArrayList selected = GetSelectedRows(dataGrid);
     if(selected.Count > 0)
     {
         ClearMessages();
     #if DEBUG
         string str = "";
     #endif
         int column = 0;
         DataTable table = dataSet.Tables[0];
         ArrayList tracks = new ArrayList();		// array of Track
         for(int i=0; i < selected.Count ;i++)
         {
             int row = (int)selected[i];
             long trackId = (long)((int)dataGrid[row, column]);
     #if DEBUG
             str += "" + row + "=" + trackId + " ";
     #endif
             Track trk = WaypointsCache.getTrackById(trackId);
             if(trk != null)
             {
                 m_trackIdToSelect = trk.Id;
                 tracks.Add(trk);
             }
         }
     #if DEBUG
         messageTrkLabel.Text = "selected: " + str;
     #else
         messageTrkLabel.Text = "";
     #endif
         FileExportForm fileExportForm = new FileExportForm(tracks, true, null, false);
         fileExportForm.ShowDialog();
     }
     else if (Project.goingDown)		// make it a little bit more easy on closing
     {
         FileExportForm fileExportForm = new FileExportForm(null, true, null, true);
         fileExportForm.ShowDialog();
     }
     else
     {
         //messageTrkLabel.Text = "Error: select a track first";
         Project.ShowPopup(saveButton, "\nselect a track/route first" + Project.SELECT_HELP, Point.Empty);
     }
 }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: slgrobotics/QuakeMap
 private void exportMenuItem_Click(object sender, System.EventArgs e)
 {
     FileExportForm fileExportForm = new FileExportForm(null, true, null, true);	// null means all tracks/wpts from cache
     fileExportForm.ShowDialog();
 }
コード例 #5
0
ファイル: MainForm.cs プロジェクト: slgrobotics/QuakeMap
        private void cm_trackSaveAsMenuItem_Click(object sender, System.EventArgs e)
        {
            Track trk = WaypointsCache.getTrackById(cm_trackId);
            if(trk != null)
            {
                m_cameraManager.zoomToCorners(trk.TopLeft, trk.BottomRight);

                ArrayList tracks = new ArrayList();		// array of Track
                tracks.Add(trk);

                FileExportForm fileExportForm = new FileExportForm(tracks, true, null, false);
                fileExportForm.ShowDialog();
            }
        }
コード例 #6
0
 private void exportButton_Click(object sender, System.EventArgs e)
 {
     ArrayList selected = GetSelectedRows(eqDataGrid);
     if(selected.Count > 0)
     {
         ClearMessages();
         ArrayList waypoints = new ArrayList();		// array of Waypoint
         foreach(int row in selected)
         {
             int column = 0;
             DataTable table = m_eqDS.Tables[0];
             long eqId = (long)((int)eqDataGrid[row, column]);
             int rowNum = row; //(int)eqDataGrid[row, column];
             Earthquake eq = EarthquakesCache.getEarthquakeById(eqId);
             if(eq != null)
             {
                 Waypoint wpt = new Waypoint(eq);
                 if(wpt != null)
                 {
                     //m_wptIdToSelect = wpt.Id;
                     waypoints.Add(wpt);
                 }
             }
         }
         FileExportForm fileExportForm = new FileExportForm(null, false, waypoints, true);
         fileExportForm.ShowDialog();
     }
     else
     {
         Project.ShowPopup(exportButton, "\nselect earthquakes to export first" + Project.SELECT_HELP, Point.Empty);
     }
 }