コード例 #1
0
 /// <summary>
 /// Initializes timer, which triggers downloading data, after counted time.
 /// </summary>
 void InitTimer()
 {
     Data           = new stationData();            // creating new data object and timer object
     timer          = new DispatcherTimer();
     timer.Tick    += new EventHandler(Timer_Tick); // Adding new TimerTick event
     timer.Interval = new TimeSpan(0, 0, 2);        // Defining amount of time
     timer.Start();
 }
コード例 #2
0
ファイル: MapDisplay.xaml.cs プロジェクト: Pete2172/ISSApp
 public MapDisplay()
 {
     InitializeComponent();
     path = new List <PathNode>();
     data = new stationData();
     InitializeMap();
     DrawMap();
     InitTokens();
     DrawISStoken();
 }
コード例 #3
0
ファイル: MapDisplay.xaml.cs プロジェクト: Pete2172/ISSApp
 public void SetNewData(stationData dat)
 {
     prev_lat = data.solar_Latitude;
     prev_lon = data.solar_Longitude;
     data     = dat;
     DrawMap();
     AddPathPoint();
     DrawISStoken();
     DrawSun();
 }
コード例 #4
0
 /// <summary>
 /// Sends a new data to bing maps obejct
 /// </summary>
 /// <param name="dat"></param>
 public void SendNewData(stationData dat)
 {
     handler             = dat;
     CountryCodeBox.Text = handler.CountryCode; // changing labels
     TimeZoneBox.Text    = handler.TimeZoneID;
     location.Latitude   = handler.latitude;    // adding coordinates of ISS to the location object
     location.Longitude  = handler.longitude;
     Map.Center          = location;            // changing location of map centering point
     Pin.Location        = location;            // changing location of the pin in bing maps object
 }
コード例 #5
0
ファイル: DataDisplay.xaml.cs プロジェクト: Pete2172/ISSApp
        /// <summary>
        /// Displays fresh data in labels
        /// </summary>
        /// <param name="dat">Object with gathered data</param>
        public void SetNewData(stationData dat)
        {
            handler         = dat;
            lon_label.Text  = dat.GetLongitude(); // changing labels' content
            lat_label.Text  = dat.GetLatitude();
            time_label.Text = dat.GetDateTime();

            if (km_radio.IsChecked == true)                    // checking radio buttons
            {
                vel_label.Text = dat.GetVelocityInKmPerHour(); // changing units to kilometers
                alt_label.Text = dat.GetAltitudeInKm();
            }
            else
            {
                vel_label.Text = dat.GetVelocityInMPH();  // changing units to miles
                alt_label.Text = dat.GetAltitudeInMiles();
            }
        }