Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CCTime.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.8" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand All @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CCTime</RootNamespace>
<AssemblyName>CCTime</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -37,12 +37,12 @@
<ApplicationIcon>brick.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="INIFileParser">
<HintPath>..\packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll</HintPath>
<Reference Include="INIFileParser, Version=2.5.2.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
<HintPath>packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="ObjectListView">
<HintPath>..\packages\ObjectListView.Official.2.9.1\lib\net20\ObjectListView.dll</HintPath>
<Reference Include="ObjectListView, Version=2.9.1.1072, Culture=neutral, PublicKeyToken=b1c5bf581481bcd4, processorArchitecture=MSIL">
<HintPath>packages\ObjectListView.Official.2.9.1\lib\net20\ObjectListView.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
21 changes: 10 additions & 11 deletions DataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,31 +163,30 @@ public static void DeleteDay( DateTime dt )
}
}

public static bool DayExsists( DateTime dt )
public static bool DayExists( DateTime dt )
{
return TaskManager.taskData.ContainsKey( dt.ToString( "yyyy-MM-dd" ) );
}

public static List<Task> GetDay( DateTime dt )
{
if( !TaskManager.taskData.ContainsKey( dt.ToString( "yyyy-MM-dd" ) ) ) return null;
return TaskManager.taskData[dt.ToString( "yyyy-MM-dd" )];
}

public static List<Task> GetToday()
{
var today = DateTime.Now;
if( DayExsists( today ) )
if (DayExists( dt ))
{
return TaskManager.taskData[today.ToString( "yyyy-MM-dd" )];
return TaskManager.taskData[dt.ToString("yyyy-MM-dd")];
}
else
{
// add today, if not present, by cloning previous date
return AddDay( today, GetPreviousDate( today, true ) );
return AddDay(dt, GetPreviousDate(dt, true));
}
}

public static List<Task> GetToday()
{
var today = DateTime.Now;
return GetDay( today );
}

public static string GetNextDate( DateTime dt )
{
var toFind = dt.ToString( "yyyy-MM-dd" );
Expand Down
4 changes: 2 additions & 2 deletions FormDateSelect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ private bool allowDate( DateTime dt )

if(this.ChooseFromAvailable)
{
return TaskManager.DayExsists( dt );
return TaskManager.DayExists( dt );
}
else
{
return !TaskManager.DayExsists( dt );
return !TaskManager.DayExists( dt );
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ini-parser" version="2.5.2" targetFramework="net40" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net20" />
<package id="ini-parser" version="2.5.2" targetFramework="net48" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net48" />
</packages>