mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 13:57:28 +02:00
Version 3.0.363
This commit is contained in:
parent
4ff3307997
commit
91d42552c7
212 changed files with 1799 additions and 1318 deletions
23
TINKLib/Model/Stations/StationNS/IStation.cs
Normal file
23
TINKLib/Model/Stations/StationNS/IStation.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using TINK.Model.Stations.StationNS.Operator;
|
||||
|
||||
namespace TINK.Model.Stations.StationNS
|
||||
{
|
||||
public interface IStation
|
||||
{
|
||||
/// <summary> Holds the unique id of the station.c</summary>
|
||||
string Id { get; }
|
||||
|
||||
/// <summary> Holds the group to which the station belongs.</summary>
|
||||
IEnumerable<string> Group { get; }
|
||||
|
||||
/// <summary> Gets the name of the station.</summary>
|
||||
string StationName { get; }
|
||||
|
||||
/// <summary> Holds the gps- position of the station.</summary>
|
||||
IPosition Position { get; }
|
||||
|
||||
/// <summary> Holds operator related data.</summary>
|
||||
IData OperatorData { get; }
|
||||
}
|
||||
}
|
24
TINKLib/Model/Stations/StationNS/NullStation.cs
Normal file
24
TINKLib/Model/Stations/StationNS/NullStation.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Collections.Generic;
|
||||
using TINK.Model.Stations.StationNS.Operator;
|
||||
|
||||
namespace TINK.Model.Stations.StationNS
|
||||
{
|
||||
/// <summary> Holds object representing null station.</summary>
|
||||
public class NullStation : IStation
|
||||
{
|
||||
/// <summary> Holds the unique id of the station.c</summary>
|
||||
public string Id => null;
|
||||
|
||||
/// <summary> Holds the group to which the station belongs.</summary>
|
||||
public IEnumerable<string> Group => new List<string>();
|
||||
|
||||
/// <summary> Gets the name of the station.</summary>
|
||||
public string StationName => string.Empty;
|
||||
|
||||
/// <summary> Holds the gps- position of the station.</summary>
|
||||
public IPosition Position => PositionFactory.Create();
|
||||
|
||||
/// <summary> Holds operator related data.</summary>
|
||||
public IData OperatorData => new Data();
|
||||
}
|
||||
}
|
36
TINKLib/Model/Stations/StationNS/Operator/Data.cs
Normal file
36
TINKLib/Model/Stations/StationNS/Operator/Data.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using Xamarin.Forms;
|
||||
|
||||
namespace TINK.Model.Stations.StationNS.Operator
|
||||
{
|
||||
/// <summary> Holds operator related data.</summary>
|
||||
public class Data : IData
|
||||
{
|
||||
public Data(
|
||||
string name = null,
|
||||
string phoneNumberText = null,
|
||||
string hours = null,
|
||||
string mailAddressText = null, Color? color = null)
|
||||
{
|
||||
Name = name ?? string.Empty;
|
||||
PhoneNumberText = phoneNumberText ?? string.Empty;
|
||||
Hours = hours ?? string.Empty;
|
||||
MailAddressText = mailAddressText ?? string.Empty;
|
||||
Color = color;
|
||||
}
|
||||
|
||||
/// <summary> Name of the operator.</summary>
|
||||
public string Name { get; private set; }
|
||||
|
||||
/// <summary> Support phone number of the operator.</summary>
|
||||
public string PhoneNumberText { get; private set; }
|
||||
|
||||
/// <summary> Office times when support is available.</summary>
|
||||
public string Hours { get; private set; }
|
||||
|
||||
/// <summary> Support mails address of the operator.</summary>
|
||||
public string MailAddressText { get; private set; }
|
||||
|
||||
/// <summary> Color of the operator (operator specific skin)</summary>
|
||||
public Color? Color { get; private set; }
|
||||
}
|
||||
}
|
22
TINKLib/Model/Stations/StationNS/Operator/IData.cs
Normal file
22
TINKLib/Model/Stations/StationNS/Operator/IData.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using Xamarin.Forms;
|
||||
|
||||
namespace TINK.Model.Stations.StationNS.Operator
|
||||
{
|
||||
public interface IData
|
||||
{
|
||||
/// <summary> Name of the operator.</summary>
|
||||
string Name { get; }
|
||||
|
||||
/// <summary> Support phone number of the operator.</summary>
|
||||
string PhoneNumberText { get; }
|
||||
|
||||
/// <summary> Office times when support is available.</summary>
|
||||
string Hours { get; }
|
||||
|
||||
/// <summary> Support mails address of the operator.</summary>
|
||||
string MailAddressText { get; }
|
||||
|
||||
/// <summary> Color of the operator (operator specific skin)</summary>
|
||||
Color? Color { get; }
|
||||
}
|
||||
}
|
44
TINKLib/Model/Stations/StationNS/Station.cs
Normal file
44
TINKLib/Model/Stations/StationNS/Station.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TINK.Model.Stations.StationNS.Operator;
|
||||
|
||||
namespace TINK.Model.Stations.StationNS
|
||||
{
|
||||
/// <summary> Holds station info. </summary>
|
||||
public class Station : IStation
|
||||
{
|
||||
/// <summary> Constructs a station object.</summary>
|
||||
/// <param name="id">Id of the station.</param>
|
||||
/// <param name="group">Group (TINK, Konrad) to which station is related.</param>
|
||||
/// <param name="position">GPS- position of the station.</param>
|
||||
/// <param name="stationName">Name of the station.</param>
|
||||
public Station(
|
||||
string id,
|
||||
IEnumerable<string> group,
|
||||
IPosition position,
|
||||
string stationName = "",
|
||||
Data operatorData = null)
|
||||
{
|
||||
Id = id;
|
||||
Group = group ?? throw new ArgumentException("Can not construct station object. Group of stations must not be null.");
|
||||
Position = position;
|
||||
StationName = stationName ?? string.Empty;
|
||||
OperatorData = operatorData ?? new Data();
|
||||
}
|
||||
|
||||
/// <summary> Holds the unique id of the station.c</summary>
|
||||
public string Id { get; }
|
||||
|
||||
/// <summary> Holds the group to which the station belongs.</summary>
|
||||
public IEnumerable<string> Group { get; }
|
||||
|
||||
/// <summary> Gets the name of the station.</summary>
|
||||
public string StationName { get; }
|
||||
|
||||
/// <summary> Holds the gps- position of the station.</summary>
|
||||
public IPosition Position { get; }
|
||||
|
||||
/// <summary> Holds operator related info.</summary>
|
||||
public IData OperatorData { get; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue