private void info_Click(object sender, EventArgs e)
 {
     //if (ImageDataSetsCombo.SelectedItem is IImageSet)
     if (Earth3d.MainWindow.CurrentImageSet is IImageSet)
     {
         //ObjectProperties.ShowNofinder((IImageSet)ImageDataSetsCombo.SelectedItem, Earth3d.MainWindow.PointToClient(Cursor.Position));
         ObjectProperties.ShowNofinder((IImageSet)Earth3d.MainWindow.CurrentImageSet, Earth3d.MainWindow.PointToClient(Cursor.Position));
     }
 }
        public static void ShowAt(IPlace place, Point pnt)
        {
            HideProperties();

            props        = new ObjectProperties();
            props.Target = place;

            props.Owner = Earth3d.MainWindow;
            props.Show();
            pnt.Offset(-300, -88);
            props.Location = pnt;
        }
        public static void ShowAt(Point pnt)
        {
            HideProperties();

            props        = new ObjectProperties();
            props.Target = null;

            props.Owner = Earth3d.MainWindow;
            props.Show();
            pnt.Offset(-300, -88);
            props.Location = pnt;
            props.FindCurrentObject();
        }
        public static void ShowNofinder(IPlace place, Point pnt)
        {
            HideProperties();


            props            = new ObjectProperties();
            props.Target     = place;
            props.showFinder = false;

            props.Owner            = Earth3d.MainWindow;
            props.TileBarText.Text = Language.GetLocalizedText(20, "Properties");
            props.closeBox.Left    = 270;
            props.Width            = 292;
            props.Height           = 315;
            props.BackgroundImage  = Properties.Resources.PropertiesBackgroundNoFinder;
            props.Show();
            props.Location = pnt;
            props.EnsureVisble();
            props.Focus();
        }
        private void ImageDataSetsCombo_SelectionChanged(object sender, EventArgs e)
        {
            try
            {
                ObjectProperties.HideProperties();

                if (ImageDataSetsCombo.SelectedItem is IImageSet)
                {
                    if (!deferUpdate)
                    {
                        Earth3d.MainWindow.SetViewMode((IImageSet)ImageDataSetsCombo.SelectedItem);
                    }
                }
                else
                {
                    if (ImageDataSetsCombo.SelectedItem.GetType() == typeof(String) && (String)ImageDataSetsCombo.SelectedItem == Language.GetLocalizedText(130, "Browse..."))
                    {
                        OpenFileDialog openFile = new OpenFileDialog();
                        if (openFile.ShowDialog() == DialogResult.OK)
                        {
                            try
                            {
                                //todo move to use settings for directory instead of hard code
                                File.Delete(Properties.Settings.Default.CahceDirectory + @"\imagery\999\0\0\0_0.tif");
                            }
                            catch
                            {
                            }
                            Earth3d.MainWindow.SetViewMode(new ImageSetHelper(openFile.FileName, openFile.FileName, (ImageSetType)Enum.Parse(typeof(ImageSetType), (string)viewTarget.SelectedItem), BandPass.Visible, ProjectionType.Spherical, 999, 0, 0, 256, 256, ".tif", false, "", 0, 0, 0, false, "", false, false, 1, 0, 0, "", "", "", "", 0, ""));
                        }
                    }
                }
            }
            catch
            {
            }
        }
 public static void HideProperties()
 {
     if (props != null)
     {
         props.Close();
         props = null;
     }
 }
 private void ObjectProperties_FormClosed(object sender, FormClosedEventArgs e)
 {
     Earth3d.MainWindow.SetLabelText(null, false);
     props = null;
 }
        public static void ShowNofinder(IPlace place, Point pnt)
        {
            HideProperties();

            props = new ObjectProperties();
            props.Target = place;
            props.showFinder = false;

            props.Owner = Earth3d.MainWindow;
            props.TileBarText.Text = Language.GetLocalizedText(20, "Properties");
            props.closeBox.Left = 270;
            props.Width = 292;
            props.Height = 315;
            props.BackgroundImage = Resources.PropertiesBackgroundNoFinder;
            props.Show();
            props.Location = pnt;
            props.EnsureVisble();
            props.Focus();
        }
        public static void ShowAt(Point pnt)
        {
            HideProperties();

            props = new ObjectProperties();
            props.Target = null;

            props.Owner = Earth3d.MainWindow;
            props.Show();
            pnt.Offset(-300,-88);
            props.Location = pnt;
            props.FindCurrentObject();
        }
        public static void ShowAt(IPlace place, Point pnt)
        {
            HideProperties();

            props = new ObjectProperties();
            props.Target = place;

            props.Owner = Earth3d.MainWindow;
            props.Show();
            pnt.Offset(-300,-88);
            props.Location = pnt;
        }
 private void ObjectProperties_FormClosed(object sender, FormClosedEventArgs e)
 {
     Earth3d.MainWindow.SetLabelText(null, false);
     props = null;
 }