コード例 #1
0
        private void ScopeDSCClient_Load(object sender, EventArgs e)
        {
            iInitWidth_       = this.Width;
            iInitHeight_      = this.Height;
            positionFontSize_ = textBoxPosition.Font.Size;
            objectFontSize_   = objectNameLabel.Font.Size;

            latitude_  = settings_.Latitude;
            longitude_ = settings_.Longitude;
            showNearestAzmRotation_     = settings_.ShowNearestAzmRotation;
            connectToStellarium_        = settings_.ConnectToStellarium;
            stellariumTcpPort_          = settings_.TcpPort;
            oppositeHorzPositioningDir_ = settings_.OppositeHorzPositioningDir;

            if (connectToStellarium_)
            {
                OpenStellariumConnection(stellariumTcpPort_);
            }

            // Everything is changed! (Yes, it's redundant.)
            //OptionsOrTimeChanged();
            ConnectionChangedAltAzm();
            ConnectionChangedEqu();
            ConnectionChangedGPS();
            ObjectChanged();
            ScopePosChanged();
            ErrorCntChanged();
            TimeChanged();
            UpdateUI();

            LoadAlignment();
            ClientCommonAPI.BuildObjectDatabase(ref database_);
            ClientCommonAPI.BuildLocationDatabase(ref locations_);
        }