コード例 #1
0
        private void SetUiStrings()
        {
            this.Text = Language.GetLocalizedText(1, "Select Your Language");
            this.selectLangLabel.Text = Language.GetLocalizedText(1, "Select Your Language");

            this.Cancel.Text = Language.GetLocalizedText(157, "Cancel");
            this.OK.Text     = Language.GetLocalizedText(156, "OK");
        }
コード例 #2
0
        private void keyType_SelectionChanged(object sender, EventArgs e)
        {
            if (initializing)
            {
                return;
            }
            Key.KeyType type = (Key.KeyType)Enum.Parse(typeof(Key.KeyType), keyType.SelectedItem.ToString());

            curveEditor1.CurveType = type;

            if (keys != null)
            {
                Undo.Push(new UndoTourStopChange(Language.GetLocalizedText(1352, "Key Properties Edit"), Earth3d.MainWindow.TourEdit.Tour));
                foreach (VisibleKey vk in keys.Values)
                {
                    Key key = vk.Target.GetKey(vk.ParameterIndex, vk.Time);
                    if (key != null)
                    {
                        key.InFunction = type;
                        key.P1         = curveEditor1.P1;
                        key.P2         = curveEditor1.P2;
                        key.P3         = curveEditor1.P3;
                        key.P4         = curveEditor1.P4;
                    }
                }
                TimeLine.RefreshUi(false);
                RefreshTween();
            }
        }
コード例 #3
0
ファイル: SkyBall.cs プロジェクト: xx70235/wwt-windows-client
 private void SkyBall_Load(object sender, EventArgs e)
 {
     north = Language.GetLocalizedText(368, "N");
     west  = Language.GetLocalizedText(369, "W");
     east  = Language.GetLocalizedText(370, "E");
     south = Language.GetLocalizedText(371, "S");
 }
コード例 #4
0
        private void Import_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = Language.GetLocalizedText(821, "Trajectory files") + "  (*.xyz)|*.xyz";
            bool tryAgain = true;

            while (tryAgain)
            {
                try
                {
                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        string fileName = ofd.FileName;

                        frame.ImportTrajectory(fileName);
                        tryAgain = false;
                    }
                    else
                    {
                        tryAgain = false;
                    }
                }
                catch
                {
                    UiTools.ShowMessageBox(Language.GetLocalizedText(947, "The File does not appear to be a Vaild Trajectory File."), Language.GetLocalizedText(3, "Microsoft WorldWide Telescope"));
                }
            }
        }
コード例 #5
0
        private void Paginator_Paint(object sender, PaintEventArgs e)
        {
            Graphics   g     = e.Graphics;
            String     text  = String.Format(Language.GetLocalizedText(290, "{0} of {1}"), currentPage + 1, totalPages);
            RectangleF rectf = new RectangleF(0, 0, Width, Height);

            if (currentPage > 0)
            {
                g.DrawImage(leftArrow, 0, Height / 2 - 8);
            }
            else
            {
                g.DrawImage(leftArrowDisabled, 0, Height / 2 - 8);
            }

            if ((currentPage + 1) != totalPages)
            {
                g.DrawImage(rightArrow, Width - 14, Height / 2 - 8);
            }
            else
            {
                g.DrawImage(rightArrowDisabled, Width - 14, Height / 2 - 8);
            }

            g.DrawString(text, UiTools.StandardRegular, UiTools.StadardTextBrush, rectf, UiTools.StringFormatCenterCenter);
        }
コード例 #6
0
        internal static void ImportArtFile()
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Filter = Language.GetLocalizedText(107, "WorldWide Telescope Collection") + "|*.wtml";
            if (openFile.ShowDialog() == DialogResult.OK)
            {
                string filename = openFile.FileName;

                try
                {
                    Folder newFolder = Folder.LoadFromFile(filename, false);
                    newFolder.Type  = FolderType.Sky;
                    newFolder.Group = FolderGroup.Constellation;
                    string path = ArtworkPath;
                    if (!Directory.Exists(path))
                    {
                        Directory.CreateDirectory(path);
                    }
                    filename = Guid.NewGuid().ToString() + ".wtml";
                    newFolder.SaveToFile(path + filename);
                    Properties.Settings.Default.ConstellationArtFile = path + filename;
                }
                catch
                {
                    MessageBox.Show(Language.GetLocalizedText(109, "This file does not seem to be a valid collection"), Language.GetLocalizedText(3, "Microsoft WorldWide Telescope"));
                }
            }
        }
コード例 #7
0
        private void ImportAuthorImage_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Filter = Language.GetLocalizedText(486, "Image Files") + "(*.BMP;*.JPG;*.PNG;*.TIF)|*.BMP;*.JPG;*.PNG;*.TIF;*.TIFF|All files (*.*)|*.*";
            if (openFile.ShowDialog() == DialogResult.OK)
            {
                Bitmap bmpTemp = null;

                try
                {
                    bmpTemp = Thumbnailer.MakeThumbnail(UiTools.LoadBitmap(openFile.FileName), 72, 96);
                }
                catch
                {
                    bmpTemp = null;
                }

                if (bmpTemp != null)
                {
                    this.authorImagePicturebox.Image = bmpTemp;
                    ValidateDataComplete();
                }
            }
        }
コード例 #8
0
 private void SetUiStrings()
 {
     this.toolTips.SetToolTip(this.levelLabel, Language.GetLocalizedText(171, "Filed of view height in degrees : minutes : seconds of arc"));
     this.toolTips.SetToolTip(this.ConstellationLabel, Language.GetLocalizedText(172, "Name of the constellation that the view center is in."));
     this.toolTips.SetToolTip(this.queueProgressBar, Language.GetLocalizedText(173, "Download Progress"));
     this.toolTips.SetToolTip(this.studyOpacity, Language.GetLocalizedText(174, "Crossfades background and foreground imagery"));
     this.toolTips.SetToolTip(this.viewTarget, Language.GetLocalizedText(175, "Select the type of view, Sky, Earth, etc."));
     this.toolTips.SetToolTip(this.ImageDataSetsCombo, Language.GetLocalizedText(176, "Select the imagery to display"));
     this.toolTips.SetToolTip(this.FilterCombo, Language.GetLocalizedText(177, "Filters context results"));
     this.toolTips.SetToolTip(this.contextResults, Language.GetLocalizedText(178, "Context Search - Shows interesting places in the current view."));
     this.toolTips.SetToolTip(this.overview, Language.GetLocalizedText(179, "Constellation Overview"));
     this.toolTips.SetToolTip(this.SkyBall, Language.GetLocalizedText(180, "Shows field of view relative to the celestial sphere"));
     this.toolTips.SetToolTip(this.layerToggle, Language.GetLocalizedText(953, "Show/Hide Layer Manager"));
     this.contextResults.AddText      = Language.GetLocalizedText(161, "Add New Item");
     this.contextResults.EmptyAddText = Language.GetLocalizedText(162, "No Results");
     this.faderText.Text       = Language.GetLocalizedText(181, "Image Crossfade");
     this.trackingText.Text    = Language.GetLocalizedText(182, "Tracking");
     this.trackingLabel.Text   = Language.GetLocalizedText(182, "Tracking");
     this.label1.Text          = Language.GetLocalizedText(155, "Imagery");
     this.label2.Text          = Language.GetLocalizedText(183, "Look At");
     this.label3.Text          = Language.GetLocalizedText(184, "Context Search Filter");
     this.scaleText.Text       = Language.GetLocalizedText(578, "Planet Size");
     this.bigSizeLabel.Text    = Language.GetLocalizedText(579, "Large");
     this.actualSizeLabel.Text = Language.GetLocalizedText(580, "Actual");
 }
コード例 #9
0
        private void VORegistryBrowser_Load(object sender, EventArgs e)
        {
            // Changed to enable localization

            verbosity.Items.Add(Language.GetLocalizedText(624, "Low"));
            verbosity.Items.Add(Language.GetLocalizedText(625, "Medium"));
            verbosity.Items.Add(Language.GetLocalizedText(626, "High"));

            verbosity.SelectedIndex = Properties.Settings.Default.VOTableVerbosityDefault - 1;
            double raVal = Earth3d.MainWindow.RA * 15;

            ra.Text           = raVal.ToString();
            dec.Text          = Earth3d.MainWindow.Dec.ToString();
            searchRadius.Text = Earth3d.MainWindow.FovAngle.ToString();

            if (registry != null)
            {
                LoadRegistryResults();
                this.keyword.Text = lastKeyword;
                this.baseUrl.Text = lastConeSearch;
            }

            siapCheckbox.Checked       = !coneSearch;
            coneSearchCheckbox.Checked = coneSearch;
        }
コード例 #10
0
 private void Delete_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(Language.GetLocalizedText(520, "Deleting this figure library will delete the constellation figures you created. Do you want to continue?"), Language.GetLocalizedText(3, "Microsoft WorldWide Telescope"), MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
     {
         if (Earth3d.MainWindow.figureEditor != null)
         {
             if (Earth3d.MainWindow.figureEditor.SaveAndClose() != DialogResult.OK)
             {
                 return;
             }
             Earth3d.MainWindow.figureEditor = null;
         }
         string filename = Constellations.GetFigurePath(figureLibrary.SelectedItem.ToString());
         try
         {
             File.Delete(filename);
             figureLibrary.Items.Remove(figureLibrary.SelectedItem);
             figureLibrary.SelectedIndex = 0;
         }
         catch
         {
             MessageBox.Show("The constellation figures file cannot be deleted because the file cannot be found.", "Constellation Figure Editor");
         }
     }
 }
コード例 #11
0
 private void SetUiStrings()
 {
     this.resultsList.AddText      = Language.GetLocalizedText(161, "Add New Item");
     this.resultsList.EmptyAddText = Language.GetLocalizedText(162, "No Results");
     this.selectText.Text          = Language.GetLocalizedText(163, "Select a Community...");
     this.Text = Language.GetLocalizedText(138, "Community");
 }
コード例 #12
0
 private void SetUiStrings()
 {
     this.label9.Text              = Language.GetLocalizedText(196, "");
     this.label7.Text              = Language.GetLocalizedText(197, "Focal Ratio");
     this.label8.Text              = Language.GetLocalizedText(198, "Mount Type");
     this.label6.Text              = Language.GetLocalizedText(199, "Aperture");
     this.label5.Text              = Language.GetLocalizedText(200, "Focal Length");
     this.cameraRadioButton.Text   = Language.GetLocalizedText(201, "Camera");
     this.eyePieceRadioButton.Text = Language.GetLocalizedText(202, "Eyepiece");
     this.label2.Text              = Language.GetLocalizedText(139, "Telescope");
     this.label1.Text              = Language.GetLocalizedText(203, "Organization");
     this.label14.Text             = Language.GetLocalizedText(204, "Camera Rotation");
     this.label13.Text             = Language.GetLocalizedText(205, "Vert Pixels");
     this.label11.Text             = Language.GetLocalizedText(206, "Imaging Surfaces");
     this.label12.Text             = Language.GetLocalizedText(207, "Horiz Pixels");
     this.label10.Text             = Language.GetLocalizedText(208, "Height");
     this.widthLabel.Text          = Language.GetLocalizedText(209, "Width");
     this.label4.Text              = Language.GetLocalizedText(201, "Camera");
     this.label3.Text              = Language.GetLocalizedText(210, "Manufacturer");
     this.Telescope.Text           = Language.GetLocalizedText(139, "Telescope");
     this.CameraGroup.Text         = Language.GetLocalizedText(201, "Camera");
     this.label15.Text             = Language.GetLocalizedText(211, "For More information:");
     this.label16.Text             = Language.GetLocalizedText(211, "For More information:");
     this.OK.Text = Language.GetLocalizedText(212, "Close");
     this.Text    = Language.GetLocalizedText(213, "Field of View Indicator");
 }
コード例 #13
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            try
            {
                byte[] imageArray = null;
                try
                {
                    imageArray = getImageByteArray();
                }
                catch (Exception)
                {
                    MessageBox.Show(Language.GetLocalizedText(-1, "Error with selected image"));
                    return;
                }
                CloudCommunitiesUsersAPI.apiUsers uApi = new CloudCommunitiesUsersAPI.apiUsers();
                string logoUrl = uApi.UploadFile(CloudCommunities.GetTokenFromId(), imageArray, txtImage.Text, "image/jpeg", false);

                apiCommunities api            = new apiCommunities();
                long           newCommunityId = api.Create(CloudCommunities.GetTokenFromId(), txtName.Text, logoUrl,
                                                           (OrderContentMethods)cmbOrder.SelectedItem, (PublicPermission)cmbAccess.SelectedItem, txtDescription.Text);
                createdCommunityId = newCommunityId;
                this.Close();
            }
            catch (SoapException ex)
            {
                CloudCommunities.ProcessSoapException(ex);
            }
        }
コード例 #14
0
 private void SetUiStrings()
 {
     this.KeyTypeLabel.Text = Language.GetLocalizedText(1348, "Transition Function");
     this.TimeLabel.Text    = Language.GetLocalizedText(1349, "Time");
     this.ValueLabel.Text   = Language.GetLocalizedText(668, "Value");
     this.Text = Language.GetLocalizedText(1350, "Key Properties");
 }
コード例 #15
0
        private void CurrentValue_Validating(object sender, CancelEventArgs e)
        {
            if (initializing || CurrentValue.Text == Language.GetLocalizedText(1351, "Multiple") || dirtyEdit == false)
            {
                return;
            }
            bool failed = false;

            double newValue = UiTools.ParseAndValidateDouble(CurrentValue, propValue, ref failed);

            if (newValue != propValue && !failed)
            {
                if (keys != null)
                {
                    Undo.Push(new UndoTourStopChange(Language.GetLocalizedText(1352, "Key Properties Edit"), Earth3d.MainWindow.TourEdit.Tour));
                    foreach (VisibleKey vk in keys.Values)
                    {
                        Key key = vk.Target.GetKey(vk.ParameterIndex, vk.Time);
                        if (key != null)
                        {
                            key.Value = newValue;
                        }
                    }
                }
                TimeLine.RefreshUi(false);
                RefreshTween();
            }
        }
コード例 #16
0
        private void VoRegistrySearch(string keyword)
        {
            try
            {
                lastKeyword = keyword;
                string filename = string.Format(@"{0}\NVOREG.XML", Path.GetTempPath());
                string url      = String.Format("http://nvo.stsci.edu//vor10/NVORegInt.asmx/VOTCapabilityPredicate?predicate=(title%20like%20'%25{0}%25'%20or%20shortname%20like%20'%25{0}%25')&capability={1}", keyword, coneSearch ? "ConeSearch" : "SIAP");


                if (!FileDownload.DownloadFile(url, filename, true))
                {
                    return;
                }

                if (!File.Exists(filename))
                {
                    return;
                }


                string      data = File.ReadAllText(filename);
                XmlDocument doc  = new XmlDocument();
                doc.LoadXml(data);
                registry = new VoTable(doc);

                LoadRegistryResults();
            }
            catch
            {
                fromRegistry.Checked = false;
                fromRegistry.Enabled = false;
                ResourceList.Items.Add(new ListViewItem(Language.GetLocalizedText(915, "Can't access NVO Registry at this time")));
            }
        }
コード例 #17
0
 private void SetUiStrings()
 {
     this.label1.Text         = "Joystick or Game Contoller Found";
     this.richTextBox1.Text   = Language.GetLocalizedText(250, "WorldWide Telescope can use a XBOX 360 Game controller or other compatible device to navigate the 3d viewport. Some controllers are not properly center calibrated and can cause the viewport to zoom or spin out of control. Having more than one type of controller can cause conflicts. If you have problems with the viewport, either disable the joystick control or unplug conflicting devices before launching WorldWide Telescope.");
     this.UserController.Text = Language.GetLocalizedText(156, "OK");
     this.close.Text          = Language.GetLocalizedText(252, "Ignore the controller");
 }
コード例 #18
0
 public void RemoveTrack()
 {
     if (trackType == AudioType.Music)
     {
         if (target.MusicTrack != null)
         {
             //todo localize
             Undo.Push(new UndoTourStopChange(Language.GetLocalizedText(524, "Remove Music"), target.Owner));
             target.MusicTrack.CleanUp();
             target.MusicTrack = null;
             UpdateTrackStatus();
             return;
         }
     }
     else
     {
         if (target.VoiceTrack != null)
         {
             Undo.Push(new UndoTourStopChange(Language.GetLocalizedText(525, "Remove Voiceover"), target.Owner)); UpdateTrackStatus();
             target.VoiceTrack.CleanUp();
             target.VoiceTrack = null;
             //todo localize
             return;
         }
     }
     return;
 }
コード例 #19
0
 private void ShowImageCredits(IImageSet imageSet)
 {
     if (imageSet != null)
     {
         if (!string.IsNullOrEmpty(imageSet.CreditsText))
         {
             this.creditsText.Text = imageSet.CreditsText;
         }
         else
         {
             this.creditsText.Text = Language.GetLocalizedText(288, "No information available");
         }
         if (!string.IsNullOrEmpty(imageSet.CreditsUrl))
         {
             this.creditsLink.Text = imageSet.CreditsUrl;
         }
         else
         {
             this.creditsLink.Text = Language.GetLocalizedText(288, "No information available");
         }
     }
     else
     {
         this.creditsText.Text = Language.GetLocalizedText(288, "No information available");
         this.creditsLink.Text = Language.GetLocalizedText(288, "No information available");
     }
 }
コード例 #20
0
        private void UpdateTrackStatus()
        {
            bool enable = Track != null;

            this.Enabled   = target != null;
            Browse.Enabled = this.Enabled;
            if (enable)
            {
                Volume.Value = Track.Volume;
            }
            MuteButton.Enabled = enable;
            Volume.Enabled     = enable;
            punchIn.Enabled    = enable;
            punchOut.Enabled   = enable;


            if (enable)
            {
                Browse.Text = Language.GetLocalizedText(25, "Edit...");
            }
            else
            {
                Browse.Text = Language.GetLocalizedText(130, "Browse...");
            }

            Refresh();
        }
コード例 #21
0
 private void tourTitleTextbox_MouseClick(object sender, MouseEventArgs e)
 {
     if (tourTitleTextbox.Text == Language.GetLocalizedText(485, "Please enter a title for the tour..."))
     {
         tourTitleTextbox.SelectAll();
     }
 }
コード例 #22
0
        private void PasteFromTle_Click(object sender, EventArgs e)
        {
            if (Clipboard.ContainsText() && Clipboard.GetText().Length > 0)
            {
                string   data  = Clipboard.GetText(TextDataFormat.UnicodeText);
                string[] lines = data.Split(new char[] { '\n', '\r' });
                string   line1 = "";
                string   line2 = "";
                for (int i = 0; i < lines.Length; i++)
                {
                    lines[i] = lines[i].Trim();
                    if (lines[i].Length == 69 && ReferenceFrame.IsTLECheckSumGood(lines[i]))
                    {
                        if (line1.Length == 0 && lines[i].Substring(0, 1) == "1")
                        {
                            line1 = lines[i];
                        }
                        if (line2.Length == 0 && lines[i].Substring(0, 1) == "2")
                        {
                            line2 = lines[i];
                        }
                    }
                }

                if (line1.Length == 69 && line2.Length == 69)
                {
                    frame.FromTLE(line1, line2, 398600441800000);
                    SyncToFrame();
                    return;
                }
            }

            UiTools.ShowMessageBox(Language.GetLocalizedText(756, "The clipbboard does not appear to contain a valid TLE set. Copy the contents of a Two Line Elements (TLE) set from your source to the clipboard in plain text and click paste again"), Language.GetLocalizedText(755, "Paste Orbital Elements from TLE"));
        }
コード例 #23
0
 private void SetUiStrings()
 {
     this.spreadsheetNameLabel.Text = Language.GetLocalizedText(1122, "A Time");
     this.label1.Text = Language.GetLocalizedText(1123, "B Time");
     this.label2.Text = Language.GetLocalizedText(1124, "Hold Time");
     this.Text        = Language.GetLocalizedText(1125, "Transitions");
 }
コード例 #24
0
        private void OK_Click(object sender, EventArgs e)
        {
            purgeImagery  = imagery.Checked;
            purgeCatalogs = catalogs.Checked;
            purgeTours    = tours.Checked;

            if (purgeCatalogs || purgeImagery || purgeTours)
            {
                if (purgeCatalogs)
                {
                    if (UiTools.ShowMessageBox(Language.GetLocalizedText(149, "This will delete custom constellation figures as well as other selected data and close the application. Do you want to continue?"), Language.GetLocalizedText(3, "Microsoft WorldWide Telescope"), MessageBoxButtons.OKCancel) == DialogResult.Cancel)
                    {
                        return;
                    }
                }
                else
                {
                    if (UiTools.ShowMessageBox(Language.GetLocalizedText(150, "This will delete cached data and close the application. Do you want to continue?"), Language.GetLocalizedText(3, "Microsoft WorldWide Telescope"), MessageBoxButtons.OKCancel) == DialogResult.Cancel)
                    {
                        return;
                    }
                }
                purgeMode         = true;
                timer.Enabled     = true;
                progressText.Text = Language.GetLocalizedText(151, "Purging Cache");
                progressBar.Value = 0;
                Purge.Enabled     = false;
                backgroundWorker.RunWorkerAsync();
            }
        }
コード例 #25
0
 private void SetUiStrings()
 {
     this.Control.Text                = Language.GetLocalizedText(1159, "Control");
     this.Binding.Text                = Language.GetLocalizedText(1161, "Binding");
     this.Repeat.Text                 = Language.GetLocalizedText(1168, "Repeat");
     this.Property.Text               = Language.GetLocalizedText(1166, "Property");
     this.BindTypeLabel.Text          = Language.GetLocalizedText(1165, "Bind Type");
     this.BindingTargetTypeLabel.Text = Language.GetLocalizedText(1164, "Binding Target Type");
     this.label1.Text                 = Language.GetLocalizedText(1318, "Left Sholder");
     this.label2.Text                 = Language.GetLocalizedText(1319, "Left Trigger");
     this.label3.Text                 = Language.GetLocalizedText(1320, "Right Trigger");
     this.label6.Text                 = Language.GetLocalizedText(1321, "Right Sholder");
     this.label7.Text                 = Language.GetLocalizedText(1322, "A, B, X, Y Buttons");
     this.label8.Text                 = Language.GetLocalizedText(1323, "Right Thumb");
     this.label9.Text                 = Language.GetLocalizedText(1324, "D-Pad");
     this.label10.Text                = Language.GetLocalizedText(1325, "Left Thumb");
     this.label11.Text                = Language.GetLocalizedText(913, "Back");
     this.label12.Text                = Language.GetLocalizedText(1326, "Start");
     this.modeLabel.Text              = Language.GetLocalizedText(1327, "Mode");
     this.export.Text                 = Language.GetLocalizedText(1328, "Export");
     this.Import.Text                 = Language.GetLocalizedText(1329, "Import");
     this.RepeatCheckbox.Text         = Language.GetLocalizedText(1168, "Repeat");
     this.ModeDependentMaps.Text      = Language.GetLocalizedText(1330, "Use Mode Dependent Mappings");
     this.UseCustomMaps.Text          = Language.GetLocalizedText(1331, "Use Custom Mappings");
     this.Cancel.Text                 = Language.GetLocalizedText(157, "Cancel");
     this.OK.Text = Language.GetLocalizedText(156, "OK");
     this.Text    = Language.GetLocalizedText(1332, "XBox 360 Controller Configuration");
 }
コード例 #26
0
 private void SetUiStrings()
 {
     this.checkTilesInView.Text = Language.GetLocalizedText(306, "Tile in View Frustum");
     this.wwtButton1.Text       = Language.GetLocalizedText(307, "Flush Queue");
     this.ClearCache.Text       = Language.GetLocalizedText(937, "Clear Cache");
     this.Text = Language.GetLocalizedText(938, "Download Queue");
 }
コード例 #27
0
        private void SetControlEnableState(bool state)
        {
            ScopeEast.Enabled  = state;
            ScopeWest.Enabled  = state;
            ScopeNorth.Enabled = state;
            ScopeSouth.Enabled = state;

            CenterScope.Enabled = state;
            SlewScope.Enabled   = state;
            TrackScope.Enabled  = state;
            if (state)
            {
                SyncScope.Enabled = scope.CanSync && scope.Tracking;
                if (scope.AtPark)
                {
                    Park.Text    = Language.GetLocalizedText(395, "Unpark");
                    Park.Enabled = scope.CanUnpark;
                }
                else
                {
                    Park.Text    = Language.GetLocalizedText(50, "Park");
                    Park.Enabled = scope.CanPark;
                }
            }
            else
            {
                SyncScope.Enabled = state;
                Park.Enabled      = state;
            }
        }
コード例 #28
0
        public static IThumbnail GetDataSetsAsFolder()
        {
            ThumbMenuNode parent = new ThumbMenuNode();

            parent.Name = Language.GetLocalizedText(646, "Collections");

            Dictionary <string, DataSet> dataSets = DataSetManager.GetDataSets();

            foreach (DataSet d in dataSets.Values)
            {
                // Todo Change this to exploere earth, moon etc.
                if (d.Sky == true)
                {
                    if (d != null)
                    {
                        Dictionary <string, Places> placesList = d.GetPlaces();
                        foreach (Places places in placesList.Values)
                        {
                            if (places != null && places.Browseable)
                            {
                                parent.AddChild(places);
                            }
                        }
                    }
                }
            }
            return(parent);
        }
コード例 #29
0
        public static void api_GetCommunitiesCompleted(ToolStripMenuItem addToCommunityToolStripMenuItem,
                                                       GetCommunitiesCompletedEventArgs e, EventHandler newCommunityMenu_Click, EventHandler AddtoCommunityMenu_Click)
        {
            addToCommunityToolStripMenuItem.DropDownItems.Clear();

            ToolStripMenuItem newCommunityMenu = new ToolStripMenuItem(Language.GetLocalizedText(-1, "New Community..."));

            newCommunityMenu.Click += new EventHandler(newCommunityMenu_Click);
            addToCommunityToolStripMenuItem.DropDownItems.Add(newCommunityMenu);
            addToCommunityToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator());

            ToolStripMenuItem menuItem = addToCommunityToolStripMenuItem;

            if (e.Error == null)
            {
                if (e.Result is WWTCommunitySt[])
                {
                    addToCommunityToolStripMenuItem.Tag = e.Result;
                }
                else
                {
                    addToCommunityToolStripMenuItem.Tag = null;
                }
            }
            else
            {
                addToCommunityToolStripMenuItem.Tag = null;
            }
            CreatePickFolderMenuCommunities(menuItem, AddtoCommunityMenu_Click);
        }
コード例 #30
0
        private void GoToLatLong_Load(object sender, System.EventArgs e)
        {
            Dictionary <string, DataSet> datasets = DataSetManager.GetDataSets();

            foreach (DataSet d in datasets.Values)
            {
                if (d.Sky == sky)
                {
                    this.DataSetList.Items.Add(d);
                }
            }
            this.DataSetList.SelectedIndex = lastSelectedDatasetIndex;

            this.Categorys.SelectedIndex = lastSelectedIndexCatagorys;
            this.txtLat.Text             = Latitude.ToString();
            this.txtLong.Text            = Longitude.ToString();
            this.txtName.Text            = LocationName;
            this.txtAltitude.Text        = Altitude.ToString();
            if (sky)
            {
                this.lblLatitude.Text  = Language.GetLocalizedText(262, "Declination");
                this.lblLongitude.Text = Language.GetLocalizedText(263, "Right Ascension");
            }

            this.txtLat.Text  = Coordinates.FormatDMS(Latitude);
            this.txtLong.Text = Coordinates.FormatDMS(Longitude);
            if (Earth3d.MainWindow.CurrentImageSet.DataSetType == ImageSetType.Earth)
            {
                FromEarthView.Visible = true;
            }
        }