From 19c175a881344ee0eeaa5b25f393b2342224b0b2 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 4 Jun 2013 15:16:55 +0200 Subject: [PATCH] add doc to model,feed --- CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj | 54 +++---- .../CampusAppWP8/Feed/Mensa/MensaFeed.cs | 106 +++++++++++++ CampusAppWP8/CampusAppWP8/model/BaseModel.cs | 39 +++-- .../CampusAppWP8/model/BaseViewModel.cs | 39 +++-- .../model/departments/ChairModel.cs | 2 +- .../model/departments/DepartmentModel.cs | 2 +- .../model/departments/DepartmentViewModel.cs | 2 +- .../model/departments/FacultyModel.cs | 2 +- .../CampusAppWP8/model/mensa/MenuModel.cs | 142 ++++++++++++++---- .../CampusAppWP8/model/mensa/MenuWeekModel.cs | 59 +++++--- .../CampusAppWP8/pages/StartPage.xaml | 2 +- .../CampusAppWP8/pages/StartPage.xaml.cs | 2 +- .../pages/campusmap/CampusMapPage.xaml | 2 +- .../pages/campusmap/CampusMapPage.xaml.cs | 2 +- .../pages/departments/DepartmentPage.xaml | 4 +- .../pages/departments/DepartmentPage.xaml.cs | 2 +- .../pages/lecture/LecturePage.xaml | 2 +- .../pages/lecture/LecturePage.xaml.cs | 2 +- .../CampusAppWP8/pages/mensa/MensaFeed.cs | 62 -------- .../CampusAppWP8/pages/mensa/MensaPage.xaml | 3 +- .../pages/mensa/MensaPage.xaml.cs | 116 +++++++++----- .../CampusAppWP8/pages/news/NewsPage.xaml | 2 +- .../CampusAppWP8/pages/news/NewsPage.xaml.cs | 2 +- .../CampusAppWP8/pages/news/RSSItem.cs | 2 +- .../pages/news/RSSNewsTemplate.xaml | 2 +- .../pages/news/RSSNewsTemplate.xaml.cs | 2 +- .../pages/webmail/WebmailPage.xaml | 2 +- .../pages/webmail/WebmailPage.xaml.cs | 2 +- CampusAppWP8/CampusAppWP8/utility/Feed.cs | 6 - .../CampusAppWP8/utility/FeedEventHandler.cs | 8 +- CampusAppWP8/CampusAppWP8/utility/FileList.cs | 2 +- .../CampusAppWP8/utility/FileManager.cs | 10 +- CampusAppWP8/CampusAppWP8/utility/Logger.cs | 4 - CampusAppWP8/CampusAppWP8/utility/URLList.cs | 4 - CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs | 6 +- 35 files changed, 448 insertions(+), 252 deletions(-) create mode 100644 CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs delete mode 100644 CampusAppWP8/CampusAppWP8/pages/mensa/MensaFeed.cs diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj index 847c8020..b5fa33cb 100644 --- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj +++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj @@ -37,6 +37,8 @@ true prompt 4 + + pdbonly @@ -95,38 +97,38 @@ App.xaml - - - - - - - + + + + + + + CampusMapPage.xaml - + DepartmentPage.xaml - + LecturePage.xaml - - - - + + + + MensaPage.xaml - + NewsPage.xaml - - + + RSSNewsTemplate.xaml - + StartPage.xaml - + WebmailPage.xaml @@ -153,35 +155,35 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile - + Designer MSBuild:Compile - + Designer MSBuild:Compile - + MSBuild:Compile Designer - + Designer MSBuild:Compile - + Designer MSBuild:Compile - + Designer MSBuild:Compile - + MSBuild:Compile Designer diff --git a/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs new file mode 100644 index 00000000..4b0c232c --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Feed/Mensa/MensaFeed.cs @@ -0,0 +1,106 @@ +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 03.05.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Pages.Mensa +{ + using System; + using System.Collections.ObjectModel; + using CampusAppWP8.Model.Mensa; + using CampusAppWP8.Utility; + + /// + /// This Class is for MesaFeeds + /// + public class MensaFeed : XmlFeed + { + #region Constructor + + /// + /// Initializes a new instance of the class. + /// + public MensaFeed() + : base(URLList.MensaFeedURL, FileList.MensaXmlFile) + { + } + + #endregion + + #region Proberty + + /// + /// Gets or sets i List of MenuModel + /// + public ObservableCollection Menus { get; set; } + + #endregion + + #region Method + + #region Protected + + /// + /// Method implement CheckIsModelUpToDate()-Method + /// + /// true, if model is up-to-date, otherwise false + protected override bool CheckIsModelUpToDate() + { + DateTime lastModified = this.Model.CreateTime; + return this.CheckIsUpToDate(lastModified); + } + + /// + /// Method implement CheckIsFileUpToDate()-Method + /// + /// true, if file is up-to-date, otherwise false + protected override bool CheckIsFileUpToDate() + { + DateTime lastModified = FileManager.GetFileInfo(FileName).LastWriteTime; + return this.CheckIsUpToDate(lastModified); + } + + #endregion + + #region Private + + /// + /// Method calculate this day of the week, which its gets new menus + /// + /// Date of NewMenuWeekDay + private DateTime CalcNewMenuWeekDay() + { + DateTime now = DateTime.Now; + while (now.DayOfWeek != DayOfWeek.Monday) + { + now = now.Subtract(new TimeSpan(1, 0, 0, 0)); + } + + DateTime monday = new DateTime(now.Year, now.Month, now.Day); + return monday; + } + + /// + /// Method check if the last modification was later as the NewMenuWeekDay + /// + /// Date of the last modification + /// true, if is up-to-date, otherwise false + private bool CheckIsUpToDate(DateTime lastModified) + { + int diff = lastModified.CompareTo(this.CalcNewMenuWeekDay()); + + if (diff < 0) + { + return false; + } + + return true; + } + + #endregion + + #endregion + } +} diff --git a/CampusAppWP8/CampusAppWP8/model/BaseModel.cs b/CampusAppWP8/CampusAppWP8/model/BaseModel.cs index bc8b5dec..28b41b3d 100644 --- a/CampusAppWP8/CampusAppWP8/model/BaseModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/BaseModel.cs @@ -1,22 +1,39 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CampusAppWP8.model +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 03.05.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Model { + using System; + using System.ComponentModel; + + /// + /// This Class provide a basic model + /// + /// + /// not necessary, maybe delete => deprecated + /// public class BaseModel : INotifyPropertyChanged { + /// + /// The PropertyChangedEvent + /// public event PropertyChangedEventHandler PropertyChanged; - public void NotifyPropertyChanged(String propertyName) + + /// + /// Method fire PropertyChangedEvents + /// + /// name of the property + public void NotifyPropertyChanged(string propertyName) { - PropertyChangedEventHandler handler = PropertyChanged; + PropertyChangedEventHandler handler = this.PropertyChanged; if (null != handler) { handler(this, new PropertyChangedEventArgs(propertyName)); } } } -} +} \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs b/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs index ee8974eb..ab34dd78 100644 --- a/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/BaseViewModel.cs @@ -1,18 +1,35 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CampusAppWP8.model +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 03.05.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Model { - public class BaseViewModel: INotifyPropertyChanged + using System; + using System.ComponentModel; + + /// + /// This Class provide a basic ViewModel + /// + /// + /// not necessary, maybe delete => deprecated + /// + public class BaseViewModel : INotifyPropertyChanged { + /// + /// The PropertyChangedEvent + /// public event PropertyChangedEventHandler PropertyChanged; - public void NotifyPropertyChanged(String propertyName) + + /// + /// Method fire PropertyChangedEvents + /// + /// name of the property + public void NotifyPropertyChanged(string propertyName) { - PropertyChangedEventHandler handler = PropertyChanged; + PropertyChangedEventHandler handler = this.PropertyChanged; if (null != handler) { handler(this, new PropertyChangedEventArgs(propertyName)); diff --git a/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs index 16491e78..67b02d11 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/ChairModel.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace CampusAppWP8.model.departments +namespace CampusAppWP8.Model.departments { public class ChairModel : BaseModel { diff --git a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs index 7878092e..0caa7504 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; -namespace CampusAppWP8.model.departments +namespace CampusAppWP8.Model.departments { public class DepartmentModel : BaseModel { diff --git a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs index 0c09acb0..daf6dee8 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/DepartmentViewModel.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace CampusAppWP8.model.departments +namespace CampusAppWP8.Model.departments { public class DepartmentViewModel : BaseViewModel { diff --git a/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs b/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs index 704cfc1b..0ba619e8 100644 --- a/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/departments/FacultyModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; -namespace CampusAppWP8.model.departments +namespace CampusAppWP8.Model.departments { public class FacultyModel : BaseModel { diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs b/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs index 6c02cd64..c72f7a3d 100644 --- a/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/mensa/MenuModel.cs @@ -1,117 +1,193 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; -using CampusAppWP8.Resources; -using CampusAppWP8.Utility; - -namespace CampusAppWP8.model.mensa +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 03.05.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Model.Mensa { + using System; + using System.Xml.Serialization; + using CampusAppWP8.Resources; + + /// + /// Model for menu + /// public class MenuModel { - private string _bio = AppResources.MensaApp_NotToday; - private string _dinner1 = AppResources.MensaApp_NotToday; - private string _dinner2 = AppResources.MensaApp_NotToday; - private string _dinner3 = AppResources.MensaApp_NotToday; - private string _dinner4 = AppResources.MensaApp_NotToday; - private string _action = AppResources.MensaApp_NotToday; + #region Member + /// + /// Name for bio dinner + /// + private string bio = AppResources.MensaApp_NotToday; + + /// + /// Name for 1. dinner + /// + private string dinner1 = AppResources.MensaApp_NotToday; + + /// + /// Name for 2. dinner + /// + private string dinner2 = AppResources.MensaApp_NotToday; + + /// + /// Name for 3. dinner + /// + private string dinner3 = AppResources.MensaApp_NotToday; + + /// + /// Name for 4. dinner + /// + private string dinner4 = AppResources.MensaApp_NotToday; + + /// + /// Name for action dinner + /// + private string action = AppResources.MensaApp_NotToday; + + #endregion + + #region Constructor + + /// + /// Initializes a new instance of the class. + /// public MenuModel() { - } + #endregion + + #region Property + + /// + /// Gets or sets the WeekDay + /// [XmlElement("Wochentag")] public string Day { get; set; } + /// + /// Gets or sets dinner 1 + /// [XmlElement("Essen1")] public string Dinner1 { get { - return _dinner1; + return this.dinner1; } + set { - setValue(value, ref _dinner1); + this.SetValue(value, ref this.dinner1); } } + /// + /// Gets or sets dinner 2 + /// [XmlElement("Essen2")] public string Dinner2 { get { - return _dinner2; + return this.dinner2; } + set { - setValue(value, ref _dinner2); + this.SetValue(value, ref this.dinner2); } } + /// + /// Gets or sets dinner 3 + /// [XmlElement("Essen3")] public string Dinner3 { get { - return _dinner3; + return this.dinner3; } + set { - setValue(value, ref _dinner3); + this.SetValue(value, ref this.dinner3); } } + /// + /// Gets or sets dinner 4 + /// [XmlElement("Essen4")] public string Dinner4 { get { - return _dinner4; + return this.dinner4; } + set { - setValue(value, ref _dinner4); + this.SetValue(value, ref this.dinner4); } } + /// + /// Gets or sets dinner bio + /// [XmlElement("Bio")] public string Bio { get { - return _bio; + return this.bio; } + set { - setValue(value, ref _bio); + this.SetValue(value, ref this.bio); } } + /// + /// Gets or sets dinner action + /// [XmlElement("Aktionstag")] public string Action { get { - return _action; + return this.action; } + set { - setValue(value, ref _action); + this.SetValue(value, ref this.action); } } - private void setValue(string value, ref string property) + #endregion + + #region Method + + /// + /// Methods sets the property + /// + /// maybe move to base class + /// new property value + /// name of the property + private void SetValue(string value, ref string property) { - if (value != null && !String.Empty.Equals(value) && !value.Equals(property)) + if (value != null && !string.Empty.Equals(value) && !value.Equals(property)) { property = value; } } + #endregion } } diff --git a/CampusAppWP8/CampusAppWP8/model/mensa/MenuWeekModel.cs b/CampusAppWP8/CampusAppWP8/model/mensa/MenuWeekModel.cs index 46f48bcb..08ff248b 100644 --- a/CampusAppWP8/CampusAppWP8/model/mensa/MenuWeekModel.cs +++ b/CampusAppWP8/CampusAppWP8/model/mensa/MenuWeekModel.cs @@ -1,28 +1,51 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Serialization; - -namespace CampusAppWP8.model.mensa +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 03.05.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Model.Mensa { + using System; + using System.Collections.ObjectModel; + using System.Xml.Serialization; + + /// + /// Model for menus in one week + /// [XmlRoot("root")] public class MenuWeekModel { - [XmlArray("BTU")] - [XmlArrayItem("Tagesmenu")] - public ObservableCollection menus { get; set; } - - private readonly DateTime _createTime; - - public DateTime CreateTime { get { return _createTime; } } + /// + /// Time when the model was created + /// + private readonly DateTime createTime; + + /// + /// Initializes a new instance of the class. + /// public MenuWeekModel() { - _createTime = DateTime.Now; + this.createTime = DateTime.Now; } - + /// + /// Gets or sets the menus for the week + /// + [XmlArray("BTU")] + [XmlArrayItem("Tagesmenu")] + public ObservableCollection Menus { get; set; } + + /// + /// Gets the creation time of the model + /// + public DateTime CreateTime + { + get + { + return this.createTime; + } + } } } diff --git a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml index 4a9f08d0..42b78fc9 100644 --- a/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/StartPage.xaml @@ -1,5 +1,5 @@  - { - - public MensaFeed() - : base(URLList.MensaFeedURL, FileList.MensaXmlFile) - { - - } - - protected override bool CheckIsModelUpToDate() - { - DateTime lastModified = Model.CreateTime; - return checkIsUpToDate(lastModified); - } - - protected override bool CheckIsFileUpToDate() - { - DateTime lastModified = FileManager.GetFileInfo(FileName).LastWriteTime; - return checkIsUpToDate(lastModified); - } - - - public ObservableCollection menus { get; set; } - - private DateTime calcNewMenuWeekDay() - { - DateTime now = DateTime.Now; - while (now.DayOfWeek != DayOfWeek.Monday) - { - now = now.Subtract(new TimeSpan(1, 0, 0, 0)); - } - DateTime monday = new DateTime(now.Year, now.Month, now.Day); - return monday; - } - - private bool checkIsUpToDate(DateTime lastModified) - { - int diff = lastModified.CompareTo(calcNewMenuWeekDay()); - - if (diff < 0) - { - return false; - } - return true; - } - } -} diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml index e6f1b9f1..a7fa3488 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml @@ -1,5 +1,5 @@  diff --git a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs index 9218aa9a..21688b82 100644 --- a/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/pages/mensa/MensaPage.xaml.cs @@ -1,62 +1,106 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Navigation; -using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; -using CampusAppWP8.Utility; -using System.Xml.Serialization; -using CampusAppWP8.model.mensa; -using System.Xml.Linq; - -namespace CampusAppWP8.pages.mensa +//----------------------------------------------------------------------- +// +// Company copyright tag. +// +// stubbfel +// 03.05.2013 +//---------------------------------------------------------------------- +namespace CampusAppWP8.Pages.Mensa { + using System; + using System.Windows.Navigation; + using CampusAppWP8.Utility; + using Microsoft.Phone.Controls; + + /// + /// Class for the MensaPage + /// public partial class MensaPage : PhoneApplicationPage { + #region Members + /// + /// the feed of the mensa + /// private MensaFeed feed; + + /// + /// Index representing the weekday of today + /// 0 - Monday(Default) + /// 1 - Tuesday + /// 2 - Wednesday + /// 3 - Thursday + /// 4 - Friday + /// private int selectedIndex; + #endregion + #region Constructor + + /// + /// Initializes a new instance of the class. + /// public MensaPage() { - InitializeComponent(); - InitializeFeed(); + this.InitializeComponent(); + this.InitializeFeed(); } + #endregion + + #region Method + + #region protected + + /// + /// Override the OnNavigatedTo method + /// + /// Arguments of navigation protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); - if (feed == null) + if (this.feed == null) { - InitializeFeed(); + this.InitializeFeed(); } - feed.LoadFeed(); + + this.feed.LoadFeed(); } + #region private + + /// + /// Method initialize the Feed + /// private void InitializeFeed() { - feed = new MensaFeed(); - feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(feedIsReady); - calcSelectedIndex(); + this.feed = new MensaFeed(); + this.feed.EventHandler.FeedIsReadyEvent += new FeedEventHandler.FeedReadyHandler(this.FeedIsReady); + this.CalcSelectedIndex(); + } + #endregion + + /// + /// Method will be execute if the feed is ready + /// + private void FeedIsReady() + { + this.SetupMensaPivot(); } - private void feedIsReady() + /// + /// Method set ItemSource and SelectedIndex for the pivot + /// + private void SetupMensaPivot() { - setupMensaPivot(); + this.MensaPivot.ItemsSource = this.feed.Model.Menus; + this.MensaPivot.SelectedIndex = this.selectedIndex; } - private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e) - { - } - private void setupMensaPivot() - { - MensaPivot.ItemsSource = feed.Model.menus; - MensaPivot.SelectedIndex = selectedIndex; - } - private void calcSelectedIndex() + /// + /// Method calculate which pivot has to be selected + /// + private void CalcSelectedIndex() { DayOfWeek today = DateTime.Now.DayOfWeek; int todayIndex; @@ -81,7 +125,11 @@ namespace CampusAppWP8.pages.mensa todayIndex = 0; break; } + this.selectedIndex = todayIndex; } + #endregion + + #endregion } } \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml index 9b105479..fde956e1 100644 --- a/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml +++ b/CampusAppWP8/CampusAppWP8/pages/news/NewsPage.xaml @@ -1,5 +1,5 @@  /// This a abstract Class for reading, store and deserialization Feeds from the Web. diff --git a/CampusAppWP8/CampusAppWP8/utility/FeedEventHandler.cs b/CampusAppWP8/CampusAppWP8/utility/FeedEventHandler.cs index fa60c443..4ea85a84 100644 --- a/CampusAppWP8/CampusAppWP8/utility/FeedEventHandler.cs +++ b/CampusAppWP8/CampusAppWP8/utility/FeedEventHandler.cs @@ -7,14 +7,8 @@ //---------------------------------------------------------------------- namespace CampusAppWP8.Utility { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; - /// - /// This class handle the events of a feed + /// This class handle the events of a feed /// public class FeedEventHandler { diff --git a/CampusAppWP8/CampusAppWP8/utility/FileList.cs b/CampusAppWP8/CampusAppWP8/utility/FileList.cs index de1aef80..428f28ab 100644 --- a/CampusAppWP8/CampusAppWP8/utility/FileList.cs +++ b/CampusAppWP8/CampusAppWP8/utility/FileList.cs @@ -24,6 +24,6 @@ namespace CampusAppWP8.Utility /// /// Name of the file for the feed of the mensa /// - private static readonly string MensaXmlFile = "MesaFeed.xml"; + public static readonly string MensaXmlFile = "MesaFeed.xml"; } } diff --git a/CampusAppWP8/CampusAppWP8/utility/FileManager.cs b/CampusAppWP8/CampusAppWP8/utility/FileManager.cs index 1f9ec797..d3d8b50b 100644 --- a/CampusAppWP8/CampusAppWP8/utility/FileManager.cs +++ b/CampusAppWP8/CampusAppWP8/utility/FileManager.cs @@ -8,15 +8,9 @@ namespace CampusAppWP8.Utility { using System; - using System.Collections.Generic; using System.IO; - using System.IO.IsolatedStorage; - using System.Linq; using System.Text; - using System.Threading.Tasks; using Windows.Storage; - using Windows.Storage.FileProperties; - using Windows.Storage.Streams; /// /// This a static Class, which provide some method for files @@ -33,7 +27,7 @@ namespace CampusAppWP8.Utility #endregion #region public - + /// /// Method write a content to an file /// @@ -56,7 +50,7 @@ namespace CampusAppWP8.Utility { string content = null; - if (ExistsFile(fileName)) + if (!ExistsFile(fileName)) { return null; } diff --git a/CampusAppWP8/CampusAppWP8/utility/Logger.cs b/CampusAppWP8/CampusAppWP8/utility/Logger.cs index 79150c18..69fa2898 100644 --- a/CampusAppWP8/CampusAppWP8/utility/Logger.cs +++ b/CampusAppWP8/CampusAppWP8/utility/Logger.cs @@ -8,10 +8,6 @@ namespace CampusAppWP8.Utility { using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; /// /// This Class creates logs for the app diff --git a/CampusAppWP8/CampusAppWP8/utility/URLList.cs b/CampusAppWP8/CampusAppWP8/utility/URLList.cs index a49c62d9..7f95380e 100644 --- a/CampusAppWP8/CampusAppWP8/utility/URLList.cs +++ b/CampusAppWP8/CampusAppWP8/utility/URLList.cs @@ -8,10 +8,6 @@ namespace CampusAppWP8.Utility { using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; /// /// Class contain some default url of feeds diff --git a/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs b/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs index 0b09f9f4..760d964d 100644 --- a/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs +++ b/CampusAppWP8/CampusAppWP8/utility/XMLFeed.cs @@ -6,12 +6,8 @@ // 03.05.2013 //---------------------------------------------------------------------- namespace CampusAppWP8.Utility -{ +{ using System; - using System.Collections.Generic; - using System.Linq; - using System.Text; - using System.Threading.Tasks; using System.Xml.Linq; using System.Xml.Serialization; using CampusAppWP8.Resources;