Ejemplo n.º 1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            ImageViewManager.Navigation.StopNavigation();
            String strFileName = "";

            int nFind = io.GetPath(this.View).LastIndexOf("\\");

            if (nFind >= 0)
            {
                strFileName = io.GetPath(this.View).Substring(nFind + 1);
            }
            else
            {
                strFileName = io.GetPath(this.View);
            }

            saveFileDialogImage.FileName = strFileName;
            if (saveFileDialogImage.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    System.IO.File.Copy(m_navigationObject.CurrentPath + "\\" + io.GetPath(this.View), saveFileDialogImage.FileName);
                }
                catch (Exception exception)
                {
                    OutputWindow.WriteOutput("Error: Saving current image. " + exception.Message);
                }
            }
        }
Ejemplo n.º 2
0
        public override void NavigationTick(NavigationObject navigationObject)
        {
            io = navigationObject.CurrentImage;
            m_navigationObject = navigationObject;
            String strPicturePath = io.GetPath(this.View);
            String strPath        = "";

            if (!String.IsNullOrEmpty(strPicturePath))
            {
                if (navigationObject.CurrentPath.Substring(navigationObject.CurrentPath.Length - 1, 1) == "\\" && strPicturePath.Substring(0, 1) == "\\")
                {
                    strPath = navigationObject.CurrentPath.Substring(0, navigationObject.CurrentPath.Length - 1) + io.GetPath(this.View);
                }
                else
                {
                    strPath = navigationObject.CurrentPath + "\\" + io.GetPath(this.View);
                }
                try
                {
//                    pictureBoxImage.SizeMode = PictureBoxSizeMode.AutoSize;
                    //if (!strPath.Contains(".jpg")) strPath += ".jpg";
                    pictureBoxImage.Load(strPicturePath);
                }
                catch
                {
                }
            }
            String strLatitude = "Lat:" + io.Latitude.ToString();
            String strLatLong  = strLatitude.PadRight(15) + " Long:" + io.Longitude.ToString();

            //this.TabText = this.View + " Viewport " + strPath;
            toolTip1.SetToolTip(pictureBoxImage, strPath);
            toolStripLabelLatitudeLongitude.Text = strLatLong.PadRight(30);
        }