Skip to content

Commit 13a728e

Browse files
committed
wip
1 parent 9f8338d commit 13a728e

8 files changed

Lines changed: 479 additions & 9 deletions

File tree

ShiftSharp/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
88
[assembly: AssemblyTitle("ShiftSharp")]
9-
[assembly: AssemblyDescription("")]
9+
[assembly: AssemblyDescription("C# version of java Shift library")]
1010
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyCompany("Point85")]
1212
[assembly: AssemblyProduct("ShiftSharp")]
1313
[assembly: AssemblyCopyright("Copyright © 2017")]
1414
[assembly: AssemblyTrademark("")]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#
2+
# Text for string output
3+
#
4+
period.start = Start
5+
period.end = End
6+
rotation.periods = Rotation periods
7+
rotation.start = Rotation start
8+
rotation.duration = Rotation duration
9+
rotation.days = Days in rotation
10+
rotation.working = Scheduled working time
11+
rotation.percentage = Percentage worked
12+
rotation.on = on
13+
rotation.off = off
14+
team.hours = Average hours worked per week
15+
breaks = Breaks
16+
team = Team
17+
shift = Shift
18+
schedule = Schedule
19+
schedule.working = Scheduled working time
20+
schedule.shifts = Shifts
21+
schedule.teams = Teams
22+
schedule.coverage = Total team coverage
23+
schedule.non = Non-working periods
24+
schedule.total = Total non-working time
25+
shifts.working = Working shifts
26+
shifts.day = Day
27+
shifts.non.working = No working shifts
28+
#
29+
# Text for exception messages
30+
#
31+
name.not.defined = The name is not defined.
32+
start.not.defined = The start time is not defined.
33+
duration.not.defined = The duration is not defined.
34+
duration.not.allowed = The duration must be 24 hours or less.
35+
end.earlier.than.start = Starting time of {0} must be earlier than {1}.
36+
team.already.exists = Team {0} has already been created.
37+
shift.already.exists = Shift {0} has already been created.
38+
shift.in.use = Shift {0} is being used in a work schedule.
39+
nonworking.period.already.exists = Non-working period {0} has already been created.
40+
shift.spans.midnight = Shift {0} spans midnight and the working time between {1} and {2} is ambiguous.

ShiftSharp/ShiftSharp.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,25 @@
4646
<Reference Include="System.Xml" />
4747
</ItemGroup>
4848
<ItemGroup>
49+
<Compile Include="Break.cs" />
50+
<Compile Include="DayOff.cs" />
4951
<Compile Include="Named.cs" />
52+
<Compile Include="NonWorkingPeriod.cs" />
5053
<Compile Include="Properties\AssemblyInfo.cs" />
5154
<Compile Include="PropertyManager.cs" />
55+
<Compile Include="Rotation.cs" />
56+
<Compile Include="RotationSegment.cs" />
57+
<Compile Include="Shift.cs" />
58+
<Compile Include="ShiftInstance.cs" />
59+
<Compile Include="Team.cs" />
5260
<Compile Include="TimePeriod.cs" />
5361
<Compile Include="WorkSchedule.cs" />
5462
</ItemGroup>
5563
<ItemGroup>
5664
<None Include="packages.config" />
5765
</ItemGroup>
66+
<ItemGroup>
67+
<Folder Include="NewFolder1\" />
68+
</ItemGroup>
5869
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5970
</Project>

ShiftSharp/WorkSchedule.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ namespace Point85.ShiftSharp.Schedule
3535
/// </summary>
3636
public class WorkSchedule : Named
3737
{
38+
// name of resource with translatable strings for exception messages
39+
private const string MESSAGE_RESOURCE_NAME = "./Resources/Message.properties";
40+
3841
// resource manager for exception messages
3942
internal static PropertyManager MessagesManager;
4043

@@ -50,13 +53,6 @@ public class WorkSchedule : Named
5053
// holidays and planned downtime
5154
private List<NonWorkingPeriod> nonWorkingPeriods = new List<NonWorkingPeriod>();
5255

53-
/**
54-
* Default constructor
55-
*/
56-
public WorkSchedule() : base()
57-
{
58-
}
59-
6056
/**
6157
* Construct a work schedule
6258
*
@@ -69,6 +65,8 @@ public WorkSchedule() : base()
6965
*/
7066
public WorkSchedule(string name, string description) : base(name, description)
7167
{
68+
// localizable string managers
69+
MessagesManager = new PropertyManager(MESSAGE_RESOURCE_NAME);
7270
}
7371

7472
/// <summary>

0 commit comments

Comments
 (0)