mirror of
https://github.com/usatiuk/PomoTime.git
synced 2025-10-29 00:47:48 +01:00
move Period enum into its own file
This commit is contained in:
37
PomoTime/Period.cs
Normal file
37
PomoTime/Period.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PomoTime
|
||||||
|
{
|
||||||
|
public static class PeriodExtensions
|
||||||
|
{
|
||||||
|
public static string Name(this Period period)
|
||||||
|
{
|
||||||
|
string output;
|
||||||
|
switch (period)
|
||||||
|
{
|
||||||
|
case Period.LongBreak:
|
||||||
|
output = "Long break";
|
||||||
|
break;
|
||||||
|
case Period.ShortBreak:
|
||||||
|
output = "Short break";
|
||||||
|
break;
|
||||||
|
case Period.Work:
|
||||||
|
output = "Work";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Period
|
||||||
|
{
|
||||||
|
Work, ShortBreak, LongBreak
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -132,6 +132,7 @@
|
|||||||
<Compile Include="MainPage.xaml.cs">
|
<Compile Include="MainPage.xaml.cs">
|
||||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Period.cs" />
|
||||||
<Compile Include="PeriodToStringConverter.cs" />
|
<Compile Include="PeriodToStringConverter.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="RunningState.cs" />
|
<Compile Include="RunningState.cs" />
|
||||||
|
|||||||
@@ -4,33 +4,6 @@ using System.Runtime.CompilerServices;
|
|||||||
|
|
||||||
namespace PomoTime
|
namespace PomoTime
|
||||||
{
|
{
|
||||||
public static class PeriodExtensions
|
|
||||||
{
|
|
||||||
public static string Name(this Period period)
|
|
||||||
{
|
|
||||||
string output;
|
|
||||||
switch (period)
|
|
||||||
{
|
|
||||||
case Period.LongBreak:
|
|
||||||
output = "Long break";
|
|
||||||
break;
|
|
||||||
case Period.ShortBreak:
|
|
||||||
output = "Short break";
|
|
||||||
break;
|
|
||||||
case Period.Work:
|
|
||||||
output = "Work";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public enum Period
|
|
||||||
{
|
|
||||||
Work, ShortBreak, LongBreak
|
|
||||||
}
|
|
||||||
public class RunningState : INotifyPropertyChanged
|
public class RunningState : INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|||||||
Reference in New Issue
Block a user