aswi2021tri-musketyri-gitlab/Server/ServerApp/Parser/OutputInfo/WeatherInfo.cs @ 38361fa4
1 |
using System; |
---|---|
2 |
|
3 |
namespace Parser.OutputInfo |
4 |
{
|
5 |
class WeatherInfo |
6 |
{
|
7 |
double temp; |
8 |
int rain; |
9 |
double wind; |
10 |
double lum; |
11 |
|
12 |
DateTime startTime; |
13 |
int range; |
14 |
|
15 |
public WeatherInfo(DateTime startTime, double temp, int rain, double wind, double lum, int range) |
16 |
{
|
17 |
this.startTime = startTime; |
18 |
this.temp = temp; |
19 |
this.rain = rain; |
20 |
this.wind = wind; |
21 |
this.lum = lum; |
22 |
this.range = range; |
23 |
}
|
24 |
|
25 |
public override string ToString() |
26 |
{
|
27 |
return $"{startTime.ToString()} \t {temp}°C \t {rain}% \t {wind}m/s \t {lum}lux"; |
28 |
}
|
29 |
|
30 |
}
|
31 |
}
|