Merge branch 'develop' of 141.43.76.143:repos/bare/win8phoneApp into develop

This commit is contained in:
stubbfel
2013-07-16 13:38:23 +02:00
19 changed files with 304 additions and 99 deletions

View File

@@ -221,6 +221,9 @@
<Compile Include="Utility\Lui\Button\LinkButton.cs" />
<Compile Include="Utility\StringManager.cs" />
<Compile Include="Utility\URLList.cs" />
<Compile Include="Utility\Utilities.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Utility\XmlApi.cs" />
<Compile Include="Utility\XmlFeed.cs" />
<Compile Include="Utility\XmlFile.cs" />

View File

@@ -24,6 +24,7 @@ namespace CampusAppWP8.Feed.Departments
/// <summary>
/// Initializes a new instance of the <see cref="DepartmentFavoriteFeed" /> class.
/// </summary>
/// <param name="autoLoad">automatic loading of the data</param>
public DepartmentFavoriteFeed(bool autoLoad = true)
: base(ModelType.File, Constants.FileDepartment_Favorite_Name, string.Empty)
{
@@ -45,12 +46,13 @@ namespace CampusAppWP8.Feed.Departments
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
/// </summary>
/// <param name="model">model object</param>
/// <returns>true, if model is up-to-date, otherwise false</returns>
private bool CheckIsModelUpToDate(DepartmentModel model)
{
bool retValue = true;
if((model == null)
if ((model == null)
|| (model.Faculties == null)
|| (model.Faculties.Count != 1))
{
@@ -63,6 +65,8 @@ namespace CampusAppWP8.Feed.Departments
/// <summary>
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
/// </summary>
/// <param name="model">model object</param>
/// <param name="info">file info object</param>
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(DepartmentModel model, FileInfo info)
{

View File

@@ -7,7 +7,6 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Departments
{
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Departments;
@@ -24,6 +23,7 @@ namespace CampusAppWP8.Feed.Departments
/// <summary>
/// Initializes a new instance of the <see cref="DepartmentFeed" /> class.
/// </summary>
/// <param name="autoLoad">automatic loading of the data</param>
public DepartmentFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileDepartment_Name, Constants.UrlDepartment_Addr)
{
@@ -46,6 +46,7 @@ namespace CampusAppWP8.Feed.Departments
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
/// </summary>
/// <param name="model">model object</param>
/// <returns>true, if model is up-to-date, otherwise false</returns>
private bool CheckIsModelUpToDate(DepartmentModel model)
{
@@ -57,12 +58,7 @@ namespace CampusAppWP8.Feed.Departments
}
else
{
TimeSpan diff = DateTime.Now.Subtract(model.CreateTime);
if (diff.TotalDays >= 7.0)
{
retValue = false;
}
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 7.0);
}
return retValue;
@@ -71,25 +67,24 @@ namespace CampusAppWP8.Feed.Departments
/// <summary>
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
/// </summary>
/// <param name="model">model object</param>
/// <param name="info">file info object</param>
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(DepartmentModel model, FileInfo info)
{
bool retValue = true;
if (model == null) // at loading
if (model == null)
{
// at loading
if (info.Exists == true)
{
TimeSpan diff = DateTime.Now.Subtract(info.LastWriteTime);
if (diff.TotalDays >= 7.0)
{
retValue = false;
}
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 7.0);
}
}
else // at saving
else
{
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{

View File

@@ -7,37 +7,83 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Events
{
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Event Feed.
/// </summary>
public class EventFeed : XmlFeed<RSSViewModel>
public class EventFeed : XmlModel<RSSViewModel>
{
/// <summary>
/// Initializes a new instance of the <see cref="EventFeed" /> class.
/// </summary>
public EventFeed() : base(URLList.EventsFeedURL, "EventFeed.xml")
/// <param name="autoLoad">automatic loading of the data</param>
public EventFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, Constants.UrlEvents_Addr)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
if (autoLoad == true)
{
this.LoadData();
}
}
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
/// </summary>
/// <param name="model">model object</param>
/// <returns>true, if model is up-to-date, otherwise false</returns>
protected override bool CheckIsModelUpToDate()
private bool CheckIsModelUpToDate(RSSViewModel model)
{
return false;
bool retValue = true;
if (model == null)
{
retValue = false;
}
else
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0);
}
return retValue;
}
/// <summary>
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
/// </summary>
/// <param name="model">model object</param>
/// <param name="info">file info object</param>
/// <returns>true, if file is up-to-date, otherwise false</returns>
protected override bool CheckIsFileUpToDate()
private bool CheckIsFileUpToDate(RSSViewModel model, FileInfo info)
{
return true;
bool retValue = true;
if (model == null)
{
// at loading
if (info.Exists == true)
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0);
}
}
else
{
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
}
return retValue;
}
}
}

View File

@@ -7,39 +7,83 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Feed.News
{
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// News Feed.
/// </summary>
public class NewsFeed : XmlFeed<RSSViewModel>
public class NewsFeed : XmlModel<RSSViewModel>
{
/// <summary>
/// Initializes a new instance of the <see cref="NewsFeed" /> class.
/// </summary>
public NewsFeed() : base(URLList.NewsFeedURL, "NewsFeed.xml")
/// <param name="autoLoad">automatic loading of the data</param>
public NewsFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileNews_Name, Constants.UrlNews_Addr)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
if (autoLoad == true)
{
this.LoadData();
}
}
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
/// </summary>
/// <param name="model">model object</param>
/// <returns>true, if model is up-to-date, otherwise false</returns>
protected override bool CheckIsModelUpToDate()
private bool CheckIsModelUpToDate(RSSViewModel model)
{
return false;
bool retValue = true;
if (model == null)
{
retValue = false;
}
else
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0);
}
return retValue;
}
/// <summary>
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
/// </summary>
/// <param name="model">model object</param>
/// <param name="info">info object of the file</param>
/// <returns>true, if file is up-to-date, otherwise false</returns>
protected override bool CheckIsFileUpToDate()
private bool CheckIsFileUpToDate(RSSViewModel model, FileInfo info)
{
return false;
bool retValue = true;
if (model == null)
{
// at loading
if (info.Exists == true)
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0);
}
}
else
{
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
}
return retValue;
}
}
}

View File

@@ -10,7 +10,7 @@
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">

View File

@@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.Events
/// <summary>
/// Event Feed object, which contains the RSS models and data.
/// </summary>
private static EventFeed eventFeed;
private static EventFeed eventFeed = null;
/// <summary>
/// Initializes a new instance of the <see cref="EventIndexPage" /> class.
@@ -29,18 +29,23 @@ namespace CampusAppWP8.Pages.Events
public EventIndexPage()
{
this.InitializeComponent();
EventIndexPage.eventFeed = new EventFeed();
if (EventIndexPage.eventFeed == null)
{
EventIndexPage.eventFeed = new EventFeed(false);
}
EventIndexPage.eventFeed.onLoaded += new EventFeed.OnLoaded(this.SetupEventPageList);
EventIndexPage.eventFeed.LoadData();
}
/// <summary>
/// Gets the eventFeed object.
/// Return the eventFeed object.
/// </summary>
public static EventFeed GetEventFeed
/// <returns>event feed object</returns>
public static EventFeed GetEventFeed()
{
get
{
return EventIndexPage.eventFeed;
}
return EventIndexPage.eventFeed;
}
/// <summary>
@@ -50,22 +55,10 @@ namespace CampusAppWP8.Pages.Events
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if ((EventIndexPage.eventFeed.Model == null)
|| (EventIndexPage.eventFeed.Model.Channel == null)
|| (EventIndexPage.eventFeed.Model.Channel.Count() == 0)
|| (EventIndexPage.eventFeed.Model.Channel[0].Item == null)
|| (EventIndexPage.eventFeed.Model.Channel[0].Item.Count() == 0))
{
// Set handler and load the fees informations.
EventIndexPage.eventFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.SetupEventPageList);
EventIndexPage.eventFeed.LoadFeed();
}
}
/// <summary>
/// Is called after the RSS feeds are loaded into the eventFeed model.
/// If there was no feed information set to the UI, the feed list
/// will be sorted by timestamp and the buttons will be created.
/// </summary>

View File

@@ -11,7 +11,7 @@
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>

View File

@@ -5,7 +5,6 @@
// <author>fiedlchr</author>
// <sience>03.05.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Pages.Events
{
using System;
@@ -46,13 +45,8 @@ namespace CampusAppWP8.Pages.Events
// Set pivotitem Source
if (this.isSourceSet == false)
{
if ((EventIndexPage.GetEventFeed.Model != null)
&& (EventIndexPage.GetEventFeed.Model.Channel != null)
&& (EventIndexPage.GetEventFeed.Model.Channel.Count() >= 1))
{
this.EventPivot.ItemsSource = EventIndexPage.GetEventFeed.Model.Channel[0].Item;
this.isSourceSet = true;
}
this.EventPivot.ItemsSource = EventIndexPage.GetEventFeed().Model.Channel[0].Item;
this.isSourceSet = true;
}
string pivotIndex = string.Empty;
@@ -63,7 +57,7 @@ namespace CampusAppWP8.Pages.Events
int pivotIndexInt = int.Parse(pivotIndex);
// if the index is in the range of the array
if ((pivotIndexInt >= 0) && (pivotIndexInt < EventIndexPage.GetEventFeed.Model.Channel[0].Item.Count()))
if ((pivotIndexInt >= 0) && (pivotIndexInt < EventIndexPage.GetEventFeed().Model.Channel[0].Item.Count()))
{
EventPivot.SelectedIndex = pivotIndexInt;
}

View File

@@ -10,7 +10,7 @@
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">

View File

@@ -21,7 +21,7 @@ namespace CampusAppWP8.Pages.News
/// <summary>
/// News Feed object, which contains the RSS models and data.
/// </summary>
private static NewsFeed newsFeed;
private static NewsFeed newsFeed = null;
/// <summary>
/// Initializes a new instance of the <see cref="NewsIndexPage" /> class.
@@ -29,18 +29,23 @@ namespace CampusAppWP8.Pages.News
public NewsIndexPage()
{
this.InitializeComponent();
NewsIndexPage.newsFeed = new NewsFeed();
if (NewsIndexPage.newsFeed == null)
{
NewsIndexPage.newsFeed = new NewsFeed(false);
}
NewsIndexPage.newsFeed.onLoaded += new NewsFeed.OnLoaded(this.SetupNewsPageList);
NewsIndexPage.newsFeed.LoadData();
}
/// <summary>
/// Gets the newsFeed object.
/// Return the newsFeed object.
/// </summary>
public static NewsFeed GetNewsFeed
/// <returns>news feed object</returns>
public static NewsFeed GetNewsFeed()
{
get
{
return NewsIndexPage.newsFeed;
}
return NewsIndexPage.newsFeed;
}
/// <summary>
@@ -50,17 +55,6 @@ namespace CampusAppWP8.Pages.News
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if ((NewsIndexPage.newsFeed.Model == null)
|| (NewsIndexPage.newsFeed.Model.Channel == null)
|| (NewsIndexPage.newsFeed.Model.Channel.Count() == 0)
|| (NewsIndexPage.newsFeed.Model.Channel[0].Item == null)
|| (NewsIndexPage.newsFeed.Model.Channel[0].Item.Count() == 0))
{
// Set handler and load the fees informations.
NewsIndexPage.newsFeed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.SetupNewsPageList);
NewsIndexPage.newsFeed.LoadFeed();
}
}
/// <summary>

View File

@@ -11,7 +11,7 @@
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>

View File

@@ -46,14 +46,8 @@ namespace CampusAppWP8.Pages.News
// Set pivotitem Source
if (this.isSourceSet == false)
{
if ((NewsIndexPage.GetNewsFeed.Model != null)
&& (NewsIndexPage.GetNewsFeed.Model.Channel != null)
&& (NewsIndexPage.GetNewsFeed.Model.Channel.Count() >= 1)
&& (this.NewsPivot.Items.Count() == 0))
{
this.NewsPivot.ItemsSource = NewsIndexPage.GetNewsFeed.Model.Channel[0].Item;
this.isSourceSet = true;
}
this.NewsPivot.ItemsSource = NewsIndexPage.GetNewsFeed().Model.Channel[0].Item;
this.isSourceSet = true;
}
string pivotIndex = string.Empty;
@@ -64,7 +58,7 @@ namespace CampusAppWP8.Pages.News
int pivotIndexInt = int.Parse(pivotIndex);
// if the index is in the range of the array
if ((pivotIndexInt >= 0) && (pivotIndexInt < NewsIndexPage.GetNewsFeed.Model.Channel[0].Item.Count()))
if ((pivotIndexInt >= 0) && (pivotIndexInt < NewsIndexPage.GetNewsFeed().Model.Channel[0].Item.Count()))
{
NewsPivot.SelectedIndex = pivotIndexInt;
}

View File

@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.18051
// Laufzeitversion:4.0.30319.18046
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
@@ -78,6 +78,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die EventsFeed.xml ähnelt.
/// </summary>
public static string FileEvents_Name {
get {
return ResourceManager.GetString("FileEvents_Name", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ClubLinks.xml ähnelt.
/// </summary>
@@ -114,6 +123,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die NewsFeed.xml ähnelt.
/// </summary>
public static string FileNews_Name {
get {
return ResourceManager.GetString("FileNews_Name", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die StudentCouncils.xml ähnelt.
/// </summary>
@@ -411,6 +429,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php ähnelt.
/// </summary>
public static string UrlEvents_Addr {
get {
return ResourceManager.GetString("UrlEvents_Addr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.zv.tu-cottbus.de/LSFveranst/LSF4 ähnelt.
/// </summary>
@@ -465,6 +492,15 @@ namespace CampusAppWP8.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php ähnelt.
/// </summary>
public static string UrlNews_Addr {
get {
return ResourceManager.GetString("UrlNews_Addr", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/getdata.php?db=studentcouncils&amp;app=2&amp;appversion=1 ähnelt.
/// </summary>

View File

@@ -251,6 +251,8 @@
</data>
<data name="FileMensa_Shedule" xml:space="preserve">
<value>MensaFeed.xml</value>
<data name="FileEvents_Name" xml:space="preserve">
<value>EventsFeed.xml</value>
</data>
<data name="UrlMensa_Week" xml:space="preserve">
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/</value>
@@ -261,4 +263,13 @@
<data name="UrlOpeningHours_OpeningHours" xml:space="preserve">
<value>http://www.tu-cottbus.de/campusapp-data/getdata.php?db=openinghours&amp;app=2&amp;appversion=1</value>
</data>
<data name="FileNews_Name" xml:space="preserve">
<value>NewsFeed.xml</value>
</data>
<data name="UrlEvents_Addr" xml:space="preserve">
<value>http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_veranstaltungen.php</value>
</data>
<data name="UrlNews_Addr" xml:space="preserve">
<value>http://www.tu-cottbus.de/oracle-gateway/php/rss2feed_aktuelles.php</value>
</data>
</root>

View File

@@ -18,7 +18,6 @@ namespace CampusAppWP8.Model.RSS
/// <summary>
/// RSS feed information item list.
/// </summary>
[XmlElement("item")]
private ObservableCollection<RSSModel> item;
/// <summary>
@@ -32,6 +31,7 @@ namespace CampusAppWP8.Model.RSS
/// <summary>
/// Gets or sets the RSS feed item list.
/// </summary>
[XmlElement("item")]
public ObservableCollection<RSSModel> Item
{
get

View File

@@ -16,11 +16,11 @@ namespace CampusAppWP8.Model.RSS
/// </summary>
public class RSSModel
{
/// <summary>
/// Gets or sets the ListIndex
/// <summary>
/// Index of this object.
/// </summary>
public int Index { get; set; }
private int index = -1;
/// <summary>
/// Title of the fees
/// </summary>
@@ -160,7 +160,23 @@ namespace CampusAppWP8.Model.RSS
}
}
}
/// <summary>
/// Gets or sets the ListIndex.
/// </summary>
public int Index
{
get
{
return this.index;
}
set
{
this.index = value;
}
}
/// <summary>
/// Comparing function for DateTime timestamps.
/// (currently unused)

View File

@@ -7,6 +7,7 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.RSS
{
using System;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
@@ -16,11 +17,14 @@ namespace CampusAppWP8.Model.RSS
[XmlRoot("root")]
public class RSSViewModel
{
/// <summary>
/// Object to store the time when the instance was created.
/// </summary>
private DateTime createTime;
/// <summary>
/// Channel list for the RSS feeds.
/// </summary>
[XmlArray("rss")]
[XmlArrayItem("channel")]
private ObservableCollection<RSSChannelModel> channel;
/// <summary>
@@ -29,11 +33,14 @@ namespace CampusAppWP8.Model.RSS
public RSSViewModel()
{
this.channel = new ObservableCollection<RSSChannelModel>();
this.createTime = DateTime.Now;
}
/// <summary>
/// Gets or sets the channel list.
/// </summary>
[XmlArray("rss")]
[XmlArrayItem("channel")]
public ObservableCollection<RSSChannelModel> Channel
{
get
@@ -49,5 +56,16 @@ namespace CampusAppWP8.Model.RSS
}
}
}
/// <summary>
/// Gets the creation time.
/// </summary>
public DateTime CreateTime
{
get
{
return this.createTime;
}
}
}
}

View File

@@ -0,0 +1,57 @@
//-----------------------------------------------------------------------------
// <copyright file="Utilities.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>16.07.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Utility
{
using System;
public static class Utilities
{
public enum DifferenceType
{
Equal,
Less,
LessEqual,
Greater,
GreaterEqual
};
public static bool DayDifference(DifferenceType type, DateTime date, double totalDiff)
{
bool retValue = false;
TimeSpan diff = DateTime.Now.Subtract(date);
if ((DifferenceType.Less == type) || (DifferenceType.LessEqual == type))
{
if (diff.TotalDays < totalDiff)
{
retValue = true;
}
}
if ((DifferenceType.Greater == type) || (DifferenceType.GreaterEqual == type))
{
if (diff.TotalDays > totalDiff)
{
retValue = true;
}
}
if ((DifferenceType.Equal == type) || (DifferenceType.LessEqual == type) || (DifferenceType.GreaterEqual == type))
{
if (diff.TotalDays == totalDiff)
{
retValue = true;
}
}
return retValue;
}
}
}