Ejemplo n.º 1
0
        private void InitUI()
        {
            // Set localized strings
            Text           = Resources.SetupDialog_DialogBox_Text;
            cmdOK.Text     = Resources.SetupDialog_DialogOK_Text;
            cmdCancel.Text = Resources.SetupDialog_DialogCancel_Text;
            GeographicalSiteGroupBox.Text = Resources.SetupDialog_GeographicalSite_Text;
            ConnectionGroupBox.Text       = Resources.SetupDialog_HardwareConnection_Text;
            chkTrace.Text       = Resources.SetupDialog_TraceOn_Text;
            CommPortLabel.Text  = Resources.SetupDialog_CommPort_Text;
            LongitudeLabel.Text = Resources.SetupDialog_Longitude_Text;
            LatitudeLabel.Text  = Resources.SetupDialog_Latitude_Text;
            ElevationLabel.Text = Resources.SetupDialog_Elevation_Text;

            // Set version link
            ReleaseslinkLabel.Text = typeof(Telescope).Assembly.GetName().Version.ToString();

            // Set the list of com ports to those that are currently available
            PortLookupTimer_Tick(null, null);

            // Set location from profile
            m_LocationProfile = Telescope.m_LocationProfile;
            LongitudeBox.Text = m_Util.DegreesToDMS(m_LocationProfile.Longitude);
            LatitudeBox.Text  = m_Util.DegreesToDMS(m_LocationProfile.Latitude);
            ElevationBox.Text = m_LocationProfile.Elevation.ToString(formatProvider) + " m";

            // Set logging from profile
            chkTrace.Checked = Telescope.tl.Enabled;

            // Set communication port from profile
            m_PortName = Telescope.comPort;
            comboBoxComPort.SelectedItem = m_PortName;
            cmdOK.Enabled = (0 < comboBoxComPort.Text.Length);

            // Run port updater
            portLookupTimer.Start();
        }
Ejemplo n.º 2
0
 public override string ToString()
 {
     return(_isHMS ?
            ascomutils.DegreesToHMS(Degrees, "h", "m", "s", 1) :
            ascomutils.DegreesToDMS(Degrees, ":", ":", "", 1));
 }