241 Commits

Author SHA1 Message Date
stubbfel
30163addaf Merge branch 'release/r#188' into develmaster 2013-09-18 16:23:41 +02:00
stubbfel
2a02529116 Merge branch 'feature/#188' into develop 2013-09-18 14:51:14 +02:00
stubbfel
870b7c1f4c add stylecops 2013-09-18 14:50:59 +02:00
stubbfel
2f5c104860 add docs 2013-09-18 14:50:32 +02:00
stubbfel
a12735674b Merge branch 'hotfix/#194' into develop 2013-09-18 12:02:00 +02:00
stubbfel
1fde76dfd6 Merge branch 'hotfix/#194' into develmaster 2013-09-18 12:01:59 +02:00
stubbfel
d85003bf2a fix Outof Range Exception 2013-09-18 12:01:43 +02:00
stubbfel
4a76622165 fix news issue 2013-09-18 11:52:52 +02:00
stubbfel
a54b1aa095 refactor costasnt and appresource 2013-09-17 16:05:17 +02:00
stubbfel
b92208a947 rm mensa and rssmodel from other projects 2013-09-17 15:42:42 +02:00
stubbfel
ad9bbb2342 add rss and mensa model to plc 2013-09-17 15:32:42 +02:00
stubbfel
98d8a43961 add event and news task 2013-09-17 13:48:37 +02:00
stubbfel
b0a8b8f6af add shcedulagent 2013-09-16 19:11:05 +02:00
stubbfel
e5bde7a95b add TileCreator 2013-09-16 16:32:39 +02:00
stubbfel
c01caf703a fix some mapissue and extend functions 2013-09-16 15:18:43 +02:00
stubbfel
0d6d455c1e Merge branch 'hotfix/#191' into develmaster 2013-09-16 10:56:33 +02:00
stubbfel
98213ff494 Merge branch 'hotfix/#191' into develop 2013-09-16 10:56:33 +02:00
stubbfel
2a6b26a2c1 fix the getPlacesByInformations 2013-09-16 10:56:14 +02:00
stubbfel
8f888c4796 Merge branch 'release/#r' into develop 2013-09-12 16:11:19 +02:00
stubbfel
d276e0984e Merge branch 'release/#r' into develmaster 2013-09-12 16:11:01 +02:00
stubbfel
3bcf6314d5 add doku 2013-09-12 16:07:55 +02:00
stubbfel
2f622c0318 add doku 2013-09-12 16:04:33 +02:00
stubbfel
42ddddfa2b add regions 2013-09-12 16:02:00 +02:00
stubbfel
df4fd8ee3d update Appdll and plib 2013-09-12 12:41:23 +02:00
stubbfel
5fb0d589c1 mv qrreader to devpage 2013-09-12 12:06:50 +02:00
stubbfel
3b4e200daa edit utilities 2013-09-12 11:54:19 +02:00
stubbfel
b6140e240c add new icon to the page 2013-09-12 11:43:18 +02:00
stubbfel
a3a8937028 edit file classes 2013-09-12 10:59:17 +02:00
stubbfel
fbf66ddba0 mv favoritfeed to favoritfile 2013-09-12 10:45:54 +02:00
stubbfel
a065ab4a34 edite checkisupdate method 2013-09-12 10:38:17 +02:00
stubbfel
69a42f300a edit api and assets 2013-09-12 10:06:36 +02:00
stubbfel
f8f6436e2b add filter add placenews 2013-09-11 16:06:23 +02:00
stubbfel
15ebfdd96d Merge branch 'release/r184#136#40' into develop 2013-09-10 16:17:18 +02:00
stubbfel
1ce20feff4 Merge branch 'release/r184#136#40' into develmaster 2013-09-10 16:17:17 +02:00
stubbfel
096abee33a some fixes 2013-09-10 16:17:01 +02:00
stubbfel
9846b8af33 Merge branch 'feature/#136' into develop 2013-09-10 16:09:12 +02:00
stubbfel
6169161180 fix placenews and load courselist in init 2013-09-10 16:08:57 +02:00
stubbfel
eb29dc6aed loade courselist like a Feed 2013-09-10 15:48:48 +02:00
stubbfel
613ccd6d30 fitler by tilte and insert noresultmessage box 2013-09-10 13:32:59 +02:00
stubbfel
b6bdac3211 fix progressbar 2013-09-10 12:23:01 +02:00
stubbfel
2aa1c17e02 Merge branch 'feature/fix184' into develop 2013-09-10 10:28:57 +02:00
stubbfel
220fe3daed fix init 2013-09-10 10:28:44 +02:00
stubbfel
60e4adf264 Merge branch 'release/r#184' into develmaster 2013-09-09 18:42:23 +02:00
stubbfel
fcb5b6a62f add placeNews 2013-09-09 18:39:55 +02:00
stubbfel
d668fc8633 Merge branch 'release/r#135' into develmaster 2013-09-09 11:29:45 +02:00
stubbfel
0e2fa07a5b Merge branch 'feature/#135' into develop 2013-09-09 11:28:17 +02:00
stubbfel
2875d42b2c update stylecop 2013-09-09 11:26:54 +02:00
stubbfel
25f65e4551 finish personsearch 2013-09-09 11:26:19 +02:00
stubbfel
1bb85927a3 add add contact function 2013-09-05 16:24:51 +02:00
stubbfel
f4ef9d8bdb mv apis to Api namespace 2013-09-05 11:21:54 +02:00
stubbfel
671fb09acb Merge branch 'feature/addDLLPr' into develop 2013-09-05 10:53:21 +02:00
stubbfel
a2ea0a10ad add dll project 2013-09-05 10:52:38 +02:00
stubbfel
0505181710 add vaild method to stringmanager 2013-09-04 15:26:35 +02:00
stubbfel
0e66d01395 add personmodel 2013-09-04 15:04:21 +02:00
stubbfel
8534b1e4c8 add personpage 2013-09-03 15:36:24 +02:00
stubbfel
20b1f6f748 add perosnicon 2013-09-03 15:06:08 +02:00
stubbfel
331a1ae901 Merge branch 'release/#135#183' into develmaster 2013-09-03 14:07:13 +02:00
stubbfel
f92442b17e Merge branch 'feature/#135' into develop 2013-09-03 14:04:53 +02:00
stubbfel
54ce4e6ee1 add pdflaunch 2013-09-03 14:04:29 +02:00
stubbfel
90a11179bd change string to byte[] in File.cs and MainModel 2013-09-03 11:18:14 +02:00
stubbfel
557f861774 add exams model and page 2013-09-02 16:44:33 +02:00
stubbfel
6276542c6c add to startpage 2013-09-02 12:38:19 +02:00
stubbfel
18e9373a37 Merge branch 'feature/#182' into develop 2013-09-02 11:13:17 +02:00
stubbfel
e95d0a0ef3 add pngsadd IsUniNetworkAvailable() 2013-09-02 11:13:06 +02:00
stubbfel
c5a9e77973 add icons 2013-09-02 11:12:01 +02:00
stubbfel
530204bfac Merge branch 'release/r#182' into develmaster 2013-08-29 16:09:30 +02:00
stubbfel
82cd8c56a6 Merge branch 'feature/#182' into develop 2013-08-29 16:08:55 +02:00
stubbfel
922147b2fd add pngs 2013-08-29 16:08:34 +02:00
stubbfel
a68593afa1 create function icon 2013-08-29 16:07:12 +02:00
stubbfel
c25d51751f add iconcreator 2013-08-29 13:22:11 +02:00
stubbfel
ad9e2b5011 Merge branch 'release/20130827' into develmaster 2013-08-27 16:13:09 +02:00
stubbfel
11ea79325d startpage is scrollable 2013-08-27 16:10:37 +02:00
stubbfel
fd0c4c7292 Merge branch 'feature/#176' into develop 2013-08-27 14:12:08 +02:00
stubbfel
9c663b30cf add enum to spelling list 2013-08-27 14:11:58 +02:00
stubbfel
504ec3a3e2 add searchplacepin, currentplacepin, hiddenpin 2013-08-27 14:11:22 +02:00
stubbfel
51ff12bafc Merge branch 'feature/#175' into develop 2013-08-27 12:57:36 +02:00
stubbfel
5dbf8b3b2c update ignore 2013-08-27 12:57:13 +02:00
stubbfel
65f4303405 rename WStore8 2013-08-27 12:30:26 +02:00
stubbfel
9ab60b42b1 change GoToMap-Button -> now it use the campusmap 2013-08-27 12:27:33 +02:00
stubbfel
34881642e0 add work folder 2013-08-27 11:37:56 +02:00
stubbfel
75df23cbdd Merge branch 'feature/#154' into develop 2013-08-27 11:23:29 +02:00
stubbfel
c1eadc2452 add getLoadmodus 2013-08-27 11:23:07 +02:00
stubbfel
870b5314ab add onlywifi option 2013-08-27 10:13:59 +02:00
stubbfel
94ce3f1c6e add IsWifiAvailable 2013-08-26 18:35:18 +02:00
stubbfel
b8145a8488 Merge branch 'feature/#156' into develop 2013-08-26 18:19:21 +02:00
stubbfel
ab92e9ca8e Merge branch 'develmaster' of 141.43.76.143:repos/bare/win8phoneApp into develmaster 2013-08-26 18:18:36 +02:00
stubbfel
6bdee3d633 add IsUniNetworkAvailable() 2013-08-26 18:17:51 +02:00
stubbfel
399138ca39 add IsUniNetworkAvailable() 2013-08-26 18:16:49 +02:00
stubbfel
fdbb94e9a3 Merge branch 'release/#174' into develmaster 2013-08-26 17:28:35 +02:00
stubbfel
702f523043 rm icon from lib 2013-08-26 17:27:59 +02:00
stubbfel
5bcbca0cbf rm icon from lib 2013-08-26 17:27:48 +02:00
stubbfel
6e6c6c5517 Merge branch 'feature/#174' into develop 2013-08-26 17:25:59 +02:00
stubbfel
c07910bc34 finish #174 2013-08-26 17:25:42 +02:00
stubbfel
8aca18b37d add resources to plc 2013-08-26 16:50:39 +02:00
stubbfel
fe18f94059 test lib 2013-08-26 15:30:13 +02:00
stubbfel
8bcad4d94e add Portal lib 2013-08-26 15:09:18 +02:00
stubbfel
480073abf1 rename projectmap 2013-08-26 14:56:18 +02:00
stubbfel
62a25a80a1 Merge branch 'release/#169#150' into develmaster 2013-08-26 14:16:40 +02:00
stubbfel
5b912b6803 add devmode 2013-08-26 13:04:57 +02:00
stubbfel
6571239ba6 add new url, and mensalist 2013-08-26 10:54:59 +02:00
Christian Fiedler
ad1e6eb95c Merge branch 'hotfix/QRreader_btn' into develmaster 2013-08-22 16:01:12 +02:00
Christian Fiedler
dd468d83f5 Merge branch 'hotfix/QRreader_btn' into develop 2013-08-22 16:01:12 +02:00
Christian Fiedler
d1b95c133d added qr-reader to startpage appbar 2013-08-22 16:00:42 +02:00
stubbfel
6b56b497d2 Merge branch 'release/#166' into develmaster 2013-08-22 15:37:34 +02:00
stubbfel
7c65aba801 update ignore 2013-08-22 15:36:36 +02:00
stubbfel
9d2da2ee41 Merge branch 'feature/#166' into develop 2013-08-22 15:16:43 +02:00
stubbfel
015abffa6e fixes 2013-08-22 15:16:25 +02:00
stubbfel
50012c8ab9 finish nfcpage 2013-08-22 15:11:59 +02:00
Christian Fiedler
e68667c0aa Merge branch 'release/#168' into develmaster 2013-08-21 17:58:29 +02:00
Christian Fiedler
4d161d5a0f #168 2013-08-21 17:57:24 +02:00
stubbfel
065a8e62c3 end day 2013-08-21 16:34:32 +02:00
stubbfel
ac67505a1d add toNfcString 2013-08-21 15:55:40 +02:00
Christian Fiedler
6c7db0698a Merge branch 'hotfix/#160_#161' into develop 2013-08-21 15:43:21 +02:00
Christian Fiedler
3677988087 Merge branch 'hotfix/#160_#161' into develmaster 2013-08-21 15:43:20 +02:00
Christian Fiedler
47e4b18ce5 #160 #161 2013-08-21 15:42:51 +02:00
stubbfel
dff16799a3 fix messages 2013-08-21 15:26:32 +02:00
stubbfel
e0d1082a93 add NDEFMessage 2013-08-21 11:50:24 +02:00
stubbfel
ebdefaa5e6 add ndefdraft 2013-08-20 16:25:47 +02:00
Christian Fiedler
936f01daf1 Merge branch 'release/#17' into develmaster 2013-08-20 15:56:40 +02:00
Christian Fiedler
d9d8b58f31 Merge branch 'feature/#17' into develop
Conflicts:
	CampusAppWP8/CampusAppWP8/packages.config
2013-08-20 15:55:41 +02:00
Christian Fiedler
f5f2b29f51 reset to StartPage 2013-08-20 15:37:58 +02:00
Christian Fiedler
161db589da #17 2013-08-20 15:32:58 +02:00
stubbfel
b5b3711093 Merge branch 'release/#rcampusmap' into develmaster 2013-08-20 10:55:03 +02:00
stubbfel
f3ff78c6ab Merge branch 'feature/#151' into develop 2013-08-20 10:44:25 +02:00
stubbfel
0e3eac2c6a add offline map 2013-08-20 10:41:43 +02:00
stubbfel
5af71df73f update ignero 2013-08-19 15:48:38 +02:00
stubbfel
51a8e4e515 add placesearch 2013-08-19 15:39:19 +02:00
stubbfel
cbe5325785 mv dispatcher 2013-08-19 11:11:24 +02:00
stubbfel
305737366e update doku 2013-08-15 15:28:20 +02:00
stubbfel
10e1ecb220 Merge branch 'release/#157_#159' into develmaster 2013-08-15 14:42:08 +02:00
stubbfel
15ee2cd3aa change icons in mealmodel 2013-08-15 14:05:03 +02:00
stubbfel
24c4e79c84 Merge branch 'feature/#157' into develop 2013-08-15 13:53:11 +02:00
stubbfel
38fbbfe053 add onfailing to all pages which use MainModel 2013-08-15 13:52:13 +02:00
stubbfel
af62e79351 add failonweb and onfile do mensapage 2013-08-15 13:11:34 +02:00
stubbfel
5fcdeb4d24 Merge branch 'develop' into feature/#157 2013-08-15 13:04:46 +02:00
stubbfel
c1136de32a extend erromsg 2013-08-15 13:04:04 +02:00
stubbfel
fd8ea7ccb7 add errormessgesboxes 2013-08-15 12:58:58 +02:00
Christian Fiedler
71025bee01 Merge branch 'release/#152_#158' into develmaster 2013-08-15 12:26:29 +02:00
Christian Fiedler
143cfd7fae #152 #158 2013-08-15 12:24:02 +02:00
stubbfel
39fa393745 add onFailed to mensaplan 2013-08-15 11:10:49 +02:00
Christian Fiedler
bac1c05e33 Merge branch 'hotfix/onFailedSave_WriteThread' into develop 2013-08-14 14:32:20 +02:00
Christian Fiedler
df584aa524 Merge branch 'hotfix/onFailedSave_WriteThread' into develmaster 2013-08-14 14:32:19 +02:00
Christian Fiedler
504cc8bb50 onFailedSave_WriteThread 2013-08-14 14:32:02 +02:00
Christian Fiedler
ad6e674f4e Merge branch 'hotfix/#126' into develop 2013-08-14 12:49:01 +02:00
Christian Fiedler
c8f4f743f8 Merge branch 'hotfix/#126' into develmaster 2013-08-14 12:49:00 +02:00
Christian Fiedler
5253217de8 #126 and OnFailed callbacks 2013-08-14 12:43:52 +02:00
stubbfel
12743066c2 Merge branch 'release/r#147' into develop 2013-08-13 15:55:17 +02:00
stubbfel
a7bd54f3a8 Merge branch 'release/r#147' into develmaster 2013-08-13 15:55:17 +02:00
stubbfel
fc69f8054f fix startpage 2013-08-13 15:54:57 +02:00
stubbfel
778c22ff39 Merge branch 'feature/#148' into develop 2013-08-13 15:51:51 +02:00
stubbfel
1566f2382d overide geowatcher and add cbmainmapmodel 2013-08-13 15:50:17 +02:00
stubbfel
d7c914eed6 set scale 2013-08-13 10:50:31 +02:00
stubbfel
39b292e3c3 add testmap 2013-08-12 19:32:28 +02:00
stubbfel
270a390807 Merge branch 'release/r#117#146#147' into develmaster 2013-08-12 17:21:29 +02:00
stubbfel
a55c89dd77 change icon 2013-08-12 17:20:04 +02:00
stubbfel
5ce8c21266 Merge branch 'feature/#147' into develop 2013-08-12 17:16:48 +02:00
stubbfel
aad425e2a3 addcampusapi 2013-08-12 17:15:54 +02:00
Christian Fiedler
0bc533353f Merge branch 'hotfix/#117' into develmaster 2013-08-12 16:52:57 +02:00
Christian Fiedler
3a0b7d8b83 Merge branch 'hotfix/#117' into develop 2013-08-12 16:52:57 +02:00
Christian Fiedler
98fba92a17 #117 fixed tiles 2013-08-12 16:52:28 +02:00
stubbfel
f6b2237b20 add all mensafeed 2013-08-12 16:32:16 +02:00
stubbfel
8d03fbc905 add appsettingsite #145 2013-08-12 10:55:59 +02:00
stubbfel
ab58fabc6e Merge branch 'release/r#146' into develmaster 2013-08-08 15:55:30 +02:00
stubbfel
2f99cfd21a # add camupslist 2013-08-08 15:54:33 +02:00
stubbfel
8fc22539be mv userprofil to isalated storage 2013-08-08 15:15:15 +02:00
stubbfel
4a309ad980 Merge branch 'release/r#141' into develmaster 2013-08-08 13:56:34 +02:00
stubbfel
c301f908ad Merge branch 'feature/#141' into develop 2013-08-08 13:55:03 +02:00
stubbfel
6ce158dc41 add optin and doku 2013-08-08 13:51:20 +02:00
stubbfel
e8fe0bb041 new gitignore 2013-08-07 15:17:36 +02:00
stubbfel
b337eefc8c add geowatcher 2013-08-07 15:16:13 +02:00
stubbfel
70d92c7a3b add test access 2013-08-07 11:38:02 +02:00
stubbfel
363baad60c add spsapi 2013-08-06 16:13:29 +02:00
stubbfel
2606e089df Merge branch 'release/r#138#139' into develmaster 2013-08-06 14:53:31 +02:00
stubbfel
a99ff5526c Merge branch 'feature/#138' into develop 2013-08-06 14:11:18 +02:00
stubbfel
64fc09f622 finish 138 2013-08-06 14:11:01 +02:00
stubbfel
a9a96b6ffc instert new mensapp 2013-08-06 14:07:43 +02:00
stubbfel
f79cd5836e add mealmodel 2013-08-06 11:04:43 +02:00
stubbfel
d414e4df47 add fullheaders 2013-08-06 09:46:50 +02:00
stubbfel
4652b82885 Merge branch 'release/#r133' into develmaster 2013-08-05 13:02:56 +02:00
stubbfel
7637b62271 Merge branch 'release/#r133' into develop 2013-08-05 13:02:56 +02:00
stubbfel
55e426f6c2 release fixes 2013-08-05 13:02:39 +02:00
stubbfel
2eea814558 Merge branch 'feature/#133' into develop
Conflicts:
	CampusAppWP8/CampusAppWP8/App.xaml.cs
	CampusAppWP8/CampusAppWP8/Model/Lecture/LecturePageModel.cs
2013-08-05 12:40:14 +02:00
stubbfel
121c728df7 fixes 2013-08-05 11:58:19 +02:00
stubbfel
9a84f847d1 add list to lecture 2013-08-05 11:56:45 +02:00
stubbfel
fa7a84661e finish profilsite 2013-08-05 11:18:32 +02:00
stubbfel
75b6b4501f update20130725 2013-07-25 15:24:24 +02:00
stubbfel
a3014d04c8 add settings to appload 2013-07-25 12:45:56 +02:00
stubbfel
bcceaaaa53 Merge branch 'release/r' into develmaster 2013-07-25 11:08:52 +02:00
stubbfel
6f5496a006 Merge branch 'feature/#refactor' into develop 2013-07-25 11:08:22 +02:00
stubbfel
a366d0e949 formated classes 2013-07-25 11:08:08 +02:00
stubbfel
88320657e9 delete default role and degrre 2013-07-25 10:20:40 +02:00
stubbfel
1136e29034 update gitzignore 2013-07-24 14:00:59 +02:00
stubbfel
759f0a8859 Merge branch 'hotfix/#137' into develop 2013-07-24 12:18:41 +02:00
stubbfel
bf9a612de5 Merge branch 'hotfix/#137' into develmaster 2013-07-24 12:18:14 +02:00
stubbfel
00fb9ca637 update gitzignore 2013-07-24 12:17:58 +02:00
stubbfel
49151c0714 add arrayindex assert 2013-07-24 12:16:48 +02:00
stubbfel
5eedf70604 update gitzignore 2013-07-24 12:12:44 +02:00
stubbfel
c2871bb3d1 add validation userprofile 2013-07-24 11:00:55 +02:00
Christian Fiedler
9abb7de1ec Merge branch 'hotfix/#129' into develop
Conflicts:
	CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs
2013-07-23 16:03:06 +02:00
Christian Fiedler
854dc8b46e Merge branch 'hotfix/#129' into develmaster 2013-07-23 16:02:03 +02:00
Christian Fiedler
96cd4bccb4 #129 2013-07-23 16:01:40 +02:00
stubbfel
6338caea9c add userprofil 2013-07-23 15:35:41 +02:00
Christian Fiedler
3874f2ef06 Merge branch 'hotfix/#123' into develop
Conflicts:
	CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs
2013-07-23 12:39:15 +02:00
Christian Fiedler
c12c76c5ae Merge branch 'hotfix/#123' into develmaster
Conflicts:
	CampusAppWP8/CampusAppWP8/Pages/Openinghours/OpeninghoursPage.xaml.cs
2013-07-23 12:38:00 +02:00
Christian Fiedler
a3c8f3b9fc #123 2013-07-23 12:35:22 +02:00
stubbfel
dadcc2e965 Merge branch 'release/#r128#130#131' into develmaster 2013-07-23 11:55:23 +02:00
stubbfel
175b871005 Merge branch 'feature/#132' into develop 2013-07-23 11:53:44 +02:00
stubbfel
af57bad869 rm api und xmlapi 2013-07-23 11:53:31 +02:00
stubbfel
932842aebb change to XMLModel 2013-07-23 11:40:59 +02:00
stubbfel
125587f99c Merge branch 'hotfix/#131' into develop 2013-07-23 10:57:19 +02:00
stubbfel
1b52f87950 Merge branch 'hotfix/#131' into develmaster 2013-07-23 10:57:18 +02:00
stubbfel
6b8ec1e8b0 fix #131 2013-07-23 10:57:01 +02:00
stubbfel
5788889ae7 add ifnoimmage 2013-07-23 10:32:57 +02:00
stubbfel
6b5341d1ac finish #128 2013-07-23 10:20:10 +02:00
stubbfel
900cb9111a Merge branch 'release/R#125#127' into develmaster 2013-07-22 18:47:22 +02:00
stubbfel
0df8f72c53 finish #127 2013-07-22 18:45:41 +02:00
stubbfel
970c6ce8e8 finish #125 2013-07-22 18:32:01 +02:00
stubbfel
9662be5632 add updatebutton 2013-07-22 17:18:59 +02:00
stubbfel
6a69aec6eb Merge branch 'feature/#121' into develop 2013-07-22 16:30:39 +02:00
stubbfel
dd7ef6e82e rmfile onsaved 2013-07-22 16:26:03 +02:00
Christian Fiedler
3e3b082463 Merge branch 'hotfix/#122' into develmaster 2013-07-22 16:09:15 +02:00
Christian Fiedler
4a5253c25c Merge branch 'hotfix/#122' into develop 2013-07-22 16:09:15 +02:00
Christian Fiedler
a375fe9008 #122 2013-07-22 16:08:52 +02:00
stubbfel
1d434a394f finish #121 2013-07-22 16:01:25 +02:00
Christian Fiedler
5aee5e266a Merge branch 'release/#109' into develmaster 2013-07-22 15:29:58 +02:00
Christian Fiedler
666b6c9730 Merge branch 'feature/#109' into develop 2013-07-22 15:29:30 +02:00
Christian Fiedler
59503f2d23 #109 2013-07-22 15:27:58 +02:00
stubbfel
43cfeea2d7 Merge branch 'release/r#119' into develmaster 2013-07-22 15:09:11 +02:00
stubbfel
d17b4b7e33 Merge branch 'feature/#119' into develop 2013-07-22 15:08:41 +02:00
stubbfel
b78250401c finish #119 2013-07-22 14:46:44 +02:00
Christian Fiedler
d167dbfb9e Merge branch 'release/#120' into develmaster 2013-07-22 13:48:53 +02:00
Christian Fiedler
0072df1186 #120 2013-07-22 13:48:05 +02:00
Christian Fiedler
218353393e Merge branch 'hotfix/#118' into develop 2013-07-22 11:46:46 +02:00
Christian Fiedler
de91ac2d76 Merge branch 'hotfix/#118' into develmaster 2013-07-22 11:46:45 +02:00
Christian Fiedler
74224a4fc5 #118 2013-07-22 11:46:22 +02:00
Christian Fiedler
0ceb0584d1 #115 2013-07-19 17:45:16 +02:00
Christian Fiedler
88b664284f #115 2013-07-19 17:42:55 +02:00
Christian Fiedler
92614e7128 Merge branch 'release/#103' into develmaster 2013-07-19 17:18:45 +02:00
Christian Fiedler
9eff5be228 Merge branch 'feature/#103' into develop 2013-07-19 17:17:12 +02:00
Christian Fiedler
9ebeaa8147 const 2013-07-19 17:16:36 +02:00
Christian Fiedler
b9f268d594 #103 and fixes in events and news 2013-07-19 17:15:47 +02:00
4373 changed files with 228063 additions and 94517 deletions

1
.gitattributes vendored
View File

@@ -25,6 +25,7 @@
*.csproj -text merge=union
*.sln -text merge=union
*.resx -text merge=union
*.StyleCop -text merge=union
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary

146
.gitignore vendored
View File

@@ -161,3 +161,149 @@ winphone/
*.srum
Doxyfile
screenshots/
CampusAppWP8/packages/WPtoolkit.4.2012.10.30/lib/sl3-wp/Microsoft.Phone.Controls.Toolkit.dll
CampusAppWP8/packages/WPtoolkit.4.2012.10.30/lib/sl4-windowsphone71/Microsoft.Phone.Controls.Toolkit.dll
CampusAppWP8/packages/WPtoolkit.4.2012.10.30/lib/wp8/Microsoft.Phone.Controls.Toolkit.dll
CampusAppWP8/packages/BuiltToRoam.Core.Agent.1.0.1.5/BuiltToRoam.Core.Agent.1.0.1.5.nupkg
CampusAppWP8/packages/BuiltToRoam.Core.Agent.1.0.1.5/BuiltToRoam.Core.Agent.1.0.1.5.nuspec
CampusAppWP8/packages/BuiltToRoam.Core.Agent.1.0.1.5/lib/sl4-wp71/AsyncCtpLibrary_Phone.dll
CampusAppWP8/packages/BuiltToRoam.Core.Agent.1.0.1.5/lib/sl4-wp71/BuiltToRoam.Core.Agent.dll
CampusAppWP8/packages/BuiltToRoam.GeoWatcher.1.0.1.5/BuiltToRoam.GeoWatcher.1.0.1.5.nupkg
CampusAppWP8/packages/BuiltToRoam.GeoWatcher.1.0.1.5/BuiltToRoam.GeoWatcher.1.0.1.5.nuspec
CampusAppWP8/packages/BuiltToRoam.GeoWatcher.1.0.1.5/lib/sl4-wp71/BuiltToRoam.GeoWatcher.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/Newtonsoft.Json.4.5.11.nupkg
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/Newtonsoft.Json.4.5.11.nuspec
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/net20/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/net20/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/net35/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/net35/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/net40/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/net40/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/portable-net40+sl4+wp7+win8/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/sl3-wp/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/sl3-wp/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/sl4-windowsphone71/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/sl4-windowsphone71/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/sl4/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/sl4/Newtonsoft.Json.xml
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/winrt45/Newtonsoft.Json.dll
CampusAppWP8/packages/Newtonsoft.Json.4.5.11/lib/winrt45/Newtonsoft.Json.xml
CampusAppWP8/packages/SharpZipLib-WP7.0.86.0.518/SharpZipLib-WP7.0.86.0.518.nupkg
CampusAppWP8/packages/SharpZipLib-WP7.0.86.0.518/SharpZipLib-WP7.0.86.0.518.nuspec
CampusAppWP8/packages/SharpZipLib-WP7.0.86.0.518/lib/sl4-windowsphone71/SharpZipLib.WindowsPhone7.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/WPtoolkit.4.2013.08.16.nupkg
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/WPtoolkit.4.2013.08.16.nuspec
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/content/README_FIRST.txt
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/content/Toolkit.Content/ApplicationBar.Add.png
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/content/Toolkit.Content/ApplicationBar.Cancel.png
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/content/Toolkit.Content/ApplicationBar.Check.png
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/content/Toolkit.Content/ApplicationBar.Delete.png
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/content/Toolkit.Content/ApplicationBar.Select.png
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl3-wp/Microsoft.Phone.Controls.Toolkit.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/Microsoft.Phone.Controls.Toolkit.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/cs-CZ/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/da-DK/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/de-DE/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/el-GR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/en-GB/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/es-ES/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/fi-FI/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/fr-FR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/hu-HU/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/id-ID/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/it-IT/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/ja-JP/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/ko-KR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/ms-MY/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/nb-NO/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/nl-NL/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/pl-PL/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/pt-BR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/ru-RU/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/sv-SE/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/zh-CN/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/sl4-windowsphone71/zh-TW/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/Microsoft.Phone.Controls.Toolkit.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ar-SA/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/az-Latn-AZ/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/be-BY/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/bg-BG/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ca-ES/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/cs-CZ/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/da-DK/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/de-DE/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/el-GR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/en-GB/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/es-ES/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/es-MX/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/et-EE/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/fa-IR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/fi-FI/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/fil-PH/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/fr-CA/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/fr-FR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/he-IL/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/hi-IN/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/hr-HR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/hu-HU/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/id-ID/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/it-IT/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ja-JP/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/kk-KZ/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ko-KR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/lt-LT/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/lv-LV/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/mk-MK/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ms-MY/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/nb-NO/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/nl-NL/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/pl-PL/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/pt-BR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/pt-PT/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ro-RO/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/ru-RU/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/sk-SK/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/sl-SI/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/sq-AL/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/sr-Latn-CS/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/sv-SE/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/th-TH/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/tr-TR/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/uk-UA/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/uz-Latn-UZ/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/vi-VN/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/zh-CN/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/packages/WPtoolkit.4.2013.08.16/lib/wp8/zh-TW/Microsoft.Phone.Controls.Toolkit.resources.dll
CampusAppWP8/Packages.dgml
CampusAppWP8/packages/ZXing.Net.0.11.0.1/ZXing.Net.0.11.0.1.nupkg
CampusAppWP8/packages/ZXing.Net.0.11.0.1/ZXing.Net.0.11.0.1.nuspec
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net20/zxing.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net20/zxing.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net35/zxing.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net35/zxing.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net40/zxing.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net40/zxing.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net40/zxing.presentation.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/net40/zxing.presentation.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/netcore45/ZXing.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/netcore45/ZXing.pri
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/netcore45/ZXing.winmd
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/portable-win+net40+sl4+sl5+wp7+wp71+wp8/zxing.portable.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl3-wp/zxing.wp7.0.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl3-wp/zxing.wp7.0.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl4-wp71/zxing.wp7.1.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl4-wp71/zxing.wp7.1.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl4/zxing.sl4.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl4/zxing.sl4.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl5/zxing.sl5.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/sl5/zxing.sl5.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-managed/zxing.winrt.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-managed/zxing.winrt.dll
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-native+javascript/ZXing.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-native+javascript/ZXing.pri
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-native+javascript/ZXing.winmd
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/wp8/zxing.wp8.0.XML
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/wp8/zxing.wp8.0.dll
work/.svn/

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E4EC5B95-06FC-4304-97E2-9E3F9B980303}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CampusAppDLL</RootNamespace>
<AssemblyName>CampusAppDLL</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
<Compile Include="Model\Campusmap\MapModel.cs" />
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
<Compile Include="Model\GeoDb\PlaceModel.cs" />
<Compile Include="Model\GeoDb\PlaceService.cs" />
<Compile Include="Model\GeoDb\SpsModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utility\Logger.cs" />
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
<Compile Include="Utility\StringManager.cs" />
<Compile Include="Utility\XmlManager.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,45 @@
//-----------------------------------------------------------------------------
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>13.08.2013</sience>
//-----------------------------------------------------------------------------
using CampusAppDLL.Model.GeoDb;
using CampusAppDLL.Utility;
namespace CampusAppDLL.Model.Campusmap
{
/// <summary>
/// Class for the MapModel of the mainCampus of cottbus
/// </summary>
public class CBMainMapModel : MapModel
{
/// <summary>Variable for the identify of the campus.</summary>
private static readonly string Campus = "1";
/// <summary>
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
/// </summary>
public CBMainMapModel(string xmlFilePath) : base(xmlFilePath)
{
}
/// <summary>Loads the spatial./.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected override void LoadSpatials(string xmlFilePath)
{
SpsModel model = XmlManager.DeserializationFileToModel<SpsModel>(xmlFilePath);
this.Spatial = new SpsModel();
foreach (PlaceModel place in model.Places)
{
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
{
this.Spatial.Places.Add(place);
}
}
}
}
}

View File

@@ -0,0 +1,48 @@
//-----------------------------------------------------------------------
// <copyright file="MapModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>24.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Model.Campusmap
{
using CampusAppDLL.Model.GeoDb;
using System;
/// <summary>
/// This Class manage the properties of a Map
/// </summary>
public class MapModel
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="MapModel" /> class.
/// </summary>
public MapModel(string xmlFilePath)
{
this.LoadSpatials(xmlFilePath);
}
#endregion
#region Property
/// <summary>Gets or sets the spatial of the map.</summary>
/// <value>The spatial.</value>
public SpsModel Spatial { get; set; }
#endregion
#region Methods
/// <summary>Loads the spatial./</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected virtual void LoadSpatials(string xmlFilePath)
{
}
#endregion
}
}

View File

@@ -0,0 +1,41 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceInformation.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Information about the place.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
public class PlaceInformation : IEquatable<PlaceInformation>
{
/// <summary>Gets or sets the name of the information.</summary>
/// <value>The name of the information.</value>
[XmlAttribute("placeInformationName")]
public string InformationName { get; set; }
/// <summary>Gets or sets the information value.</summary>
/// <value>The information value.</value>
[XmlText]
public string InformationValue { get; set; }
/// <summary>Tests if this PlaceInformation is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place information to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
public bool Equals(PlaceInformation other)
{
if (other.InformationName.Equals(this.InformationName))
{
return true;
}
return false;
}
}
}

View File

@@ -0,0 +1,167 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Model.GeoDb
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
/// <summary>
/// Model for a place of the SPSService
/// </summary>
public class PlaceModel : IEquatable<PlaceModel>
{
/// <summary>
/// Gets or sets the placeId
/// </summary>
[XmlAttribute("id")]
public string PlaceId { get; set; }
/// <summary>
/// Gets or sets the id of the "parent" of a place
/// </summary>
[XmlAttribute("parentId")]
public string ParentId { get; set; }
/// <summary>
/// Gets or sets the ReferencePoint of a place
/// </summary>
[XmlAttribute("refpoint")]
public string RefPoint { get; set; }
/// <summary>Gets or sets the information.</summary>
/// <value>The information.</value>
[XmlElement("placeInformation")]
public ObservableCollection<PlaceInformation> Informations { get; set; }
/// <summary>Gets or sets the services.</summary>
/// <value>The services.</value>
[XmlElement("placeService")]
public ObservableCollection<PlaceService> Services { get; set; }
/// <summary>Converts this object to a nfc string.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a string.</returns>
public string ToNfcString()
{
string nfcStr = "{\"pid\":\"" + this.PlaceId + "\",\"parent\":\"" + this.ParentId + "\"}";
return nfcStr;
}
/// <summary>Tests if this PlaceModel is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place model to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
public bool Equals(PlaceModel other)
{
if (other.PlaceId.Equals(this.PlaceId))
{
return true;
}
return false;
}
/// <summary>Adds a place informations.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeInformations">The place informations.</param>
public void AddPlaceInformations(List<PlaceInformation> placeInformations)
{
foreach (PlaceInformation info in placeInformations)
{
if (this.Informations.Contains(info))
{
int index = this.Informations.IndexOf(info);
this.Informations[index].InformationValue = info.InformationValue;
}
else
{
this.Informations.Add(info);
}
}
}
/// <summary>Adds a place services.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeServices">The place services.</param>
public void AddPlaceServices(List<PlaceService> placeServices)
{
foreach (PlaceService service in placeServices)
{
if (this.Services.Contains(service))
{
int index = this.Services.IndexOf(service);
this.Services[index].Request = service.Request;
this.Services[index].SAP = service.SAP;
}
else
{
this.Services.Add(service);
}
}
}
/// <summary>Query if 'names' contains information names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="names">The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsInformationNames(List<string> names)
{
foreach (string name in names)
{
bool tmpResult = false;
foreach (PlaceInformation info in this.Informations)
{
if (name.Equals(info.InformationName))
{
tmpResult = true;
break;
}
}
if (!tmpResult)
{
return tmpResult;
}
}
return true;
}
/// <summary>Query if 'services' contains service names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="services">The services.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsServiceNames(List<string> services)
{
foreach (string name in services)
{
bool tmpResult = false;
foreach (PlaceService service in this.Services)
{
if (name.Equals(service.ServiceName))
{
tmpResult = true;
break;
}
}
if (!tmpResult)
{
return tmpResult;
}
}
return true;
}
}
}

View File

@@ -0,0 +1,57 @@
//-----------------------------------------------------------------------------
// <copyright file="PlaceService.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppDLL.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Place service.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
public class PlaceService : IEquatable<PlaceService>
{
/// <summary>Gets or sets the name of the service.</summary>
/// <value>The name of the service.</value>
[XmlAttribute("placeServiceName")]
public string ServiceName { get; set; }
/// <summary>Gets or sets the SAP of an service.</summary>
/// <value>The sap.</value>
[XmlElement("sap")]
public string SAP { get; set; }
/// <summary>Gets or sets the request for a place.</summary>
/// <value>The request.</value>
[XmlElement("request")]
public string Request { get; set; }
/// <summary>Gets the URL string.</summary>
/// <value>The URL string.</value>
public string URLString
{
get
{
return this.SAP + this.Request;
}
}
/// <summary>Tests if this PlaceService is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place service to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
public bool Equals(PlaceService other)
{
if (other.ServiceName.Equals(this.ServiceName))
{
return true;
}
return false;
}
}
}

View File

@@ -0,0 +1,200 @@
//-----------------------------------------------------------------------
// <copyright file="SpsModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Model.GeoDb
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Serialization;
/// <summary>
/// Model for a xml-response of the SPSService
/// </summary>
[XmlRoot("root")]
public class SpsModel
{
/// <summary>Initializes a new instance of the SpsModel class.</summary>
/// <remarks>Stubbfel, 20.08.2013.</remarks>
public SpsModel()
{
this.HasChanged = false;
this.Places = new ObservableCollection<PlaceModel>();
}
/// <summary>
/// Gets or sets a list of places
/// </summary>
[XmlElement("place")]
public ObservableCollection<PlaceModel> Places { get; set; }
/// <summary>Gets a value indicating whether this object has changed.</summary>
/// <value>true if this object has changed, false if not.</value>
public bool HasChanged { get; set; }
/// <summary>Gets places by information.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <param name="query"> The query.</param>
/// <param name="ignoreCases"> (Optional) the ignore cases.</param>
/// <param name="informationName">(Optional) name of the information.</param>
/// <returns>The places by information.</returns>
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, string informationName = null)
{
string querryLow = string.Empty;
IEnumerable<PlaceModel> resultplaces = null;
// select correct statement
if (ignoreCases && informationName == null)
{
querryLow = query.ToLower();
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.ToLower().Contains(querryLow)
select place;
}
else if (ignoreCases && informationName != null)
{
querryLow = query.ToLower();
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.ToLower().Contains(querryLow) && info.InformationName.Equals(informationName)
select place;
}
else if (!ignoreCases && informationName == null)
{
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.Contains(querryLow)
select place;
}
else if (!ignoreCases && informationName != null)
{
resultplaces = from place in this.Places
from info in place.Informations
where info.InformationValue.Contains(querryLow) && info.InformationName.Equals(informationName)
select place;
}
// null assert
if (resultplaces == null)
{
return null;
}
return resultplaces.ToList<PlaceModel>();
}
/// <summary>Adds the places.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="places">A list of places.</param>
public void AddPlaces(List<PlaceModel> places)
{
foreach (PlaceModel place in places)
{
if (this.Places.Contains(place))
{
int index = this.Places.IndexOf(place);
this.Places[index].AddPlaceInformations(place.Informations.ToList());
this.Places[index].AddPlaceServices(place.Services.ToList());
}
else
{
this.Places.Add(place);
}
}
this.HasChanged = true;
}
/// <summary>Creates PID list.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <returns>The new PID list.</returns>
public List<string> CreatePidList()
{
List<string> pidList = new List<string>();
foreach (PlaceModel place in this.Places)
{
pidList.Add(place.PlaceId);
}
return pidList;
}
/// <summary>Gets place by identifier.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="id">The identifier.</param>
/// <returns>The place by identifier.</returns>
public PlaceModel GetPlaceById(string id)
{
foreach (PlaceModel place in this.Places)
{
if (place.PlaceId.Equals(id))
{
return place;
}
}
return null;
}
/// <summary>Query if 'pidList' contains information names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <param name="names"> The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsInformationNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
{
PlaceModel place = this.GetPlaceById(pid);
if (!place.ContainsInformationNames(names))
{
return false;
}
}
return true;
}
/// <summary>Query if 'pidList' contains service names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <param name="names"> The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsServiceNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
{
PlaceModel place = this.GetPlaceById(pid);
if (!place.ContainsServiceNames(names))
{
return false;
}
}
return true;
}
/// <summary>Filter by PID.</summary>
/// <remarks>Stubbfel, 11.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <returns>flitered list of places</returns>
public List<PlaceModel> FilterByPid(List<string> pidList)
{
List<PlaceModel> fitlerList = new List<PlaceModel>();
foreach (PlaceModel place in this.Places)
{
if (pidList.Contains(place.PlaceId))
{
fitlerList.Add(place);
}
}
return fitlerList;
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("CampusAppDLL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CampusAppDLL")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("883d352f-0864-47db-8a04-f5eee0800a6d")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,35 @@
//--------------------------------------------------------------------
// <copyright file="Logger.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Utility
{
using System;
/// <summary>
/// This Class creates logs for the app
/// </summary>
public class Logger
{
/// <summary>
/// Method log a Exception
/// </summary>
/// <param name="exception">exception which has to log</param>
public static void LogException(Exception exception)
{
// Console.WriteLine(exception);
}
/// <summary>
/// Log a message.
/// </summary>
/// <param name="msg">to be logged message</param>
public static void LogMsg(string msg)
{
// Console.WriteLine(msg);
}
}
}

View File

@@ -0,0 +1,154 @@
//-----------------------------------------------------------------------
// <copyright file="NDEFMessage.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>21.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Utility.NDEF
{
using System.Collections.Generic;
using System.IO;
/// <summary>Ndef message.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public class NDEFMessage
{
#region Members
/// <summary>The records.</summary>
private List<NDEFRecord> records;
#endregion
#region constructors
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="content">The content.</param>
/// <param name="type"> The type.</param>
/// <param name="tnf"> (Optional) the tnf.</param>
public NDEFMessage(string content, TYPEVAL type, NDEFRecord.TNFVAL tnf = NDEFRecord.TNFVAL.WKT)
{
this.records = new List<NDEFRecord>();
float recordsCount = (float)content.Length / NDEFRecord.MaxRecordPayLoad;
NDEFRecord tmpRecord = null;
string praefix = NDEFMessage.GetPraefix(type);
for (int i = 0; recordsCount > 0; i++)
{
tmpRecord = new NDEFShortRecord();
tmpRecord.Type = type;
tmpRecord.TNF = tnf;
tmpRecord.PayloadPraefix = praefix;
int recordsize = 255;
if (content.Length < (i + 1) * recordsize)
{
recordsize = content.Length - (i * recordsize);
}
tmpRecord.Payload = content.Substring(i * 255, recordsize);
if (i == 0)
{
tmpRecord.MB = NDEFRecord.NDEFFlags.MBSET;
}
this.records.Add(tmpRecord);
recordsCount--;
}
this.records[this.records.IndexOf(tmpRecord)].ME = NDEFRecord.NDEFFlags.MESET;
}
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="array">The array.</param>
public NDEFMessage(byte[] array)
{
this.records = new List<NDEFRecord>();
NDEFRecord tmpRecord = null;
for (int i = 0; i < array.Length; i += tmpRecord.RecordSize)
{
tmpRecord = new NDEFShortRecord(array, i);
this.records.Add(tmpRecord);
}
}
#endregion
#region enum
/// <summary>Values that represent TYPEVAL.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public enum TYPEVAL
{
/// <summary>An enum constant representing the empty option.</summary>
EMPTY = 0x00,
/// <summary>An enum constant representing the URL option.</summary>
URL = 0x55,
/// <summary>An enum constant representing the text option.</summary>
TEXT = 0x54,
}
#endregion
#region Methods
/// <summary>Gets a praefix.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="type">The type.</param>
/// <returns>The praefix.</returns>
public static string GetPraefix(TYPEVAL type)
{
string praefix = string.Empty;
switch (type)
{
case TYPEVAL.TEXT:
praefix = "\x02" + "de";
break;
case TYPEVAL.URL:
praefix = "\x01";
break;
default:
break;
}
return praefix;
}
/// <summary>Gets the content.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>The content.</returns>
public string GetContent()
{
string result = string.Empty;
foreach (NDEFRecord record in this.records)
{
result += record.Payload;
}
return result;
}
/// <summary>Converts this object to a byte array.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a byte[].</returns>
public byte[] ToByteArray()
{
MemoryStream ms = new MemoryStream();
foreach (NDEFRecord record in this.records)
{
ms.Write(record.ToByteArray(), 0, record.RecordSize);
}
return ms.ToArray();
}
#endregion
}
}

View File

@@ -0,0 +1,188 @@
//-----------------------------------------------------------------------
// <copyright file="NDEFRecord.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>21.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Utility.NDEF
{
using System.IO;
using System.Text;
/// <summary>Ndef record of a NDEFMessage.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public abstract class NDEFRecord
{
#region Members
/// <summary>The maximum record pay load.</summary>
public const int MaxRecordPayLoad = 255;
/// <summary>Size of the type.</summary>
protected const byte TypeSize = 0x01;
#endregion
#region Constructors
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public NDEFRecord()
{
}
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="array">The array.</param>
/// <param name="index">(Optional) zero-based index of the.</param>
public NDEFRecord(byte[] array, int index = 0)
{
this.FormatFlags = array[index];
}
#endregion
#region enum
/// <summary>Values that represent NDEFFlags.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public enum NDEFFlags
{
/// <summary>An Enum constant representing the UNSET option.</summary>
UNSET = 0x00,
/// <summary>An Enum constant representing the Message begin option.</summary>
MBSET = 0x80,
/// <summary>An Enum constant representing the Message end option.</summary>
MESET = 0x40,
/// <summary>An Enum constant representing the CHUNK FLAG option.</summary>
CFSET = 0x20,
/// <summary>An Enum constant representing the Short Record set option.</summary>
SRSET = 0x10,
/// <summary>An Enum constant representing the ID length option.</summary>
ILSET = 0x08,
/// <summary>An enum constant representing the tnfset option.</summary>
TNFSET = 0x03
}
/// <summary>Values that represent TNFVAL.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public enum TNFVAL
{
/// <summary>An enum constant representing the empty option.</summary>
EMPTY = 0x00,
/// <summary>An enum constant representing the Well-Know-Type option.</summary>
WKT = 0x01,
/// <summary>An enum constant representing the MediaType option.</summary>
MEDIATYPE = 0x02,
/// <summary>An enum constant representing the URI option.</summary>
URI = 0x03,
/// <summary>An enum constant representing the NFCE option.</summary>
NFCE = 0x04,
/// <summary>An enum constant representing the unknow option.</summary>
unknow = 0x05,
/// <summary>An enum constant representing the unchanged option.</summary>
UNCHANGED = 0x06,
/// <summary>An enum constant representing the reserved option.</summary>
RESERVED = 0x07
}
#endregion
#region Properties
/// <summary>Gets or sets the MBFlag.</summary>
/// <value>The MBFlag.</value>
public NDEFFlags MB { get; set; }
/// <summary>Gets or sets MEFlag.</summary>
/// <value>The MEFlag .</value>
public NDEFFlags ME { get; set; }
/// <summary>Gets or sets the CFFlag.</summary>
/// <value>The CFFlag.</value>
public NDEFFlags CF { get; set; }
/// <summary>Gets or sets the SRFlag.</summary>
/// <value>The SRFlag.</value>
public NDEFFlags SR { get; set; }
/// <summary>Gets or sets the ILFlag.</summary>
/// <value>The ILFlag.</value>
public NDEFFlags IL { get; set; }
/// <summary>Gets or sets the TNFField.</summary>
/// <value>The TNFField.</value>
public TNFVAL TNF { get; set; }
/// <summary>Gets or sets the type.</summary>
/// <value>The type.</value>
public NDEFMessage.TYPEVAL Type { get; set; }
/// <summary>Gets or sets the format flags.</summary>
/// <value>The format flags.</value>
public byte FormatFlags
{
get
{
return (byte)((byte)this.TNF | ((byte)this.MB) | ((byte)this.ME) | ((byte)this.CF) | ((byte)this.SR) | ((byte)this.IL));
}
protected set
{
this.TNF = (TNFVAL)(value & (byte)NDEFFlags.TNFSET);
this.MB = (NDEFFlags)(value & (byte)NDEFFlags.MBSET);
this.ME = (NDEFFlags)(value & (byte)NDEFFlags.MESET);
this.CF = (NDEFFlags)(value & (byte)NDEFFlags.CFSET);
this.SR = (NDEFFlags)(value & (byte)NDEFFlags.SRSET);
this.IL = (NDEFFlags)(value & (byte)NDEFFlags.ILSET);
}
}
/// <summary>Gets or sets the payload.</summary>
/// <value>The payload.</value>
public string Payload { get; set; }
/// <summary>Gets the size of the record.</summary>
/// <value>The size of the record.</value>
public int RecordSize
{
get
{
return this.HeaderSize + this.Payload.Length + this.PayloadPraefix.Length;
}
}
/// <summary>Gets or sets the payload praefix.</summary>
/// <value>The payload praefix.</value>
public string PayloadPraefix { get; set; }
/// <summary>Gets or sets the size of the header.</summary>
/// <value>The size of the header.</value>
protected int HeaderSize { get; set; }
#endregion
#region Methods
/// <summary>Converts the record to a byte array.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a byte[].</returns>
public abstract byte[] ToByteArray();
#endregion
}
}
// End of Utility\NDEF\NDEFRecord.cs

View File

@@ -0,0 +1,63 @@
//-----------------------------------------------------------------------
// <copyright file="NDEFShortRecord.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>21.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Utility.NDEF
{
using System.Text;
/// <summary>Ndef short record.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public class NDEFShortRecord : NDEFRecord
{
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
public NDEFShortRecord()
{
this.HeaderSize = 4;
this.SR = NDEFFlags.SRSET;
this.IL = NDEFFlags.UNSET;
this.CF = NDEFFlags.UNSET;
}
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <param name="array">The array.</param>
/// <param name="index">(Optional) zero-based index of the.</param>
public NDEFShortRecord(byte[] array, int index = 0)
: base(array)
{
this.HeaderSize = 4;
this.Type = (NDEFMessage.TYPEVAL)array[index + 3];
this.PayloadPraefix = NDEFMessage.GetPraefix(this.Type);
int payLoadSize = array[index + 2] - this.PayloadPraefix.Length;
this.Payload = Encoding.UTF8.GetString(array, index + this.HeaderSize + this.PayloadPraefix.Length, payLoadSize);
}
/// <summary>Converts this NDEFShortRecord to a byte array.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a byte[].</returns>
public override byte[] ToByteArray()
{
byte[] payloadAr = Encoding.UTF8.GetBytes(this.PayloadPraefix + this.Payload);
byte[] array = new byte[payloadAr.Length + this.HeaderSize];
array[0] = this.FormatFlags;
array[1] = NDEFRecord.TypeSize;
array[2] = (byte)(Payload.Length + this.PayloadPraefix.Length);
array[3] = (byte)this.Type;
int i = this.HeaderSize;
foreach (byte b in payloadAr)
{
array[i] = b;
i++;
}
return array;
}
}
}

View File

@@ -5,7 +5,7 @@
// <author>stubbfel</author>
// <sience>06.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Utility
namespace CampusAppDLL.Utility
{
using System.Text.RegularExpressions;
@@ -39,7 +39,7 @@ namespace CampusAppWP8.Utility
/// Method add an Newline to a string
/// </summary>
/// <param name="str">input string</param>
/// <returns>input string + \n</returns>
/// <returns>input string + newline</returns>
public static string AddNewLine(string str)
{
return str.ToString() + "\n";
@@ -49,8 +49,8 @@ namespace CampusAppWP8.Utility
/// Method remove(TrimEND!) an Newline to a string
/// </summary>
/// <param name="str">input string</param>
/// <returns>input string - \n</returns
public static string RemvoveNewLine(string str)
/// <returns>input string - newline</returns
public static string RemoveNewLine(string str)
{
return str.TrimEnd('\n');
}

View File

@@ -0,0 +1,88 @@
//-----------------------------------------------------------------------
// <copyright file="XmlManager.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>18.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppDLL.Utility
{
using System.IO;
using System.Xml.Linq;
using System.Xml.Serialization;
/// <summary>
/// Class provides some Xml-methods
/// </summary>
public class XmlManager
{
/// <summary>
/// Method deserialization a string to a Model
/// </summary>
/// <typeparam name="T">the model</typeparam>
/// <param name="xmlString">the XmlString</param>
/// <param name="validRootName">name of the RootTag</param>
/// <returns>return the deserialization of the model</returns>
public static T DeserializationToModel<T>(string xmlString, string validRootName)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
XDocument document = XDocument.Parse(xmlString);
if (!document.Root.Name.ToString().Equals(validRootName))
{
XElement content = document.Root;
document = new XDocument();
document.Add(new XElement(validRootName, content));
}
T model = (T)serializer.Deserialize(document.CreateReader());
return model;
}
/// <summary>Deserialization a xml file to a model.</summary>
/// <remarks>Stubbfel, 20.08.2013.</remarks>
/// <typeparam name="T">Generic type parameter.</typeparam>
/// <param name="xmlFilePath">Path to the a XmlFile.</param>
/// <returns>model of the XmlFile.</returns>
public static T DeserializationFileToModel<T>(string xmlFilePath)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
XDocument document = XDocument.Load(xmlFilePath);
T model = (T)serializer.Deserialize(document.CreateReader());
return model;
}
/// <summary>
/// Method serializes a model to a string.
/// </summary>
/// <typeparam name="T">type of the model</typeparam>
/// <param name="model">model object</param>
/// <returns>serialized string</returns>
public static string SerializationToString<T>(T model)
{
string retValue = string.Empty;
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add(string.Empty, string.Empty);
XmlSerializer serializer = new XmlSerializer(typeof(T));
TextWriter writer = new StringWriter();
serializer.Serialize(writer, model, ns);
retValue = writer.ToString();
if (retValue.StartsWith("<?xml") == true)
{
int endTag = retValue.IndexOf("?>");
retValue = retValue.Substring(endTag + 2);
if (retValue.StartsWith("\r\n") == true)
{
retValue = retValue.Substring(2);
}
}
return retValue;
}
}
}

View File

@@ -0,0 +1,170 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWStore8", "CampussAppWStore8\CampusAppWStore8.csproj", "{E49420AA-3023-42EF-8255-67B1F5E52B43}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWPortalLib8", "CampusAppWPortalLib8\CampusAppWPortalLib8.csproj", "{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}"
EndProject
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "IconCreator", "IconCreator\IconCreator.pyproj", "{78E8DC22-F4E1-42D9-BA04-93EA031C630C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppDLL", "CampusAppDLL\CampusAppDLL.csproj", "{E4EC5B95-06FC-4304-97E2-9E3F9B980303}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8ScheduledTaskAgent", "CampusAppWP8ScheduledTaskAgent\CampusAppWP8ScheduledTaskAgent.csproj", "{2A51FA6C-791B-4935-B869-FDBA9ED774D7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.ActiveCfg = Debug|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Build.0 = Debug|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Deploy.0 = Debug|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Win32.ActiveCfg = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Win32.Build.0 = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Win32.Deploy.0 = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x64.ActiveCfg = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.ActiveCfg = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Build.0 = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Deploy.0 = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Build.0 = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Deploy.0 = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.ActiveCfg = Release|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Build.0 = Release|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Deploy.0 = Release|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Mixed Platforms.ActiveCfg = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Mixed Platforms.Build.0 = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Mixed Platforms.Deploy.0 = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Win32.ActiveCfg = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Win32.Build.0 = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Win32.Deploy.0 = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x64.ActiveCfg = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.ActiveCfg = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Build.0 = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Deploy.0 = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|ARM.ActiveCfg = Debug|ARM
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|ARM.Build.0 = Debug|ARM
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|ARM.Deploy.0 = Debug|ARM
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Win32.ActiveCfg = Debug|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Win32.Build.0 = Debug|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Win32.Deploy.0 = Debug|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x64.ActiveCfg = Debug|x64
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x64.Build.0 = Debug|x64
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x64.Deploy.0 = Debug|x64
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x86.ActiveCfg = Debug|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x86.Build.0 = Debug|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x86.Deploy.0 = Debug|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Any CPU.Build.0 = Release|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Any CPU.Deploy.0 = Release|Any CPU
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|ARM.ActiveCfg = Release|ARM
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|ARM.Build.0 = Release|ARM
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|ARM.Deploy.0 = Release|ARM
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Mixed Platforms.Build.0 = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Mixed Platforms.Deploy.0 = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Win32.ActiveCfg = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Win32.Build.0 = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Win32.Deploy.0 = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x64.ActiveCfg = Release|x64
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x64.Build.0 = Release|x64
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x64.Deploy.0 = Release|x64
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x86.ActiveCfg = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x86.Build.0 = Release|x86
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x86.Deploy.0 = Release|x86
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|ARM.ActiveCfg = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Win32.ActiveCfg = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|x64.ActiveCfg = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|x86.ActiveCfg = Debug|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Any CPU.Build.0 = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|ARM.ActiveCfg = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Win32.ActiveCfg = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|x64.ActiveCfg = Release|Any CPU
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|x86.ActiveCfg = Release|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|Win32.ActiveCfg = Debug|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|x64.ActiveCfg = Debug|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|x86.ActiveCfg = Debug|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|ARM.ActiveCfg = Release|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|Win32.ActiveCfg = Release|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|x64.ActiveCfg = Release|Any CPU
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|x86.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Win32.ActiveCfg = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|x64.ActiveCfg = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|x86.ActiveCfg = Debug|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Any CPU.Build.0 = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|ARM.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Win32.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|x64.ActiveCfg = Release|Any CPU
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|x86.ActiveCfg = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|ARM.ActiveCfg = Debug|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|ARM.Build.0 = Debug|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Win32.ActiveCfg = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|Win32.Build.0 = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|x86.ActiveCfg = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Debug|x86.Build.0 = Debug|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Any CPU.Build.0 = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|ARM.ActiveCfg = Release|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|ARM.Build.0 = Release|ARM
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Mixed Platforms.Build.0 = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Win32.ActiveCfg = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|Win32.Build.0 = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|x64.ActiveCfg = Release|Any CPU
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|x86.ActiveCfg = Release|x86
{2A51FA6C-791B-4935-B869-FDBA9ED774D7}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,38 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.ActiveCfg = Debug|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Build.0 = Debug|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Deploy.0 = Debug|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.ActiveCfg = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Build.0 = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Deploy.0 = Debug|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Build.0 = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Deploy.0 = Release|Any CPU
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.ActiveCfg = Release|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Build.0 = Release|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Deploy.0 = Release|ARM
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.ActiveCfg = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Build.0 = Release|x86
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,80 @@
//-----------------------------------------------------------------------
// <copyright file="CampusSpsApi.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>12.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Api.GeoApi
{
using System;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Class for SPSAPI
/// </summary>
public class CampusSpsApi : SpsApi
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="CampusSpsApi" /> class.
/// </summary>
public CampusSpsApi()
: base()
{
}
#endregion
#region Method
/// <summary>
/// Method set the UriParameter of a campusRequest for a given latitude and longitude
/// </summary>
/// <param name="lat">latitude parameter</param>
/// <param name="log">longitude parameter</param>
public void SetupCampusRequest(string lat, string log)
{
this.SetupPlaceRequest(lat, log, Constants.SpsApi_CampusDomain);
}
/// <summary>
/// Method set the UriParameter of a campusRequest for the actualPosition
/// </summary>
public void SetupCurrentCampusRequest()
{
Utilities.DetermineAndStoreCurrentPosition();
string lat = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Lat);
string log = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Long);
this.SetupCampusRequest(lat, log);
}
/// <summary>
/// Method return the campus of the placeList
/// </summary>
/// <returns>actual campus</returns>
public CampusAppWP8.Model.Setting.UserProfilModel.Campus GetCampus()
{
if (this.Model == null)
{
return Settings.UserProfil.DefaultCampus;
}
CampusAppWP8.Model.Setting.UserProfilModel.Campus campus;
foreach (PlaceModel place in this.Model.Places)
{
if (Enum.TryParse(place.PlaceId, true, out campus))
{
return campus;
}
}
return Settings.UserProfil.DefaultCampus;
}
#endregion
}
}

View File

@@ -0,0 +1,65 @@
//-----------------------------------------------------------------------
// <copyright file="PisApi.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>09.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Api.GeoApi
{
using System.Collections.Generic;
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>Pis api.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
public class PisApi : XmlModel<SpsModel>
{
#region Constructor
/// <summary>Initializes a new instance of the PisApi class.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
public PisApi()
: base(ModelType.Feed, Constants.UrlPisService)
{
}
#endregion
#region Method
/// <summary>Sets up the information request.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList"> List of pids.</param>
/// <param name="infoNames">(Optional) list of names of the information.</param>
public void SetupInformationRequest(List<string> pidList, List<string> infoNames = null)
{
string pidListStr = string.Empty;
foreach (string pid in pidList)
{
pidListStr += "/" + pid;
}
List<UrlParamModel> parameterList = new List<UrlParamModel>();
parameterList.Add(new CleanUrlParamModel(Constants.PisApi_PidListKey, pidListStr.Trim('/')));
if (infoNames != null)
{
string infoNamesStr = string.Empty;
foreach (string name in infoNames)
{
infoNamesStr += "/" + name;
}
parameterList.Add(new CleanUrlParamModel(Constants.PisApi_InformationNameKey, infoNamesStr.Trim('/')));
}
this.SetUriParams(parameterList);
}
#endregion
}
}

View File

@@ -0,0 +1,65 @@
//-----------------------------------------------------------------------
// <copyright file="PssApi.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>09.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Api.GeoApi
{
using System.Collections.Generic;
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>Pss api.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
public class PssApi : XmlModel<SpsModel>
{
#region Constructor
/// <summary>Initializes a new instance of the PssApi class.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
public PssApi()
: base(ModelType.Feed, Constants.UrlPssService)
{
}
#endregion
#region Method
/// <summary>Sets up the service request.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList"> List of pids.</param>
/// <param name="serviceNames">(Optional) list of names of the services.</param>
public void SetupServiceRequest(List<string> pidList, List<string> serviceNames = null)
{
string pidListStr = string.Empty;
foreach (string pid in pidList)
{
pidListStr += "/" + pid;
}
List<UrlParamModel> parameterList = new List<UrlParamModel>();
parameterList.Add(new CleanUrlParamModel(Constants.PssApi_PidListKey, pidListStr.Trim('/')));
if (serviceNames != null)
{
string serviceNamesStr = string.Empty;
foreach (string name in serviceNames)
{
serviceNamesStr += "/" + name;
}
parameterList.Add(new CleanUrlParamModel(Constants.PssApi_ServiceNameKey, serviceNamesStr.Trim('/')));
}
this.SetUriParams(parameterList);
}
#endregion
}
}

View File

@@ -0,0 +1,69 @@
//-----------------------------------------------------------------------
// <copyright file="SpsApi.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>06.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Api.GeoApi
{
using System.Collections.Generic;
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Utility;
/// <summary>
/// Class for SPSAPI
/// </summary>
public class SpsApi : XmlModel<SpsModel>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="SpsApi" /> class.
/// </summary>
public SpsApi()
: base(ModelType.Feed, Constants.UrlSpsService)
{
}
#endregion
#region Method
/// <summary>
/// Method set the UriParameter of a placeRequest for a given latitude and longitude
/// </summary>
/// <param name="lat">latitude of the place</param>
/// <param name="log">longitude of the place</param>
/// <param name="domian">request domain</param>
public void SetupPlaceRequest(string lat, string log, string domian = null)
{
List<UrlParamModel> parameterList = new List<UrlParamModel>();
parameterList.Add(new CleanUrlParamModel(Constants.SpsApi_LatitudeParaKey, lat));
parameterList.Add(new CleanUrlParamModel(Constants.SpsApi_LongitudeParaKey, log));
if (domian != null)
{
parameterList.Add(new CleanUrlParamModel(Constants.SpsApi_DomainParaKey, domian));
}
this.SetUriParams(parameterList);
}
/// <summary>Sets up the current place request.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="domian">(Optional) request domain.</param>
public void SetupCurrentPlaceRequest(string domian = null)
{
Utilities.DetermineAndStoreCurrentPosition();
string lat = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Lat);
string log = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Long);
this.SetupPlaceRequest(lat, log, domian);
}
#endregion
}
}

View File

@@ -5,12 +5,11 @@
// <author>stubbfel</author>
// <sience>13.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Lecture
namespace CampusAppWP8.Api.Lecture
{
using System;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Lecture;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Class for the feed of the Lecture
@@ -18,15 +17,19 @@ namespace CampusAppWP8.Feed.Lecture
/// <remarks>
/// need the XmlAPI
/// </remarks>
public class LectureApi : XmlApi<LectureList>
public class LectureApi : XmlModel<LectureList>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="LectureApi" /> class.
/// </summary>
public LectureApi()
: base(new Uri(Constants.UrlLecture_ApiBaseAddr))
: base(ModelType.Feed, Constants.UrlLecture_ApiBaseAddr)
{
this.ValidRootName = Constants.LectureXmlValidRootName;
}
#endregion
}
}

View File

@@ -0,0 +1,31 @@
//-----------------------------------------------------------------------------
// <copyright file="PersonSearchApi.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>05.09.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Api.Person
{
using CampusAppWP8.Model;
using CampusAppWP8.Model.Person;
using CampusAppWP8.Resources;
/// <summary>Person search api.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public class PersonSearchApi : XmlModel<PersonListModel>
{
#region Constructor
/// <summary>Initializes a new instance of the PersonSearchApi class.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public PersonSearchApi()
: base(ModelType.Feed, Constants.UrlPerson_PersonSearchByName)
{
this.ValidRootName = Constants.PersonListValidRootName;
}
#endregion
}
}

View File

@@ -23,7 +23,7 @@
<Application.ApplicationLifetimeObjects>
<!--Erforderliches Objekt, das Lebensdauerereignisse der Anwendung behandelt-->
<shell:PhoneApplicationService
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects>

View File

@@ -1,13 +1,16 @@
using System;
using CampusAppWP8.Model.Setting;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Net.NetworkInformation;
using Microsoft.Phone.Shell;
using System;
using System.Diagnostics;
using System.Resources;
using System.IO.IsolatedStorage;
using System.Threading;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CampusAppWP8.Resources;
using System.IO.IsolatedStorage;
namespace CampusAppWP8
@@ -84,10 +87,11 @@ namespace CampusAppWP8
public static T LoadFromIsolatedStorage<T>(string key)
{
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
if(isolatedStore.Contains(key)) {
if (isolatedStore.Contains(key))
{
object value = isolatedStore[key];
return (T)value;
return (T)value;
}
return default(T);
}
@@ -124,16 +128,63 @@ namespace CampusAppWP8
}
return default(T);
}
// Code, der beim Starten der Anwendung ausgeführt werden soll (z. B. über "Start")
// Dieser Code wird beim Reaktivieren der Anwendung nicht ausgeführt
private void Application_Launching(object sender, LaunchingEventArgs e)
{
this.LoadSettings();
}
/// <summary>
/// Load the appsettings from the store
/// </summary>
private void LoadSettings()
{
if (Debugger.IsAttached)
{
Settings.AppSetting.DevMode = true;
}
else
{
Settings.AppSetting.DevMode = false;
}
this.UserSettingsLoaded();
Settings.AppSetting.UniNetwork = Utilities.IsUniNetworkAvailable();
if (!Settings.AppSetting.UniNetwork)
{
Settings.AppSetting.WifiEnable = Utilities.IsWifiAvailable();
}
else
{
Settings.AppSetting.WifiEnable = true;
}
if (Settings.AppSetting.GeoWatchEnable)
{
Thread thread = new Thread(new ThreadStart(Utilities.DetermineAndStoreCurrentPositionForce));
thread.Start();
}
}
/// <summary>
/// Load the usersettings from the store
/// </summary>
private void UserSettingsLoaded()
{
if (Settings.UserProfil == null)
{
Settings.UserProfil = new UserProfilModel();
}
}
// Code, der ausgeführt werden soll, wenn die Anwendung aktiviert wird (in den Vordergrund gebracht wird)
// Dieser Code wird beim ersten Starten der Anwendung nicht ausgeführt
private void Application_Activated(object sender, ActivatedEventArgs e)
{
this.LoadSettings();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -32,7 +32,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<DefineConstants>TRACE;DEBUG;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
@@ -93,11 +93,80 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Api\GeoApi\CampusSpsApi.cs" />
<Compile Include="Api\GeoApi\PisApi.cs" />
<Compile Include="Api\GeoApi\PssApi.cs" />
<Compile Include="Api\GeoApi\SpsApi.cs" />
<Compile Include="Api\Person\PersonSearchApi.cs" />
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="Feed\Departments\DepartmentFavoriteFeed.cs" />
<Compile Include="File\Departments\DepartmentFavoriteFile.cs" />
<Compile Include="Const.cs" />
<Compile Include="Feed\Exams\ExamFeed.cs" />
<Compile Include="Feed\Mensa\MensaFeedSBFMain.cs" />
<Compile Include="Feed\Mensa\MensaFeedCBSouth.cs" />
<Compile Include="Feed\Mensa\MensaFeedCBNorth.cs" />
<Compile Include="Feed\Mensa\MensaFeedCBMain.cs" />
<Compile Include="Feed\Utility\CourseFeed.cs" />
<Compile Include="File\Exams\ExamFile.cs" />
<Compile Include="File\Places\PlacesFile.cs" />
<Compile Include="Model\BinaryModel.cs" />
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
<Compile Include="Model\Campusmap\CurrentPositionPinModel.cs" />
<Compile Include="Model\Campusmap\HiddenPinPlaceModel.cs" />
<Compile Include="Model\Campusmap\SearchPlacePinModel.cs" />
<Compile Include="Model\Exams\ExamListModel.cs" />
<Compile Include="Model\Exams\ExamModel.cs" />
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
<Compile Include="Model\GeoDb\PlaceModel.cs" />
<Compile Include="Model\GeoDb\PlaceService.cs" />
<Compile Include="Model\GeoDb\SpsModel.cs" />
<Compile Include="Model\Person\PersonFunctionModel.cs" />
<Compile Include="Model\Person\PersonListModel.cs" />
<Compile Include="Model\Person\PersonModel.cs" />
<Compile Include="Model\Setting\AppSettings.cs" />
<Compile Include="Model\Setting\UserProfilModel.cs" />
<Compile Include="Model\Utility\CourseListPickerItemListModel.cs" />
<Compile Include="Model\Utility\CourseModel.cs" />
<Compile Include="Model\Utility\DegreeListPickerItemListModel.cs" />
<Compile Include="Model\Utility\CampusListPickerItemListModel.cs" />
<Compile Include="Pages\Exams\Exams.xaml.cs">
<DependentUpon>Exams.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Person\PersonPage.xaml.cs">
<DependentUpon>PersonPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\PlaceNews\PlaceNews.xaml.cs">
<DependentUpon>PlaceNews.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\PlaceNews\ShowPad.xaml.cs">
<DependentUpon>ShowPad.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\BackgroundTasks.cs" />
<Compile Include="Utility\Lui\Button\AddPersonButton.cs" />
<Compile Include="Utility\Lui\Tiles\TileCreator.cs" />
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
<Compile Include="Model\Utility\RoleListPickerItemListModel.cs" />
<Compile Include="Model\Utility\SemesterListPickerItemListModel.cs" />
<Compile Include="Model\Utility\ListPickerItemListModel.cs" />
<Compile Include="Pages\Dev\NFC.xaml.cs">
<DependentUpon>NFC.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Setting\AppSettingPage.xaml.cs">
<DependentUpon>AppSettingPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Setting\UserProfil.xaml.cs">
<DependentUpon>UserProfil.xaml</DependentUpon>
</Compile>
<Compile Include="Resources\Icons.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Icons.tt</DependentUpon>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="Utility\Lui\Button\EmailButton.cs" />
<Compile Include="Feed\Link\CommonLinkFeed.cs" />
<Compile Include="Feed\Link\ClubLinkFeed.cs" />
@@ -109,8 +178,6 @@
<Compile Include="Model\Departments\ChairModel.cs" />
<Compile Include="Model\Departments\DepartmentModel.cs" />
<Compile Include="Model\Departments\FacultyModel.cs" />
<Compile Include="Model\RSS\RSSChannelModel.cs" />
<Compile Include="Model\RSS\RSSViewModel.cs" />
<Compile Include="Model\Lecture\LectureActivity.cs" />
<Compile Include="Model\Lecture\LectureCourse.cs" />
<Compile Include="Model\Lecture\LectureDate.cs" />
@@ -121,13 +188,10 @@
<Compile Include="Model\MainModel.cs" />
<Compile Include="Model\Link\LinkModel.cs" />
<Compile Include="Model\Link\LinkListModel.cs" />
<Compile Include="Model\Mensa\MenuModel.cs" />
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
<Compile Include="Model\Openinghours\OpeninghoursInstitutionModel.cs" />
<Compile Include="Model\Openinghours\OpeninghoursModel.cs" />
<Compile Include="Model\StudentCouncil\StudentCouncilListModel.cs" />
<Compile Include="Model\StudentCouncil\StudentCouncilModel.cs" />
<Compile Include="Model\Utility\UrlParamModel.cs" />
<Compile Include="Model\XmlModel.cs" />
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
<DependentUpon>CampusMapPage.xaml</DependentUpon>
@@ -180,7 +244,6 @@
<Compile Include="Pages\News\NewsPage.xaml.cs">
<DependentUpon>NewsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Model\RSS\RSSModel.cs" />
<Compile Include="Pages\Openinghours\OpeninghoursPage.xaml.cs">
<DependentUpon>OpeninghoursPage.xaml</DependentUpon>
</Compile>
@@ -204,28 +267,23 @@
<DesignTime>True</DesignTime>
<DependentUpon>Constants.resx</DependentUpon>
</Compile>
<Compile Include="Resources\Icons.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Icons.resx</DependentUpon>
</Compile>
<Compile Include="ThemelizedIcons.cs" />
<Compile Include="Utility\Api.cs" />
<Compile Include="Utility\ApiEventHandler.cs" />
<Compile Include="Utility\File.cs" />
<Compile Include="Utility\Logger.cs" />
<Compile Include="Utility\HttpRequest.cs" />
<Compile Include="Utility\Lui\Button\GoToMapButton.cs" />
<Compile Include="Utility\Lui\Button\UpdateButtonAppBar.cs" />
<Compile Include="Utility\Lui\Button\ToggleButton.cs" />
<Compile Include="Utility\Lui\Button\NavigateButton.cs" />
<Compile Include="Utility\Lui\Button\PhoneButton.cs" />
<Compile Include="Utility\Lui\Button\LinkButton.cs" />
<Compile Include="Utility\StringManager.cs" />
<Compile Include="Utility\Lui\MessageBoxes\MessageBoxes.cs" />
<Compile Include="Pages\Dev\QRScanner.xaml.cs">
<DependentUpon>QRScanner.xaml</DependentUpon>
</Compile>
<Compile Include="Utility\Wp8StringManager.cs" />
<Compile Include="Utility\Utilities.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Utility\XmlApi.cs" />
<Compile Include="Utility\XmlManager.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
@@ -252,6 +310,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dev\NFC.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Exams\Exams.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Lecture\LecturePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -296,6 +362,26 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Person\PersonPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\PlaceNews\PlaceNews.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\PlaceNews\ShowPad.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Setting\AppSettingPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Setting\UserProfil.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="pages\StartPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -316,6 +402,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Dev\QRScanner.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Assets\psd\holo_optionsbuttons.psd" />
@@ -325,30 +415,50 @@
<None Include="Properties\WMAppManifest.xml">
<SubType>Designer</SubType>
</None>
<None Include="Resources\Icons.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Icons.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\AlignmentGrid.png" />
<Content Include="Assets\ApplicationIcon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\campusmap.png" />
<Content Include="Assets\Icons\DarkTheme\add_159.png" />
<Content Include="Assets\Icons\DarkTheme\add_contact_159.png" />
<Content Include="Assets\Icons\DarkTheme\btulogo_159.png" />
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
<Content Include="Assets\Icons\DarkTheme\current_position_159.png" />
<Content Include="Assets\Icons\DarkTheme\delete_159.png" />
<Content Include="Assets\Icons\DarkTheme\exams_159.png" />
<Content Include="Assets\Icons\DarkTheme\favorite_159.png" />
<Content Include="Assets\Icons\DarkTheme\info_159.png" />
<Content Include="Assets\Icons\DarkTheme\lab_159.png" />
<Content Include="Assets\Icons\DarkTheme\lecture_159.png" />
<Content Include="Assets\Icons\DarkTheme\person_159.png" />
<Content Include="Assets\Icons\DarkTheme\phone_159.png" />
<Content Include="Assets\Icons\DarkTheme\practise_159.png" />
<Content Include="Assets\Icons\DarkTheme\search_place_159.png" />
<Content Include="Assets\Icons\DarkTheme\seminar_159.png" />
<Content Include="Assets\Icons\DarkTheme\update_159.png" />
<Content Include="Assets\Icons\LightTheme\add_159.png" />
<Content Include="Assets\Icons\LightTheme\add_contact_159.png" />
<Content Include="Assets\Icons\LightTheme\btulogo_159.png" />
<Content Include="Assets\Icons\LightTheme\campus_159.png" />
<Content Include="Assets\Icons\DarkTheme\departments_159.png" />
<Content Include="Assets\Icons\LightTheme\current_position_159.png" />
<Content Include="Assets\Icons\LightTheme\delete_159.png" />
<Content Include="Assets\Icons\LightTheme\departments_159.png" />
<Content Include="Assets\Icons\DarkTheme\homework_159.png" />
<Content Include="Assets\Icons\LightTheme\exams_159.png" />
<Content Include="Assets\Icons\LightTheme\favorite_159.png" />
<Content Include="Assets\Icons\LightTheme\homework_159.png" />
<Content Include="Assets\Icons\DarkTheme\link_159.png" />
<Content Include="Assets\Icons\LightTheme\info_159.png" />
<Content Include="Assets\Icons\LightTheme\lab_159.png" />
<Content Include="Assets\Icons\LightTheme\lecture_159.png" />
<Content Include="Assets\Icons\LightTheme\link_159.png" />
<Content Include="Assets\Icons\DarkTheme\lectures_159.png" />
<Content Include="Assets\Icons\LightTheme\lectures_159.png" />
@@ -359,13 +469,18 @@
<Content Include="Assets\Icons\DarkTheme\openhours_159.png" />
<Content Include="Assets\Icons\LightTheme\openhours_159.png" />
<Content Include="Assets\Icons\DarkTheme\schedule_159.png" />
<Content Include="Assets\Icons\LightTheme\person_159.png" />
<Content Include="Assets\Icons\LightTheme\phone_159.png" />
<Content Include="Assets\Icons\LightTheme\practise_159.png" />
<Content Include="Assets\Icons\LightTheme\schedule_159.png" />
<Content Include="Assets\Icons\DarkTheme\search_159.png" />
<Content Include="Assets\Icons\LightTheme\search_159.png" />
<Content Include="Assets\Icons\DarkTheme\student_council_159.png" />
<Content Include="Assets\Icons\LightTheme\search_place_159.png" />
<Content Include="Assets\Icons\LightTheme\seminar_159.png" />
<Content Include="Assets\Icons\LightTheme\student_council_159.png" />
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
<Content Include="Assets\Icons\LightTheme\update_159.png" />
<Content Include="Assets\Icons\LightTheme\webmail_159.png" />
<Content Include="Assets\testmap.png" />
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
@@ -383,7 +498,14 @@
<Content Include="Assets\Tiles\IconicTileSmall.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\kachel_large.png" />
<Content Include="Assets\Tiles\kachel_medium.png" />
<Content Include="Assets\Tiles\kachel_small.png" />
<Content Include="File\Campusmap\Offlinemap.xml">
<SubType>Designer</SubType>
</Content>
<Content Include="README_FIRST.txt" />
<Content Include="Toolkit.Content\ApplicationBar.Add.png" />
<Content Include="Toolkit.Content\ApplicationBar.Cancel.png" />
<Content Include="Toolkit.Content\ApplicationBar.Check.png" />
<Content Include="Toolkit.Content\ApplicationBar.Delete.png" />
@@ -400,19 +522,33 @@
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Icons.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
<None Include="Resources\Icons.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Phone.Controls.Toolkit">
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
<Reference Include="Microsoft.Phone.Controls.Toolkit, Version=8.0.1.0, Culture=neutral, PublicKeyToken=b772ad94eb9ca604, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
</Reference>
<Reference Include="zxing.wp8.0">
<HintPath>..\packages\ZXing.Net.0.11.0.1\lib\wp8\zxing.wp8.0.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CampusAppWP8ScheduledTaskAgent\CampusAppWP8ScheduledTaskAgent.csproj">
<Project>{2A51FA6C-791B-4935-B869-FDBA9ED774D7}</Project>
<Name>CampusAppWP8ScheduledTaskAgent</Name>
</ProjectReference>
<ProjectReference Include="..\CampusAppWPortalLib8\CampusAppWPortalLib8.csproj">
<Project>{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}</Project>
<Name>CampusAppWPortalLib8</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@@ -14,11 +14,17 @@ namespace CampusAppWP8
/// </summary>
public class Const
{
#region Member
/// <summary>
/// Resource object.
/// </summary>
private static Constants constantResources = new Constants();
#endregion
#region Property
/// <summary>
/// Gets the resource object.
/// </summary>
@@ -29,5 +35,7 @@ namespace CampusAppWP8
return constantResources;
}
}
#endregion
}
}

View File

@@ -1,93 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="DepartmentFavoriteFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>01.07.2013</sience>
//----------------------------------------------------------------------using System;
namespace CampusAppWP8.Feed.Departments
{
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Departments;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Feed object to handle favorite department feeds.
/// </summary>
public class DepartmentFavoriteFeed : XmlModel<DepartmentModel>
{
#region Constructor
/// <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)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
if (autoLoad == true)
{
this.LoadData();
}
}
// Constructor
#endregion
#region Method
#region Protected
/// <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)
|| (model.Faculties == null)
|| (model.Faculties.Count != 1))
{
retValue = false;
}
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>
private bool CheckIsFileUpToDate(DepartmentModel model, FileInfo info)
{
bool retValue = false;
if (this.Model == null)
{
retValue = true;
}
else
{
retValue = (model.HasChanged() == false) ? true : false;
}
return retValue;
}
// Protected
#endregion
// Method
#endregion
}
}

View File

@@ -7,6 +7,7 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Departments
{
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Departments;
@@ -27,8 +28,9 @@ namespace CampusAppWP8.Feed.Departments
public DepartmentFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileDepartment_Name, Constants.UrlDepartment_Addr)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
if (autoLoad == true)
{
@@ -41,8 +43,6 @@ namespace CampusAppWP8.Feed.Departments
#region Method
#region Protected
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
/// </summary>
@@ -58,7 +58,7 @@ namespace CampusAppWP8.Feed.Departments
}
else
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 7.0);
retValue = this.CheckIsUpToDate(model.CreateTime);
}
return retValue;
@@ -70,7 +70,7 @@ namespace CampusAppWP8.Feed.Departments
/// <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)
private bool CheckIsFileUpToDateOnLoad(DepartmentModel model, FileInfo info)
{
bool retValue = true;
@@ -79,24 +79,46 @@ namespace CampusAppWP8.Feed.Departments
// at loading
if (info.Exists == true)
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 7.0);
}
}
else
{
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
}
return retValue;
}
// Protedted
#endregion
/// <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 CheckIsFileUpToDateOnSave(DepartmentModel model, FileInfo info)
{
bool retValue = true;
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
if (model != null && model.HasChanged())
{
retValue = false;
}
return retValue;
}
/// <summary>Check if the model or file is up-to-date.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <param name="lastModified">Date of the last modification.</param>
/// <returns>true, if is up-to-date, otherwise false.</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 30);
}
// Method
#endregion

View File

@@ -7,26 +7,30 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Events
{
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Model;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// Event Feed.
/// </summary>
public class EventFeed : XmlModel<RSSViewModel>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="EventFeed" /> class.
/// </summary>
/// <param name="autoLoad">automatic loading of the data</param>
public EventFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, Constants.UrlEvents_Addr)
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, CampusAppWPortalLib8.Resources.Constants.UrlEvents_Addr)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
if (autoLoad == true)
{
@@ -34,6 +38,10 @@ namespace CampusAppWP8.Feed.Events
}
}
#endregion
#region Method
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
/// </summary>
@@ -49,7 +57,7 @@ namespace CampusAppWP8.Feed.Events
}
else
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0);
retValue = this.CheckIsUpToDate(model.CreateTime);
}
return retValue;
@@ -61,7 +69,7 @@ namespace CampusAppWP8.Feed.Events
/// <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(RSSViewModel model, FileInfo info)
private bool CheckIsFileUpToDateOnLoad(RSSViewModel model, FileInfo info)
{
bool retValue = true;
@@ -70,20 +78,46 @@ namespace CampusAppWP8.Feed.Events
// at loading
if (info.Exists == true)
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0);
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
}
else
{
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
}
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>
private bool CheckIsFileUpToDateOnSave(RSSViewModel model, FileInfo info)
{
bool retValue = true;
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
if (model != null)
{
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
return retValue;
}
/// <summary>Check if the model or file is up-to-date.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <param name="lastModified">Date of the last modification.</param>
/// <returns>true, if is up-to-date, otherwise false.</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 1.0);
}
#endregion
}
}

View File

@@ -0,0 +1,73 @@
//-----------------------------------------------------------------------
// <copyright file="ExamFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>02.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Exams
{
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Exams;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>Exam feed.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
public class ExamFeed : XmlModel<ExamListModel>
{
#region Constructor
/// <summary>Initializes a new instance of the ExamFeed class.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
public ExamFeed()
: base(ModelType.FileAndFeed, Constants.FileExamApp_ExamFeed, Constants.UrlExamApp_ExamFeed)
{
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.ValidRootName = Constants.ExamXmlValidRootName;
}
#endregion
#region Method
/// <summary>Check is model up to date.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
/// <param name="model">The model.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
private bool CheckIsModelUpToDate(ExamListModel model)
{
if (model == null)
{
return false;
}
return true;
}
/// <summary>Check is file up to date.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
/// <param name="model"> The model.</param>
/// <param name="fileInfo">Information describing the file.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
private bool CheckIsFileUpToDate(ExamListModel model, FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
{
return false;
}
if (model != null)
{
return Utilities.DayDifference(Utilities.DifferenceType.Less, fileInfo.LastWriteTime, 30.0);
}
return true;
}
#endregion
}
}

View File

@@ -12,6 +12,7 @@ namespace CampusAppWP8.Feed.Link
using CampusAppWP8.Model;
using CampusAppWP8.Model.Link;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// This Class is for ClubLinkFeeds
@@ -26,16 +27,15 @@ namespace CampusAppWP8.Feed.Link
public ClubLinkFeed()
: base(ModelType.FileAndFeed, Constants.FileLink_ClubLinks, Constants.UrlLink_ClubLinks)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
}
#endregion
#region Method
#region Private
/// <summary>
/// Method check if the FeedModel is up-to-date
/// </summary>
@@ -60,6 +60,11 @@ namespace CampusAppWP8.Feed.Link
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
{
return false;
}
DateTime lastModified = fileInfo.LastWriteTime;
return this.CheckIsUpToDate(lastModified);
}
@@ -71,20 +76,9 @@ namespace CampusAppWP8.Feed.Link
/// <returns>true, if is up-to-date, otherwise false</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
DateTime temp = lastModified.AddDays(1);
int diff = temp.CompareTo(DateTime.Now);
if (diff < 0)
{
return false;
}
return true;
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
}
#endregion
#endregion
}
}

View File

@@ -12,6 +12,7 @@ namespace CampusAppWP8.Feed.Link
using CampusAppWP8.Model;
using CampusAppWP8.Model.Link;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// This Class is for CommonLinkFeeds
@@ -26,16 +27,15 @@ namespace CampusAppWP8.Feed.Link
public CommonLinkFeed()
: base(ModelType.FileAndFeed, Constants.FileLink_CommonLinks, Constants.UrlLink_CommonLinks)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
}
#endregion
#region Method
#region Private
/// <summary>
/// Method check if the FeedModel is up-to-date
/// </summary>
@@ -60,6 +60,11 @@ namespace CampusAppWP8.Feed.Link
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
{
return false;
}
DateTime lastModified = fileInfo.LastWriteTime;
return this.CheckIsUpToDate(lastModified);
}
@@ -71,20 +76,9 @@ namespace CampusAppWP8.Feed.Link
/// <returns>true, if is up-to-date, otherwise false</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
DateTime temp = lastModified.AddDays(1);
int diff = temp.CompareTo(DateTime.Now);
if (diff < 0)
{
return false;
}
return true;
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
}
#endregion
#endregion
}
}

View File

@@ -10,30 +10,66 @@ namespace CampusAppWP8.Feed.Mensa
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Mensa;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Model.Mensa;
/// <summary>
/// This Class is for MensaFeeds
/// </summary>
public class MensaFeed : XmlModel<MenuWeekModel>
public abstract class MensaFeed : XmlModel<MenuWeekModel>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaFeed" /> class.
/// Initializes a new instance of the <see cref="MensaFeed" /> class.
/// </summary>
public MensaFeed()
: base(ModelType.FileAndFeed, Constants.FileMensa_Shedule, Constants.UrlMensa_Week)
/// <param name="fileName">name of the file</param>
/// <param name="feedUrl">url of the feed</param>
protected MensaFeed(string fileName, string feedUrl)
: base(ModelType.FileAndFeed, fileName, feedUrl)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
}
#endregion
#region Property
/// <summary>Gets or sets the title.</summary>
/// <value>The title.</value>
public string Title { get; protected set; }
#endregion
#region Method
#region public
/// <summary>
/// Method creates a MensaFeed depends of certain Campus
/// </summary>
/// <param name="campus"> camus parameter </param>
/// <returns> the correct mensaFeed</returns>
public static MensaFeed CreateCampusMensaFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus campus)
{
switch (campus)
{
case CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN:
return new MensaFeedCBMain();
case CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_NORTH:
return new MensaFeedCBNorth();
case CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_SOUTH:
return new MensaFeedCBSouth();
case CampusAppWP8.Model.Setting.UserProfilModel.Campus.SFB_MAIN:
return new MensaFeedSBFMain();
default:
return new MensaFeedCBMain();
}
}
#endregion
#region Private
/// <summary>
@@ -60,6 +96,11 @@ namespace CampusAppWP8.Feed.Mensa
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(MenuWeekModel model, FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
{
return false;
}
DateTime lastModified = fileInfo.LastWriteTime;
return this.CheckIsUpToDate(lastModified);
}

View File

@@ -0,0 +1,30 @@
//-----------------------------------------------------------------------
// <copyright file="MensaFeedCBMain.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>12.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Mensa
{
using CampusAppWP8.Resources;
/// <summary>
/// MensaFeed for main campus of cottbus
/// </summary>
public class MensaFeedCBMain : MensaFeed
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaFeedCBMain" /> class.
/// </summary>
public MensaFeedCBMain()
: base(Constants.FileMensa_Shedule_CBMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBMain)
{
this.Title = AppResources.Campus_CBMain;
}
#endregion
}
}

View File

@@ -0,0 +1,30 @@
//-----------------------------------------------------------------------
// <copyright file="MensaFeedCBNorth.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>12.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Mensa
{
using CampusAppWP8.Resources;
/// <summary>
/// MensaFeed for main campus of cottbus
/// </summary>
public class MensaFeedCBNorth : MensaFeed
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaFeedCBNorth" /> class.
/// </summary>
public MensaFeedCBNorth()
: base(Constants.FileMensa_Shedule_CBNorth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBNorth)
{
this.Title = AppResources.Campus_CBNorth;
}
#endregion
}
}

View File

@@ -0,0 +1,30 @@
//-----------------------------------------------------------------------
// <copyright file="MensaFeedCBSouth.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>12.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Mensa
{
using CampusAppWP8.Resources;
/// <summary>
/// MensaFeed for main campus of cottbus
/// </summary>
public class MensaFeedCBSouth : MensaFeed
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaFeedCBSouth" /> class.
/// </summary>
public MensaFeedCBSouth()
: base(Constants.FileMensa_Shedule_CBSouth, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_CBSouth)
{
this.Title = AppResources.Campus_CBSouth;
}
#endregion
}
}

View File

@@ -0,0 +1,30 @@
//-----------------------------------------------------------------------
// <copyright file="MensaFeedSBFMain.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>12.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Mensa
{
using CampusAppWP8.Resources;
/// <summary>
/// MensaFeed for main campus of cottbus
/// </summary>
public class MensaFeedSBFMain : MensaFeed
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MensaFeedSBFMain" /> class.
/// </summary>
public MensaFeedSBFMain()
: base(Constants.FileMensa_Shedule_SBFMain, CampusAppWPortalLib8.Resources.Constants.UrlMensa_Week_SBFMain)
{
this.Title = AppResources.Campus_SFBMain;
}
#endregion
}
}

View File

@@ -7,26 +7,30 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Feed.News
{
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.RSS;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.RSS;
/// <summary>
/// News Feed.
/// </summary>
public class NewsFeed : XmlModel<RSSViewModel>
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="NewsFeed" /> class.
/// </summary>
/// <param name="autoLoad">automatic loading of the data</param>
public NewsFeed(bool autoLoad = true)
: base(ModelType.FileAndFeed, Constants.FileNews_Name, Constants.UrlNews_Addr)
: base(ModelType.FileAndFeed, Constants.FileNews_Name, CampusAppWPortalLib8.Resources.Constants.UrlNews_Addr)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
if (autoLoad == true)
{
@@ -34,6 +38,10 @@ namespace CampusAppWP8.Feed.News
}
}
#endregion
#region Method
/// <summary>
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
/// </summary>
@@ -49,7 +57,7 @@ namespace CampusAppWP8.Feed.News
}
else
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0);
retValue = this.CheckIsUpToDate(model.CreateTime);
}
return retValue;
@@ -61,29 +69,54 @@ namespace CampusAppWP8.Feed.News
/// <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>
private bool CheckIsFileUpToDate(RSSViewModel model, FileInfo info)
private bool CheckIsFileUpToDateOnLoad(RSSViewModel model, FileInfo info)
{
bool retValue = true;
if (model == null)
{
// at loading
if (info.Exists == true)
{
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0);
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
}
else
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>
private bool CheckIsFileUpToDateOnSave(RSSViewModel model, FileInfo info)
{
bool retValue = true;
if ((info.Exists == false)
|| (info.Length == 0))
{
// at saving
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
retValue = false;
}
if (model != null)
{
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
return retValue;
}
/// <summary>Check if the model or file is up-to-date.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <param name="lastModified">Date of the last modification.</param>
/// <returns>true, if is up-to-date, otherwise false.</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 1.0);
}
#endregion
}
}

View File

@@ -12,7 +12,8 @@ namespace CampusAppWP8.Feed.Openinghours
using CampusAppWP8.Model;
using CampusAppWP8.Model.Openinghours;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// This Class is for MesaFeeds
/// </summary>
@@ -26,16 +27,15 @@ namespace CampusAppWP8.Feed.Openinghours
public OpeninghoursFeed()
: base(ModelType.FileAndFeed, Constants.FileOpeningHours_OpeningHours, Constants.UrlOpeningHours_OpeningHours)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
}
#endregion
#region Method
#region Private
/// <summary>
/// Method check if the FeedModel is up-to-date
/// </summary>
@@ -43,38 +43,73 @@ namespace CampusAppWP8.Feed.Openinghours
/// <returns>true, if model is up-to-date, otherwise false</returns>
private bool CheckIsModelUpToDate(OpeninghoursModel model)
{
bool retValue = true;
if (model == null)
{
return false;
retValue = false;
}
else
{
retValue = this.CheckIsUpToDate(model.CreateTime);
}
DateTime lastModified = model.CreateTime;
return this.CheckIsUpToDate(lastModified);
return retValue;
}
/// <summary>
/// Method check if the FeedFile is up-to-date
/// </summary>
/// <param name="model">reference of the FeedModel</param>
/// <param name="fileInfo">info about the file</param>
/// <param name="info">info about the file</param>
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(OpeninghoursModel model, FileInfo fileInfo)
private bool CheckIsFileUpToDateOnLoad(OpeninghoursModel model, FileInfo info)
{
DateTime lastModified = fileInfo.LastWriteTime;
return this.CheckIsUpToDate(lastModified);
bool retValue = true;
if (model == null)
{
if (info.Exists == true)
{
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
}
return retValue;
}
/// <summary>
/// Check if the model or file is up-to-date.
/// Method check if the FeedFile is up-to-date
/// </summary>
/// <param name="lastModified">Date of the last modification</param>
/// <returns>true, if is up-to-date, otherwise false</returns>
private bool CheckIsUpToDate(DateTime lastModified)
/// <param name="model">reference of the FeedModel</param>
/// <param name="info">info about the file</param>
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDateOnSave(OpeninghoursModel model, FileInfo info)
{
return true;
bool retValue = true;
if ((info.Exists == false)
|| (info.Length == 0))
{
retValue = false;
}
if (model != null)
{
retValue = this.CheckIsUpToDate(info.LastWriteTime);
}
return retValue;
}
#endregion
/// <summary>Check if the model or file is up-to-date.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <param name="lastModified">Date of the last modification.</param>
/// <returns>true, if is up-to-date, otherwise false.</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
}
#endregion
}

View File

@@ -12,6 +12,7 @@ namespace CampusAppWP8.Feed.StudentCouncil
using CampusAppWP8.Model;
using CampusAppWP8.Model.StudentCouncil;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// This Class is for StudentCouncilFeed
@@ -26,16 +27,15 @@ namespace CampusAppWP8.Feed.StudentCouncil
public StudentCouncilFeed()
: base(ModelType.FileAndFeed, Constants.FileStudentCouncil_StudentCouncils, Constants.UrlStudentCouncil_StudentCouncils)
{
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
}
#endregion
#region Method
#region Private
/// <summary>
/// Method check if the FeedModel is up-to-date
/// </summary>
@@ -60,6 +60,11 @@ namespace CampusAppWP8.Feed.StudentCouncil
/// <returns>true, if file is up-to-date, otherwise false</returns>
private bool CheckIsFileUpToDate(StudentCouncilListModel model, FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
{
return false;
}
DateTime lastModified = fileInfo.LastWriteTime;
return this.CheckIsUpToDate(lastModified);
}
@@ -71,20 +76,9 @@ namespace CampusAppWP8.Feed.StudentCouncil
/// <returns>true, if is up-to-date, otherwise false</returns>
private bool CheckIsUpToDate(DateTime lastModified)
{
DateTime temp = lastModified.AddDays(1);
int diff = temp.CompareTo(DateTime.Now);
if (diff < 0)
{
return false;
}
return true;
return Utilities.DayDifference(Utilities.DifferenceType.Less, lastModified, 7.0);
}
#endregion
#endregion
}
}

View File

@@ -0,0 +1,17 @@
//-----------------------------------------------------------------------
// <copyright file="CourseFeed.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>02.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Feed.Utility
{
using CampusAppWP8.Feed.Exams;
/// <summary>Course Feed.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
public class CourseFeed : ExamFeed
{
}
}

View File

@@ -0,0 +1,506 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<place id="1" parentId="" refpoint="POINT(14.324056352976152 51.76737987049448)">
<placeInformation placeInformationName="Name">Campus Cottbus Mitte</placeInformation>
<placeInformation placeInformationName="Typ">campus</placeInformation>
</place>
<place id="2" parentId="" refpoint="POINT(14.319497377197282 51.72668339740452)">
<placeInformation placeInformationName="Name">Campus Cottbus Süd</placeInformation>
<placeInformation placeInformationName="Typ">campus</placeInformation>
</place>
<place id="3" parentId="" refpoint="POINT(13.986618441187698 51.522217168257356)">
<placeInformation placeInformationName="Name">Campus Senftenberg</placeInformation>
<placeInformation placeInformationName="Typ">campus</placeInformation>
</place>
<place id="4" parentId="" refpoint="POINT(14.293908825617 51.77670359509875)">
<placeInformation placeInformationName="Name">Campus Cottbus Nord</placeInformation>
<placeInformation placeInformationName="Typ">campus</placeInformation>
</place>
<place id="101" parentId="1" refpoint="POINT(14.318166900000001 51.769462600000004)">
<placeInformation placeInformationName="Kurzbeschreibung">Gewächshaus des Lehrstuhls Allgemeine Ökologie der Fakultät 4 der BTU.</placeInformation>
<placeInformation placeInformationName="Name">Gewächshaus Fakultät 4</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="102" parentId="1" refpoint="POINT(14.31918153 51.76944543999999)">
<placeInformation placeInformationName="Kurzbeschreibung">Strömungstechnik- und Aerodynamikhalle der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen (Fak. 3) der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LH 3D</placeInformation>
<placeInformation placeInformationName="Name">Laborhalle 3D</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="103" parentId="1" refpoint="POINT(14.318696583333333 51.769080383333346)">
<placeInformation placeInformationName="Kurzbeschreibung">Versuchshalle des Lehrstuhls Bodenmechanik und Grundbau/ Geotechnik.</placeInformation>
<placeInformation placeInformationName="Name">Grundbau-Versuchshalle</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="104" parentId="1" refpoint="POINT(14.318569425 51.768416925)">
<placeInformation placeInformationName="Kurzbeschreibung">Die Panta Rhei Halle verfügt über Büros und Labore, in denen Wissenschaftler der BTU an neuartigen Materialien, Werkstoffen und Verfahren forschen.</placeInformation>
<placeInformation placeInformationName="Name">Panta Rhei Halle</placeInformation>
<placeInformation placeInformationName="Typ">Forschungszentrum</placeInformation>
</place>
<place id="105" parentId="1" refpoint="POINT(14.31957525 51.7687229)">
<placeInformation placeInformationName="Kurzbeschreibung">Laborhalle der Fakultät 3 der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LH 3C</placeInformation>
<placeInformation placeInformationName="Name">Laborhalle 3C</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="106" parentId="1" refpoint="POINT(14.319607425000001 51.7681641)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude befindet sich derzeit im Bau.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 3E</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 3E (im Bau)</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="107" parentId="1" refpoint="POINT(14.319523595585968 51.766827543042716)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Kurzname">WA 8</placeInformation>
<placeInformation placeInformationName="Name">Wohnanlage 8</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="108" parentId="1" refpoint="POINT(14.320277773573652 51.76586220609145)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim Papitzer Straße 4/5</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="109" parentId="1" refpoint="POINT(14.320955458333335 51.76702027499999)">
<placeInformation placeInformationName="Name">Alte Schwimmhalle (geschlossen)</placeInformation>
</place>
<place id="110" parentId="1" refpoint="POINT(14.320434075757573 51.76835607878787)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 3A der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 3A</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 3A</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="111" parentId="1" refpoint="POINT(14.321277350000003 51.76929023333332)">
<placeInformation placeInformationName="Kurzbeschreibung">Laborhalle der Fakultät 4 der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LB 4C</placeInformation>
<placeInformation placeInformationName="Name">Laborhalle 4C</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="112" parentId="1" refpoint="POINT(14.321550466666666 51.76952978888889)">
<placeInformation placeInformationName="Kurzbeschreibung">Laborgebäude der Fakultät 4 der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LB 4B</placeInformation>
<placeInformation placeInformationName="Name">Laborgebäude 4B</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="113" parentId="1" refpoint="POINT(14.32181761111111 51.76925883333334)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 4A der Fakultät Umweltwissenschaften und Verfahrenstechnik.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4A</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4A</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="114" parentId="1" refpoint="POINT(14.3214907 51.7684953375)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 3B der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 3B</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 3B</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="115" parentId="1" refpoint="POINT(14.322584050000001 51.768901983333336)">
<placeInformation placeInformationName="Name">Garagenkomplex</placeInformation>
<placeInformation placeInformationName="Typ">Garage</placeInformation>
</place>
<place id="116" parentId="1" refpoint="POINT(14.323577843750002 51.768762243750004)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 3 der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 3</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 3</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="118" parentId="1" refpoint="POINT(14.322298770000003 51.768124109999995)">
<placeInformation placeInformationName="Kurzbeschreibung">Die FMPA ist eine Betriebseinheit an der BTU im Verantwortungsbereich der Fakultät Architektur, Bauingenieurwesen und Stadtplanung.</placeInformation>
<placeInformation placeInformationName="Kurzname">FMPA</placeInformation>
<placeInformation placeInformationName="Name">Forschungs- und Materialprüfanstalt Cottbus</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="119" parentId="1" refpoint="POINT(14.3219259 51.76699498823529)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 2D der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 2D</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 2D</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="120" parentId="1" refpoint="POINT(14.32240947777778 51.76698596666667)">
<placeInformation placeInformationName="Kurzbeschreibung">Der Zwischenbau ist das Verbindungsstück der Lehrgebäude 2C und 2D der Fakultät Architektur, Bauingenieurwesen und Stadtplanung.</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau Lehrgebäude 2C/D</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="121" parentId="1" refpoint="POINT(14.322875529411766 51.7668744117647)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 2C der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 2C</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 2C</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="122" parentId="1" refpoint="POINT(14.321714914733889 51.76608468494122)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Mehrzweckgebäude ist Sitz verschiedener Lehrsühle der BTU u.a. des Lehrstuhls Kraftwerkstechnik und des Lehrstuhls Industrielle Informationstechnik.</placeInformation>
<placeInformation placeInformationName="Kurzname">MZG</placeInformation>
<placeInformation placeInformationName="Name">Mehrzweckgebäude</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="123" parentId="1" refpoint="POINT(14.322364300000002 51.76576072500001)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Studentenwerk Frankfurt (Oder) steht Studenten der BTU in finanziellen und sozialen Fragen zur Seite.</placeInformation>
<placeInformation placeInformationName="Kurzname">SW</placeInformation>
<placeInformation placeInformationName="Name">Studentenwerk Frankfurt (Oder)</placeInformation>
<placeInformation placeInformationName="Typ">Studentenwerk</placeInformation>
</place>
<place id="124" parentId="1" refpoint="POINT(14.323765416666669 51.76840466666667)">
<placeInformation placeInformationName="Kurzbeschreibung">Verkehrstechnikhalle der Fakultät Maschinenbau, Elektrotechnik und Wirtschaftsingenieurwesen.</placeInformation>
<placeInformation placeInformationName="Kurzname">LH 3G</placeInformation>
<placeInformation placeInformationName="Name">Lehrhalle 3G Verkehrstechnikhalle</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="125" parentId="1" refpoint="POINT(14.3239971 51.7678181)">
<placeInformation placeInformationName="Name">Umformer Station</placeInformation>
</place>
<place id="126" parentId="1" refpoint="POINT(14.324894700000002 51.76894906)">
<placeInformation placeInformationName="Kurzbeschreibung">Die Sporthalle bietet verschiedene Möglichkeiten der sportlichen Ertüchtigung für Jung und Alt.</placeInformation>
<placeInformation placeInformationName="Name">Sporthalle 1</placeInformation>
<placeInformation placeInformationName="Typ">Sport</placeInformation>
</place>
<place id="127" parentId="1" refpoint="POINT(14.324635666666667 51.768258633333325)">
<placeInformation placeInformationName="Kurzbeschreibung">Der Hörsaal 3 der BTU befindet sich im LG 1C.</placeInformation>
<placeInformation placeInformationName="Kurzname">HS 3</placeInformation>
<placeInformation placeInformationName="Name">Hörsaal 3</placeInformation>
<placeInformation placeInformationName="Typ">Hörsaal</placeInformation>
</place>
<place id="128" parentId="1" refpoint="POINT(14.3245076125 51.7680148)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Lehrgebäude 1C der BTU beinhaltet u.a. den Hörsaal 3.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 1C</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 1C</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="129" parentId="1" refpoint="POINT(14.323845864705879 51.7667514882353)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 2B der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 2B</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 2B</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="130" parentId="1" refpoint="POINT(14.324329966666669 51.76674437777778)">
<placeInformation placeInformationName="Kurzbeschreibung">Der Zwischenbau ist das Verbindungsstück der Lehrgebäude 2A und 2B der Fakultät Architektur, Bauingenieurwesen und Stadtplanung.</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau Lehrgebäude 2A/B</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="131" parentId="1" refpoint="POINT(14.324795547058825 51.76663094705882)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude 2A der Fakultät Architektur, Bauingenieurwesen und Stadtplanung der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 2A</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 2A</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="132" parentId="1" refpoint="POINT(14.32553145 51.76862572499999)">
<placeInformation placeInformationName="Kurzbeschreibung">Durchführung von Druckarbeiten.</placeInformation>
<placeInformation placeInformationName="Kurzname">Repro</placeInformation>
<placeInformation placeInformationName="Name">Reprographie</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="133" parentId="1" refpoint="POINT(14.326107239999999 51.76841574)">
<placeInformation placeInformationName="Kurzbeschreibung">Zentraleinrichtung für Hochschulsport (ZEH).</placeInformation>
<placeInformation placeInformationName="Kurzname">Fak. 3/ Sport</placeInformation>
<placeInformation placeInformationName="Name">Fakultät 3 / Sport</placeInformation>
<placeInformation placeInformationName="Typ">Sport</placeInformation>
</place>
<place id="134" parentId="1" refpoint="POINT(14.3265728 51.76835932)">
<placeInformation placeInformationName="Kurzbeschreibung">Sprachausbildung für Studierende und Mitarbeiter aller Fachrichtungen der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZE S</placeInformation>
<placeInformation placeInformationName="Name">Zentrale Einrichtung Sprachenzentrum</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="135" parentId="1" refpoint="POINT(14.325830832142858 51.76742222500002)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Zentrale Hörsaalgebäude bietet neben kleineren Hörsälen und Seminarräumen auch dem Audimax der BTU platz.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZHG</placeInformation>
<placeInformation placeInformationName="Name">Zentrales Hörsaalgebäude</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="136" parentId="1" refpoint="POINT(14.326168833333334 51.76649038666667)">
<placeInformation placeInformationName="Kurzbeschreibung">Mensa, Caféteria und Brasserie der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">Mensa</placeInformation>
<placeInformation placeInformationName="Name">BTU Mensa</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="137" parentId="1" refpoint="POINT(14.325485850000002 51.765425037499995)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Kurzname">WA 3</placeInformation>
<placeInformation placeInformationName="Name">Studentenwohnanlage Universitätsstraße 3</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="138" parentId="1" refpoint="POINT(14.32601965 51.765781849999996)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZB 3</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau 3</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="139" parentId="1" refpoint="POINT(14.325752350000002 51.764987175)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZB 4</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau 4</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="140" parentId="1" refpoint="POINT(14.326389 51.76530997500001)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Kurzname">WA 2</placeInformation>
<placeInformation placeInformationName="Name">Studentenwohnanlage Universitätsstraße 2</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="141" parentId="1" refpoint="POINT(14.325013391666666 51.76421453333333)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Kurzname">WA 4</placeInformation>
<placeInformation placeInformationName="Name">Studentenwohnanlage Erich-Weinert-Straße</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="142" parentId="1" refpoint="POINT(14.325669099999999 51.764512059999994)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZB 5</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau 5</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="143" parentId="1" refpoint="POINT(14.3254197375 51.7637245)">
<placeInformation placeInformationName="Kurzbeschreibung">In diesem Gebäude befinden sich Seminarräume.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZB 6</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau 6</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="144" parentId="1" refpoint="POINT(14.325887666666667 51.76394285000001)">
<placeInformation placeInformationName="Kurzbeschreibung">Sitz unterschiedlicher Lehrstühle und Einrichtungen der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 10</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 10</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="145" parentId="1" refpoint="POINT(14.326990899999998 51.765654600000005)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZB 1</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau 1</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="146" parentId="1" refpoint="POINT(14.326734299999998 51.764857675)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder). Im Keller des Gebäudes befinden sich Sporteinrichtungen.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZB 2</placeInformation>
<placeInformation placeInformationName="Name">Zwischenbau 2</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="147" parentId="1" refpoint="POINT(14.327351425 51.765186625)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Kurzname">WA 1</placeInformation>
<placeInformation placeInformationName="Name">Studentenwohnanlage Universitätsstraße 1</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="148" parentId="1" refpoint="POINT(14.327362925 51.76601645)">
<placeInformation placeInformationName="Kurzbeschreibung">In diesem Gebäude befindet ein Großteil der Verwaltung der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZeVe</placeInformation>
<placeInformation placeInformationName="Name">Zentralverwaltung</placeInformation>
<placeInformation placeInformationName="Typ">Verwaltung</placeInformation>
</place>
<place id="149" parentId="1" refpoint="POINT(14.327332890909092 51.767140422727266)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Hauptgebäude begrenzt den Campus der BTU und rundet gleichzeitig den zentralen Campusplatz mit Mensa und ZHG ab.</placeInformation>
<placeInformation placeInformationName="Kurzname">HG</placeInformation>
<placeInformation placeInformationName="Name">Hauptgebäude</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="150" parentId="1" refpoint="POINT(14.326804730000001 51.76767220000001)">
<placeInformation placeInformationName="Kurzbeschreibung">Der Große Hörsaal ist zentral auf dem Campus der BTU platziert.</placeInformation>
<placeInformation placeInformationName="Kurzname">GH</placeInformation>
<placeInformation placeInformationName="Name">Großer Hörsaal</placeInformation>
<placeInformation placeInformationName="Typ">Hörsaal</placeInformation>
</place>
<place id="151" parentId="1" refpoint="POINT(14.3271468 51.76813533999999)">
<placeInformation placeInformationName="Kurzbeschreibung">Laborgebäude der Fakultät 1 der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 1B</placeInformation>
<placeInformation placeInformationName="Name">Laborgebäude 1B</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="152" parentId="1" refpoint="POINT(14.327171049999999 51.768546066666666)">
<placeInformation placeInformationName="Kurzbeschreibung">Baustofflabor der Fakultät 2.</placeInformation>
<placeInformation placeInformationName="Kurzname">Baustofflabor</placeInformation>
<placeInformation placeInformationName="Name">Baustofflabor</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="153" parentId="1" refpoint="POINT(14.327784339999997 51.768178549999995)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Lehrgebäude 1A beinhaltet den Hörsaal A und den Hörsaal B.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 1A</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 1A</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="154" parentId="1" refpoint="POINT(14.329964147222219 51.768867747222224)">
<placeInformation placeInformationName="Kurzname">LG 9</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 9</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="155" parentId="1" refpoint="POINT(14.3305683 51.76835295)">
<placeInformation placeInformationName="Kurzname">LG 8</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 8</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="156" parentId="1" refpoint="POINT(14.330883875 51.7678221)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Internationale Begegnungszentrum soll Gastwissenschaftlern und ihren Familien während der Zeit an der BTU ein zweites Zuhause geben.</placeInformation>
<placeInformation placeInformationName="Name">Internationales Begegnungszentrum</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="157" parentId="1" refpoint="POINT(14.329434351923076 51.76722032307691)">
<placeInformation placeInformationName="Kurzbeschreibung">Das IKMZ ist die zentrale Einrichtung der BTU, in der die Strukturbereiche der Informations-, Kommunikations- und Medienversorgung zusammengefasst sind.</placeInformation>
<placeInformation placeInformationName="Kurzname">IKMZ</placeInformation>
<placeInformation placeInformationName="Name">Informations-, Kommunikations- und Medienzentrum</placeInformation>
<placeInformation placeInformationName="Typ">Bibliothek</placeInformation>
</place>
<place id="158" parentId="1" refpoint="POINT(14.32840075 51.765809774999994)">
<placeInformation placeInformationName="Kurzbeschreibung">In diesem Gebäude befindet sich ein Teil der Verwaltung der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">ZVH</placeInformation>
<placeInformation placeInformationName="Name">Zentralverwaltung Hubertstraße (ZVH)</placeInformation>
<placeInformation placeInformationName="Typ">Verwaltung</placeInformation>
</place>
<place id="201" parentId="2" refpoint="POINT(14.318373025 51.7267223)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude beinhaltet hauptsächlich Einrichtungen der Betriebswirtschaftslehre.</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude Betriebswirtschaftslehre</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="202" parentId="2" refpoint="POINT(14.31889922 51.72755642)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude beinhaltet hauptsächlich Einrichtungen des Sozialwesens.</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude Sozialwesen</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="203" parentId="2" refpoint="POINT(14.318193599999999 51.725572375)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude beinhaltet hauptsächlich Einrichtungen der Musikpädagogik.</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude Musikpädagogik</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="204" parentId="2" refpoint="POINT(14.3196709 51.7271438)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude beinhaltet hauptsächlich Einrichtungen der Architektur.</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude Bauningenieurwesen Architektur</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="205" parentId="2" refpoint="POINT(14.319057066666666 51.726194099999994)">
<placeInformation placeInformationName="Kurzbeschreibung">Sitz der Caféteria.</placeInformation>
<placeInformation placeInformationName="Name">Cafeteria HL</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="206" parentId="2" refpoint="POINT(14.319239050000002 51.72455225)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim 1</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanalge</placeInformation>
</place>
<place id="207" parentId="2" refpoint="POINT(14.320103391666665 51.72584225)">
<placeInformation placeInformationName="Name">Gebäude 14</placeInformation>
</place>
<place id="208" parentId="2" refpoint="POINT(14.32044634 51.726733839999994)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude beinhaltet hauptsächlich Einrichtungen der Architektur.</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude Bauningenieurwesen Architektur</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="209" parentId="2" refpoint="POINT(14.320494978125 51.72755265625001)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Gebäude beinhaltet hauptsächlich Einrichtungen der Verfahrenstechnik.</placeInformation>
<placeInformation placeInformationName="Name">Laborgebäude Bauingenieurwesen Verfahrenstechni</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="301" parentId="3" refpoint="POINT(13.983276944444444 51.522954)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Biotechnologie.</placeInformation>
<placeInformation placeInformationName="Name">Biotechnologie</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="302" parentId="3" refpoint="POINT(13.9839968625 51.52364)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Elektrotechnik, Chemie und Verfahrenstechnik in Senftenberg.</placeInformation>
<placeInformation placeInformationName="Name">Elektrotechnik/Chemie/Verfahrenstechnik</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="303" parentId="3" refpoint="POINT(13.983964349999997 51.522447674999995)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Physiotherapie und der Medizintechnik.</placeInformation>
<placeInformation placeInformationName="Name">Physiotheraphie/Medizintechnik</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="304" parentId="3" refpoint="POINT(13.984948066666668 51.52346673333333)">
<placeInformation placeInformationName="Kurzbeschreibung">Die Sporthalle bietet Möglichkeiten der sportlichen Ertüchtigung.</placeInformation>
<placeInformation placeInformationName="Name">Sporthalle</placeInformation>
<placeInformation placeInformationName="Typ">Sport</placeInformation>
</place>
<place id="305" parentId="3" refpoint="POINT(13.984847919999998 51.522048039999994)">
<placeInformation placeInformationName="Kurzbeschreibung">Sitz des Informatiklabors.</placeInformation>
<placeInformation placeInformationName="Name">Informatik (Labor)</placeInformation>
<placeInformation placeInformationName="Typ">Labor</placeInformation>
</place>
<place id="306" parentId="3" refpoint="POINT(13.985745083333333 51.52182505)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Informatik in Senftenberg.</placeInformation>
<placeInformation placeInformationName="Name">Informatik</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="307" parentId="3" refpoint="POINT(13.98583916111111 51.52230788333334)">
<placeInformation placeInformationName="Kurzbeschreibung">Das Konrad-Zuse-Medienzentrum fungiert als Dienstleister für Forschung und Lehre.</placeInformation>
<placeInformation placeInformationName="Name">Konrad-Zuse-Medienzentrum</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="308" parentId="3" refpoint="POINT(13.986237655555556 51.52300835555556)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude des Maschinenbaus in Senftenberg.</placeInformation>
<placeInformation placeInformationName="Name">Maschinenbau</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="309" parentId="3" refpoint="POINT(13.986758933333332 51.521615125000004)">
<placeInformation placeInformationName="Kurzbeschreibung">In diesem Gebäude sitzt ein Teil der Verwaltung der BTU in Senftenberg.</placeInformation>
<placeInformation placeInformationName="Name">Hochschulverwaltung/Rechenzentrum</placeInformation>
<placeInformation placeInformationName="Typ">Verwaltung</placeInformation>
</place>
<place id="310" parentId="3" refpoint="POINT(13.987333000000001 51.522037025)">
<placeInformation placeInformationName="Kurzbeschreibung">Standort der Bibliothek.</placeInformation>
<placeInformation placeInformationName="Name">Hochschulbibliothek</placeInformation>
<placeInformation placeInformationName="Typ">Bibliothek</placeInformation>
</place>
<place id="311" parentId="3" refpoint="POINT(13.98732225 51.52266459999999)">
<placeInformation placeInformationName="Kurzbeschreibung">Sitz der Mensa.</placeInformation>
<placeInformation placeInformationName="Name">Mensa</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="312" parentId="3" refpoint="POINT(13.987574563157894 51.521223294736856)">
<placeInformation placeInformationName="Name">Mehrzweckgebäude</placeInformation>
<placeInformation placeInformationName="Typ">Mehrzweck</placeInformation>
</place>
<place id="313" parentId="3" refpoint="POINT(13.988018654545455 51.521318268181815)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanalge</placeInformation>
</place>
<place id="314" parentId="3" refpoint="POINT(13.988664100000001 51.520596499999996)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="315" parentId="3" refpoint="POINT(13.989489149999999 51.5208131)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="316" parentId="3" refpoint="POINT(13.9890434 51.52150835)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanlage</placeInformation>
</place>
<place id="317" parentId="3" refpoint="POINT(13.98994325 51.521213599999996)">
<placeInformation placeInformationName="Kurzbeschreibung">Studentenwohnheim, bereitgestellt durch das Studentenwerk Frankfurt (Oder).</placeInformation>
<placeInformation placeInformationName="Name">Wohnheim</placeInformation>
<placeInformation placeInformationName="Typ">Wohnanalge</placeInformation>
</place>
<place id="401" parentId="4" refpoint="POINT(14.291954883333334 51.776766916666666)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4/6</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4/6</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="402" parentId="4" refpoint="POINT(14.294772000000002 51.777980975)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4/5</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4/5</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="403" parentId="4" refpoint="POINT(14.2952951 51.77793325)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4/4</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4/4</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="404" parentId="4" refpoint="POINT(14.294610075 51.77676294999999)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4/1</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4/1</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="405" parentId="4" refpoint="POINT(14.294928650000001 51.776659775)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4/2</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4/2</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
<place id="406" parentId="4" refpoint="POINT(14.294196 51.7762505625)">
<placeInformation placeInformationName="Kurzbeschreibung">Lehrgebäude der Fakultät 4 auf dem Campus Nord der BTU.</placeInformation>
<placeInformation placeInformationName="Kurzname">LG 4/3</placeInformation>
<placeInformation placeInformationName="Name">Lehrgebäude 4/3</placeInformation>
<placeInformation placeInformationName="Typ">Lehrgebäude</placeInformation>
</place>
</root>

View File

@@ -0,0 +1,97 @@
//-----------------------------------------------------------------------
// <copyright file="DepartmentFavoriteFile.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>01.07.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.File.Departments
{
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.Departments;
using CampusAppWP8.Resources;
/// <summary>
/// Feed object to handle favorite department feeds.
/// </summary>
public class DepartmentFavoriteFile : XmlModel<DepartmentModel>
{
#region Constructor
/// <summary>Initializes a new instance of the DepartmentFavoriteFile class.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
/// <param name="autoLoad">(Optional) the automatic load.</param>
public DepartmentFavoriteFile(bool autoLoad = true)
: base(ModelType.File, Constants.FileDepartment_Favorite_Name, string.Empty)
{
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDateOnLoad);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDateOnSave);
if (autoLoad == true)
{
this.LoadData();
}
}
// Constructor
#endregion
#region Method
/// <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)
|| (model.Faculties == null)
|| (model.Faculties.Count != 1))
{
retValue = false;
}
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>
private bool CheckIsFileUpToDateOnLoad(DepartmentModel model, FileInfo info)
{
bool retValue = false;
if (this.Model == null)
{
retValue = true;
}
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>
private bool CheckIsFileUpToDateOnSave(DepartmentModel model, FileInfo info)
{
bool retValue = false;
retValue = (model.HasChanged() == false) ? true : false;
return retValue;
}
// Method
#endregion
}
}

View File

@@ -0,0 +1,114 @@
//-----------------------------------------------------------------------
// <copyright file="ExamFile.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.File.Exams
{
using System.IO;
using CampusAppWP8.Model;
using Windows.Storage;
/// <summary>Exam file.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
public class ExamFile : BinaryModel
{
#region Member
/// <summary>The storage file.</summary>
private StorageFile storageFile;
#endregion
#region Constructor
/// <summary>Initializes a new instance of the ExamFile class.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="fileName">Filename of the file.</param>
/// <param name="url"> URL of the document.</param>
public ExamFile(string fileName, string url)
: base(ModelType.FileAndFeed, fileName, url)
{
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
}
#endregion
#region Method
#region public
/// <summary>Executes the file operation.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
public async void LaunchFile()
{
if (this.storageFile == null)
{
this.storageFile = await this.file.AsStorageFile();
}
if (this.storageFile != null)
{
var options = new Windows.System.LauncherOptions();
Windows.System.Launcher.LaunchFileAsync(this.storageFile);
}
}
#endregion
/// <summary>Saves the and launch file.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
public void SaveAndLaunchFile()
{
if (this.file.Exist())
{
this.LaunchFile();
}
else
{
this.OnSaved += new ExamFile.OnIO(this.LaunchFile);
this.SaveData();
}
}
#region private
/// <summary>Check is model up to date.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="model">The model.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
private bool CheckIsModelUpToDate(byte[] model)
{
if (model == null)
{
return false;
}
return true;
}
/// <summary>Check is file up to date.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="model"> The model.</param>
/// <param name="fileInfo">Information describing the file.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
private bool CheckIsFileUpToDate(byte[] model, FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || model != null)
{
return false;
}
return true;
}
#endregion
#endregion
}
}

View File

@@ -0,0 +1,63 @@
//-----------------------------------------------------------------------
// <copyright file="PlacesFile.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>09.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.File.Places
{
using CampusAppWP8.Model;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Utility;
/// <summary>Places file.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
public class PlacesFile : XmlModel<SpsModel>
{
#region Constructor
/// <summary>Initializes a new instance of the PlacesFile class.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
public PlacesFile()
: base(ModelType.File, Constants.FilePlace_AllPlaces)
{
this.OnFailedFile += new OnFailed(this.FallBackLoad);
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
}
#endregion
#region Method
/// <summary>Check is file up to date.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="model"> The model.</param>
/// <param name="fileInfo">Information describing the file.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
private bool CheckIsFileUpToDate(SpsModel model, System.IO.FileInfo fileInfo)
{
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1 || (model != null && model.HasChanged))
{
return false;
}
return false;
}
/// <summary>
/// Method load OfflineMap as Fallback
/// </summary>
private void FallBackLoad()
{
SpsModel fallBackModel = XmlManager.DeserializationFileToModel<SpsModel>(Constants.FileMap_OfflineMap);
this.Model = fallBackModel;
this.SaveData();
}
#endregion
}
}

View File

@@ -1,14 +1,35 @@
using CampusAppWP8.Resources;
//-----------------------------------------------------------------------------
// <copyright file="LocalizedStrings.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <sience>16.07.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8
{
/// <summary>
/// Bietet Zugriff auf Zeichenfolgenressourcen.
/// </summary>
using CampusAppWP8.Resources;
/// <summary>Localized strings. </summary>
public class LocalizedStrings
{
private static AppResources _localizedResources = new AppResources();
#region Member
public AppResources LocalizedResources { get { return _localizedResources; } }
/// <summary>The localized resources. </summary>
private static AppResources localizedResources = new AppResources();
#endregion
#region Property
/// <summary>Gets the localized resources. </summary>
/// <value>The localized resources. </value>
public AppResources LocalizedResources
{
get
{
return localizedResources;
}
}
#endregion
}
}

View File

@@ -0,0 +1,70 @@
//-----------------------------------------------------------------------
// <copyright file="BinaryModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>03.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model
{
/// <summary>Binary model.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
public abstract class BinaryModel : MainModel<byte[]>
{
#region Constructor
/// <summary>Initializes a new instance of the BinaryModel class.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="modelType">Type of the model.</param>
/// <param name="fileName"> Filename of the file.</param>
/// <param name="url"> URL of the document.</param>
public BinaryModel(ModelType modelType, string fileName, string url)
: base(modelType, fileName, url)
{
}
/// <summary>Initializes a new instance of the BinaryModel class.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="modelType"> Type of the model.</param>
/// <param name="sourceName">Name of the source.</param>
public BinaryModel(ModelType modelType, string sourceName)
: base(modelType, sourceName)
{
}
#endregion
#region Method
/// <summary>Deserialize model.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <param name="modelData">Information describing the model.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
protected override bool DeserializeModel(byte[] modelData)
{
bool retValue = true;
if (modelData != null)
{
this.Model = modelData;
}
else
{
retValue = false;
}
return retValue;
}
/// <summary>Gets the serialize model.</summary>
/// <remarks>Stubbfel, 03.09.2013.</remarks>
/// <returns>an byte Array.</returns>
protected override byte[] SerializeModel()
{
return this.Model;
}
#endregion
}
}

View File

@@ -0,0 +1,87 @@
//-----------------------------------------------------------------------------
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>13.08.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
using System.Windows;
using CampusAppWP8.File.Places;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
/// <summary>
/// Class for the MapModel of the mainCampus of cottbus
/// </summary>
public class CBMainMapModel : MapModel
{
#region Member
/// <summary>Variable for the identify of the campus.</summary>
private static readonly string Campus = ((int)CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN).ToString();
/// <summary>
/// Variable for the PlaceFile
/// </summary>
private PlacesFile file;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
/// </summary>
public CBMainMapModel()
{
this.ImageSource = Constants.FileMap_CBMainMap;
this.ImageWidth = 2000;
this.ImageHeight = 1425;
this.MapImageOffsetX = -228;
this.MapImageOffsetY = -300;
this.RefPoint = new Point(1365, 800);
this.ScaleX = 129483.4123222749;
this.ScaleY = 197648.8919266073;
this.GeoOffsetX = 14.327159;
this.GeoOffsetY = 51.766548;
}
#endregion
#region Method
/// <summary>Loads the spatial./.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected override void LoadSpatials()
{
if (this.file == null)
{
this.file = new PlacesFile();
}
this.file.OnLoaded += new PlacesFile.OnIO(this.FileIsReady);
this.file.LoadData();
}
/// <summary>
/// Method is called if the PlaceFile is loaded
/// </summary>
private void FileIsReady()
{
SpsModel model = this.file.Model;
this.Spatial = new SpsModel();
foreach (PlaceModel place in model.Places)
{
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
{
this.Spatial.Places.Add(place);
}
}
}
#endregion
}
}

View File

@@ -0,0 +1,33 @@
//-----------------------------------------------------------------------
// <copyright file="CurrentPositionPinModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>27.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
using System.Windows;
using CampusAppWP8.Resources;
/// <summary>Current position pin model.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
public class CurrentPositionPinModel : MapPinModel
{
#region Constructor
/// <summary>Initializes a new instance of the CurrentPositionPinModel class.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
public CurrentPositionPinModel()
{
this.ImageSource = Icons.CurrentPosition;
this.ImageWidth = 60;
this.ImageHeight = 60;
this.PinImageOffsetX = -25;
this.PinImageOffsetY = -34;
}
#endregion
}
}

View File

@@ -0,0 +1,15 @@
//-----------------------------------------------------------------------------
// <copyright file="HiddenPinPlaceModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>fiedlchr</author>
// <sience>13.08.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
/// <summary>Hidden pin place model.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
public class HiddenPinPlaceModel : MapPinModel
{
}
}

View File

@@ -6,11 +6,14 @@
// <sience>24.06.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
{
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using CampusAppWP8.Model.GeoDb;
/// <summary>
/// This Class manage the properties of a Map
@@ -24,10 +27,25 @@ namespace CampusAppWP8.Model.Campusmap
/// </summary>
public MapModel()
{
this.LoadSpatials();
}
#endregion
#region Events
/// <summary>
/// Delegate for MapInfo
/// </summary>
/// <param name="places">list of places</param>
public delegate void MapInfos(List<PlaceModel> places);
/// <summary>
/// Event ShowMapInfo
/// </summary>
public event MapInfos ShowMapInfos = null;
#endregion
#region Property
/// <summary>
@@ -68,17 +86,28 @@ namespace CampusAppWP8.Model.Campusmap
/// <summary>
/// Gets or sets the Scale (to pixel) of the map
/// </summary>
public double Scale { get; set; }
public double ScaleX { get; set; }
/// <summary>
/// Gets or sets the Scale (to pixel) of the map
/// </summary>
public double ScaleY { get; set; }
/// <summary>
/// Gets or sets the reference point
/// </summary>
public Point RefPoint { get; set; }
/// <summary>Gets or sets the spatial of the map.</summary>
/// <value>The spatial.</value>
public SpsModel Spatial { get; set; }
#endregion
#region Methods
#region public
/// <summary>
/// Method calculate the coordinates of ScrollToOffsets point
/// </summary>
@@ -103,75 +132,159 @@ namespace CampusAppWP8.Model.Campusmap
return new Point(x, y);
}
/// <summary>
/// Method create in image, which can show at a certain position
/// </summary>
/// <param name="x">the x- coordinate</param>
/// <param name="y">the y-coordinate</param>
/// <returns>image of the pin</returns>
public Image AddPin(double x, double y)
/// <summary>Method create in image, which can show at a certain position.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
/// <param name="x"> the x- coordinate.</param>
/// <param name="y"> the y-coordinate.</param>
/// <param name="type">The type.</param>
/// <param name="places">list of places</param>
/// <returns>image of the pin.</returns>
public Image AddPin(double x, double y, MapPinModel.PinType type, List<PlaceModel> places = null)
{
Point position = new Point(x, y);
return this.AddPin(position);
return this.AddPin(position, type, places);
}
/// <summary>
/// Method create in image, which can show at a certain position depend of the <see cref="RefPoint" />
/// Method create in image, which can show at a certain position depend of the
/// <see cref="RefPoint" />
/// </summary>
/// <param name="x">the x-coordinate</param>
/// <param name="y">the y-coordinate</param>
/// <returns>image of the pin</returns>
public Image AddPinFromRefPoint(double x, double y)
/// <remarks>Stubbfel, 27.08.2013.</remarks>
/// <param name="x"> the x-coordinate.</param>
/// <param name="y"> the y-coordinate.</param>
/// <param name="type">The type.</param>
/// <param name="places">list of places</param>
/// <returns>image of the pin.</returns>
public Image AddPinFromRefPoint(double x, double y, MapPinModel.PinType type, List<PlaceModel> places = null)
{
Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y);
return this.AddPin(position);
return this.AddPin(position, type, places);
}
/// <summary>
/// Method create in image, which can show at a certain position depend of the <see cref="RefPoint" />
/// Method create in image, which can show at a certain position depend of the
/// <see cref="RefPoint" />
/// </summary>
/// <param name="position">input point</param>
/// <returns>image of the pin</returns>
public Image AddPinFromRefPoint(Point position)
/// <remarks>Stubbfel, 27.08.2013.</remarks>
/// <param name="position">input point.</param>
/// <param name="type"> The type.</param>
/// <param name="places">list of places</param>
/// <returns>image of the pin.</returns>
public Image AddPinFromRefPoint(Point position, MapPinModel.PinType type, List<PlaceModel> places = null)
{
return this.AddPinFromRefPoint(position.X, position.Y);
return this.AddPinFromRefPoint(position.X, position.Y, type, places);
}
/// <summary>
/// Method create in image, which can show at a certain position
/// </summary>
/// <param name="position">input point</param>
/// <returns>image of the pin</returns>
public Image AddPin(Point position)
/// <summary>Method create in image, which can show at a certain position.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
/// <param name="position">input point.</param>
/// <param name="type"> The type.</param>
/// <param name="places">list of places</param>
/// <returns>image of the pin.</returns>
public Image AddPin(Point position, MapPinModel.PinType type, List<PlaceModel> places = null)
{
MapPinModel pin = new MapPinModel() { Position = position };
Image pinImg = new Image() { Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative)), Width = pin.ImageWidth };
Image pinImg = new Image();
MapPinModel pin = this.CreatePin(type, places, pinImg);
pin.Position = position;
if (pin.ImageSource != null)
{
pinImg.Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative));
pinImg.Width = pin.ImageWidth;
pinImg.Height = pin.ImageHeight;
}
Canvas.SetTop(pinImg, pin.Position.Y);
Canvas.SetLeft(pinImg, pin.Position.X);
return pinImg;
}
/// <summary>
/// Convert a coordinates to coordinates which address pixels
/// </summary>
/// <param name="x">the x-coordinate</param>
/// <param name="y">the y-coordinate</param>
/// <returns>Point in pixel-size</returns>
/// <summary>Convert a coordinates to coordinates which address pixels.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
/// <param name="x">the x-coordinate.</param>
/// <param name="y">the y-coordinate.</param>
/// <returns>Point in pixel-size.</returns>
public Point ConverToPixelPoint(double x, double y)
{
return new Point { X = this.Scale * x, Y = this.Scale * y };
Point p = new Point { X = this.ScaleX * x, Y = this.ScaleY * y };
return p;
}
/// <summary>
/// Convert a coordinates to coordinates which address pixels
/// </summary>
/// <param name="point">not scaled point</param>
/// <param name="point">not scaled point</param>d
/// <returns>Point in pixel-size</returns>
public Point ConverToPixelPoint(Point point)
{
return this.ConverToPixelPoint(point.X, point.Y);
}
/// <summary>
/// Convert a coordinates to coordinates which address mapPoint
/// </summary>
/// <param name="x">the x-coordinate</param>
/// <param name="y">the y-coordinate</param>
/// <returns>Point in pixel-size</returns>
public Point ConverToMapPoint(double x, double y)
{
return new Point { X = x - this.GeoOffsetX, Y = y - this.GeoOffsetY };
}
/// <summary>
/// Convert a coordinates to coordinates which address mapPoint
/// </summary>
/// <param name="point">not scaled point</param>
/// <returns>Point in pixel-size</returns>
public Point ConverToMapPoint(Point point)
{
return this.ConverToMapPoint(point.X, point.Y);
}
#endregion
#region protected
/// <summary>Loads the spatial./</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
protected virtual void LoadSpatials()
{
}
#endregion
#region private
/// <summary>Creates a pin.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
/// <param name="type">The type.</param>
/// <param name="places">list of places</param>
/// <param name="pinImg">image of the pin</param>
/// <returns>The new pin.</returns>
private MapPinModel CreatePin(MapPinModel.PinType type, List<PlaceModel> places, Image pinImg)
{
MapPinModel pin;
switch (type)
{
case MapPinModel.PinType.CurrentPosition:
pin = new CurrentPositionPinModel();
break;
case MapPinModel.PinType.SearchPlace:
pin = new SearchPlacePinModel();
pinImg.MouseLeftButtonDown += new MouseButtonEventHandler(((SearchPlacePinModel)pin).ShowInfo);
((SearchPlacePinModel)pin).AssocPlaces = places;
((SearchPlacePinModel)pin).CallBack = this.ShowMapInfos;
break;
default:
pin = new HiddenPinPlaceModel();
break;
}
return pin;
}
#endregion
#endregion
}
}

View File

@@ -8,11 +8,12 @@
namespace CampusAppWP8.Model.Campusmap
{
using System.Windows;
using System.Windows.Input;
/// <summary>
/// This Class manage the properties of a MapPin
/// </summary>
public class MapPinModel
public abstract class MapPinModel
{
#region Member
@@ -22,21 +23,33 @@ namespace CampusAppWP8.Model.Campusmap
private Point position;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MapPinModel" /> class.
/// </summary>
public MapPinModel()
{
this.ImageSource = "/Assets/icons/search_159_light.png";
this.ImageWidth = 60;
this.ImageHeight = 60;
this.PinImageOffsetX = -24;
this.PinImageOffsetY = -24;
}
#endregion
#region enums
/// <summary>Values that represent PinType.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
public enum PinType
{
/// <summary>An enum constant representing the hidden option.</summary>
Hidden = 0,
/// <summary>An enum constant representing the search place option.</summary>
SearchPlace = 1,
/// <summary>An enum constant representing the current position option.</summary>
CurrentPosition = 2
}
#endregion
#region Property
/// <summary>

View File

@@ -0,0 +1,64 @@
//-----------------------------------------------------------------------
// <copyright file="SearchPlacePinModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>27.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Campusmap
{
using System.Collections.Generic;
using CampusAppWP8.Model.GeoDb;
using CampusAppWP8.Resources;
/// <summary>Search pin place model.</summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
public class SearchPlacePinModel : MapPinModel
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="SearchPlacePinModel" /> class.
/// </summary>
/// <remarks>Stubbfel, 27.08.2013.</remarks>
public SearchPlacePinModel()
{
this.ImageSource = Icons.SearchPlace;
this.ImageWidth = 60;
this.ImageHeight = 60;
this.PinImageOffsetX = -25;
this.PinImageOffsetY = -27;
}
#endregion
#region property
/// <summary>
/// Gets or sets Callback Function, to show place information of the Pin
/// </summary>
public MapModel.MapInfos CallBack { get; set; }
/// <summary>
/// Gets or sets place which are associative with this pin
/// </summary>
public List<PlaceModel> AssocPlaces { get; set; }
#endregion
#region Method
/// <summary>
/// Show Information of this pin places
/// </summary>
/// <param name="sender">sender of the Event</param>
/// <param name="e">MouseButtonEvent Arguments</param>
public void ShowInfo(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
this.CallBack(this.AssocPlaces);
}
#endregion
}
}

View File

@@ -15,6 +15,8 @@ namespace CampusAppWP8.Model.Departments
/// </summary>
public class ChairModel
{
#region Member
/// <summary>
/// German name of the chair.
/// </summary>
@@ -30,6 +32,10 @@ namespace CampusAppWP8.Model.Departments
/// </summary>
private string nameEN = string.Empty;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="ChairModel" /> class.
/// </summary>
@@ -37,6 +43,10 @@ namespace CampusAppWP8.Model.Departments
{
}
#endregion
#region Property
/// <summary>
/// Initializes a new instance of the <see cref="ChairModel" /> class.
/// </summary>
@@ -124,5 +134,7 @@ namespace CampusAppWP8.Model.Departments
}
}
}
#endregion
}
}

View File

@@ -17,6 +17,8 @@ namespace CampusAppWP8.Model.Departments
[XmlRoot("root")]
public class DepartmentModel
{
#region Member
/// <summary>
/// Object to store the time when the instance was created.
/// </summary>
@@ -27,6 +29,10 @@ namespace CampusAppWP8.Model.Departments
/// </summary>
private ObservableCollection<FacultyModel> faculties;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="DepartmentModel" /> class.
/// </summary>
@@ -36,6 +42,10 @@ namespace CampusAppWP8.Model.Departments
this.createTime = DateTime.Now;
}
#endregion
#region Property
/// <summary>
/// Gets or sets the faculty list.
/// </summary>
@@ -68,11 +78,15 @@ namespace CampusAppWP8.Model.Departments
}
}
#endregion
#region Method
/// <summary>
/// Check if the content of the faculty lists hast changed since the
/// last call of this function.
/// </summary>
/// <returns>true, if changes happend since last request, otherwise false</returns>
/// <returns>true, if changes happen since last request, otherwise false</returns>
public bool HasChanged()
{
bool retValue = false;
@@ -87,5 +101,7 @@ namespace CampusAppWP8.Model.Departments
return retValue;
}
#endregion
}
}

View File

@@ -16,6 +16,8 @@ namespace CampusAppWP8.Model.Departments
/// </summary>
public class FacultyModel
{
#region Member
/// <summary>
/// Object to hold the information of the chair containing to this
/// faculty.
@@ -32,6 +34,10 @@ namespace CampusAppWP8.Model.Departments
/// </summary>
private bool hasChanged = false;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="FacultyModel" /> class.
/// </summary>
@@ -40,6 +46,10 @@ namespace CampusAppWP8.Model.Departments
this.chairs = new ObservableCollection<ChairModel>();
}
#endregion
#region Property
/// <summary>
/// Initializes a new instance of the <see cref="FacultyModel" /> class.
/// </summary>
@@ -126,6 +136,10 @@ namespace CampusAppWP8.Model.Departments
return retValue;
}
#endregion
#region Method
/// <summary>
/// Add a chair to the list, if it does not already exist.
/// </summary>
@@ -221,7 +235,7 @@ namespace CampusAppWP8.Model.Departments
/// <summary>
/// Return true if there were changes in the chair list, otherwise false.
/// </summary>
/// <param name="reset">when true, the hasChanged flag will be reseted</param>
/// <param name="reset">when true, the hasChanged flag will be reset</param>
/// <returns>true, when changed, otherwise false</returns>
public bool HasChanged(bool reset = true)
{
@@ -234,5 +248,7 @@ namespace CampusAppWP8.Model.Departments
return retValue;
}
#endregion
}
}

View File

@@ -0,0 +1,52 @@
//-----------------------------------------------------------------------
// <copyright file="ExamlistModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>02.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Exams
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
using CampusAppWP8.Model.Utility;
/// <summary>Exam list model.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
[XmlRoot("links")]
public class ExamListModel
{
#region Property
/// <summary>Gets or sets the exams.</summary>
/// <value>The exams.</value>
[XmlElement("link")]
public ObservableCollection<ExamModel> Exams { get; set; }
#endregion
#region Property
/// <summary>Creates course list.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <returns>The new course list.</returns>
public List<CourseModel> CreateCourseList()
{
List<CourseModel> result = new List<CourseModel>();
foreach (ExamModel exam in this.Exams)
{
CourseModel tmpModel = new CourseModel(exam.CourseNumber, exam.CourseText);
if (!result.Contains(tmpModel))
{
result.Add(tmpModel);
}
}
return result;
}
#endregion
}
}

View File

@@ -0,0 +1,71 @@
//-----------------------------------------------------------------------
// <copyright file="ExamModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>02.09.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Exams
{
using System.Xml.Serialization;
using CampusAppWP8.Utility;
/// <summary>Exam model.</summary>
/// <remarks>Stubbfel, 02.09.2013.</remarks>
public class ExamModel
{
#region Property
/// <summary>Gets or sets the course number.</summary>
/// <value>The course number.</value>
[XmlAttribute("stg")]
public string CourseNumber { get; set; }
/// <summary>Gets or sets the course text.</summary>
/// <value>The course text.</value>
[XmlAttribute("stgtext")]
public string CourseText { get; set; }
/// <summary>Gets or sets the degree number.</summary>
/// <value>The degree number.</value>
[XmlAttribute("abschl")]
public string DegreeNumber { get; set; }
/// <summary>Gets or sets the version.</summary>
/// <value>The version.</value>
[XmlAttribute("pversion")]
public string Version { get; set; }
/// <summary>Gets or sets the type.</summary>
/// <value>The type.</value>
[XmlAttribute("typ")]
public string Type { get; set; }
/// <summary>Gets or sets the title.</summary>
/// <value>The title.</value>
[XmlAttribute("dtxt")]
public string Title { get; set; }
/// <summary>Gets or sets the date.</summary>
/// <value>The date.</value>
[XmlAttribute("datum")]
public string Date { get; set; }
/// <summary>Gets or sets the link.</summary>
/// <value>The link.</value>
[XmlAttribute("link")]
public string Link { get; set; }
/// <summary>Gets the caption.</summary>
/// <value>The caption.</value>
public string Caption
{
get
{
return Wp8StringManager.StripAndDecodeHTML(this.CourseText + " (" + this.Type + "/" + this.Version + ")");
}
}
#endregion
}
}

View File

@@ -0,0 +1,49 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceInformation.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Information about the place.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
public class PlaceInformation : IEquatable<PlaceInformation>
{
#region Property
/// <summary>Gets or sets the name of the information.</summary>
/// <value>The name of the information.</value>
[XmlAttribute("placeInformationName")]
public string InformationName { get; set; }
/// <summary>Gets or sets the information value.</summary>
/// <value>The information value.</value>
[XmlText]
public string InformationValue { get; set; }
#endregion
#region Method
/// <summary>Tests if this PlaceInformation is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place information to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
public bool Equals(PlaceInformation other)
{
if (other.InformationName.Equals(this.InformationName))
{
return true;
}
return false;
}
#endregion
}
}

View File

@@ -0,0 +1,230 @@
//-----------------------------------------------------------------------
// <copyright file="PlaceModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Device.Location;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWPortalLib8.Utility;
/// <summary>
/// Model for a place of the SPSService
/// </summary>
public class PlaceModel : IEquatable<PlaceModel>
{
#region Property
/// <summary>
/// Gets or sets the placeId
/// </summary>
[XmlAttribute("id")]
public string PlaceId { get; set; }
/// <summary>
/// Gets or sets the id of the "parent" of a place
/// </summary>
[XmlAttribute("parentId")]
public string ParentId { get; set; }
/// <summary>
/// Gets or sets the ReferencePoint of a place
/// </summary>
[XmlAttribute("refpoint")]
public string RefPoint { get; set; }
/// <summary>Gets the geo reference point.</summary>
/// <value>The geo reference point.</value>
public GeoCoordinate GeoRefPoint
{
get
{
string refstring = this.RefPoint;
Regex rx = new Regex(Constants.Regex_Coordinate);
MatchCollection matches = rx.Matches(refstring);
if (matches.Count != 1)
{
return null;
}
string[] values = matches[0].ToString().Split(' ');
if (values.Length != 2)
{
return null;
}
// create the GeoCoordirate
try
{
return new GeoCoordinate(double.Parse(values[1], CultureInfo.InvariantCulture), double.Parse(values[0], CultureInfo.InvariantCulture));
}
catch (Exception ex)
{
Logger.LogException(ex);
return null;
}
}
}
/// <summary>Gets or sets the information.</summary>
/// <value>The information.</value>
[XmlElement("placeInformation")]
public ObservableCollection<PlaceInformation> Informations { get; set; }
/// <summary>Gets or sets the services.</summary>
/// <value>The services.</value>
[XmlElement("placeService")]
public ObservableCollection<PlaceService> Services { get; set; }
#endregion
#region Method
/// <summary>Converts this object to a nfc string.</summary>
/// <remarks>Stubbfel, 21.08.2013.</remarks>
/// <returns>This object as a string.</returns>
public string ToNfcString()
{
string nfcStr = "{\"pid\":\"" + this.PlaceId + "\",\"parent\":\"" + this.ParentId + "\"}";
return nfcStr;
}
/// <summary>Tests if this PlaceModel is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place model to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
public bool Equals(PlaceModel other)
{
if (other.PlaceId.Equals(this.PlaceId))
{
return true;
}
return false;
}
/// <summary>Adds a place information.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeInformations">The place information.</param>
public void AddPlaceInformations(List<PlaceInformation> placeInformations)
{
foreach (PlaceInformation info in placeInformations)
{
if (this.Informations.Contains(info))
{
int index = this.Informations.IndexOf(info);
this.Informations[index].InformationValue = info.InformationValue;
}
else
{
this.Informations.Add(info);
}
}
}
/// <summary>Adds a place services.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="placeServices">The place services.</param>
public void AddPlaceServices(List<PlaceService> placeServices)
{
foreach (PlaceService service in placeServices)
{
if (this.Services.Contains(service))
{
int index = this.Services.IndexOf(service);
this.Services[index].Request = service.Request;
this.Services[index].SAP = service.SAP;
}
else
{
this.Services.Add(service);
}
}
}
/// <summary>Query if 'names' contains information names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="names">The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsInformationNames(List<string> names)
{
foreach (string name in names)
{
bool tmpResult = false;
foreach (PlaceInformation info in this.Informations)
{
if (name.Equals(info.InformationName))
{
tmpResult = true;
break;
}
}
if (!tmpResult)
{
return tmpResult;
}
}
return true;
}
/// <summary>Query if 'services' contains service names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="services">The services.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsServiceNames(List<string> services)
{
foreach (string name in services)
{
bool tmpResult = false;
foreach (PlaceService service in this.Services)
{
if (name.Equals(service.ServiceName))
{
tmpResult = true;
break;
}
}
if (!tmpResult)
{
return tmpResult;
}
}
return true;
}
/// <summary>
/// Method gets the InformationValue of a certain InformationName
/// </summary>
/// <param name="key">string for InformationName</param>
/// <returns>value of the information</returns>
public string GetInformationsValue(string key)
{
foreach (PlaceInformation info in this.Informations)
{
if (info.InformationName.Equals(key))
{
return info.InformationValue;
}
}
return null;
}
#endregion
}
}

View File

@@ -0,0 +1,65 @@
//-----------------------------------------------------------------------------
// <copyright file="PlaceService.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>19.08.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System;
using System.Xml.Serialization;
/// <summary>Place service.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
public class PlaceService : IEquatable<PlaceService>
{
#region Property
/// <summary>Gets or sets the name of the service.</summary>
/// <value>The name of the service.</value>
[XmlAttribute("placeServiceName")]
public string ServiceName { get; set; }
/// <summary>Gets or sets the SAP of an service.</summary>
/// <value>The sap.</value>
[XmlElement("sap")]
public string SAP { get; set; }
/// <summary>Gets or sets the request for a place.</summary>
/// <value>The request.</value>
[XmlElement("request")]
public string Request { get; set; }
#endregion
#region Method
/// <summary>Gets the URL string.</summary>
/// <value>The URL string.</value>
public string URLString
{
get
{
return this.SAP + this.Request;
}
}
/// <summary>Tests if this PlaceService is considered equal to another.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="other">The place service to compare to this object.</param>
/// <returns>true if the objects are considered equal, false if they are not.</returns>
public bool Equals(PlaceService other)
{
if (other.ServiceName.Equals(this.ServiceName))
{
return true;
}
return false;
}
#endregion
}
}

View File

@@ -0,0 +1,232 @@
//-----------------------------------------------------------------------
// <copyright file="SpsModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>08.08.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.GeoDb
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Serialization;
/// <summary>
/// Model for a xml-response of the SPSService
/// </summary>
[XmlRoot("root")]
public class SpsModel
{
#region Constructor
/// <summary>Initializes a new instance of the SpsModel class.</summary>
/// <remarks>Stubbfel, 20.08.2013.</remarks>
public SpsModel()
{
this.HasChanged = false;
this.Places = new ObservableCollection<PlaceModel>();
}
#endregion
#region Property
/// <summary>
/// Gets or sets a list of places
/// </summary>
[XmlElement("place")]
public ObservableCollection<PlaceModel> Places { get; set; }
/// <summary>Gets or sets a value indicating whether this object has changed.</summary>
/// <value>true if this object has changed, false if not.</value>
public bool HasChanged { get; set; }
#endregion
#region Method
#region public
/// <summary>Gets places by information.</summary>
/// <remarks>Stubbfel, 19.08.2013.</remarks>
/// <param name="query"> The query.</param>
/// <param name="ignoreCases"> (Optional) the ignore cases.</param>
/// <param name="informationNames">(Optional) name of the information.</param>
/// <returns>The places by information.</returns>
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, List<string> informationNames = null)
{
string querryStr = string.Empty;
List<PlaceModel> resultplaces = new List<PlaceModel>();
foreach (PlaceModel place in this.Places)
{
if (this.IsPlaceQueryMatched(place, query, ignoreCases, informationNames))
{
resultplaces.Add(place);
}
}
return resultplaces;
}
/// <summary>Adds the places.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="places">A list of places.</param>
public void AddPlaces(List<PlaceModel> places)
{
foreach (PlaceModel place in places)
{
if (this.Places.Contains(place))
{
int index = this.Places.IndexOf(place);
this.Places[index].AddPlaceInformations(place.Informations.ToList());
this.Places[index].AddPlaceServices(place.Services.ToList());
}
else
{
this.Places.Add(place);
}
}
this.HasChanged = true;
}
/// <summary>Creates PID list.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <returns>The new PID list.</returns>
public List<string> CreatePidList()
{
List<string> pidList = new List<string>();
foreach (PlaceModel place in this.Places)
{
pidList.Add(place.PlaceId);
}
return pidList;
}
/// <summary>Gets place by identifier.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="id">The identifier.</param>
/// <returns>The place by identifier.</returns>
public PlaceModel GetPlaceById(string id)
{
foreach (PlaceModel place in this.Places)
{
if (place.PlaceId.Equals(id))
{
return place;
}
}
return null;
}
/// <summary>Query if 'pidList' contains information names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <param name="names"> The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsInformationNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
{
PlaceModel place = this.GetPlaceById(pid);
if (!place.ContainsInformationNames(names))
{
return false;
}
}
return true;
}
/// <summary>Query if 'pidList' contains service names.</summary>
/// <remarks>Stubbfel, 09.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <param name="names"> The names.</param>
/// <returns>true if it succeeds, false if it fails.</returns>
public bool ContainsServiceNames(List<string> pidList, List<string> names)
{
foreach (string pid in pidList)
{
PlaceModel place = this.GetPlaceById(pid);
if (!place.ContainsServiceNames(names))
{
return false;
}
}
return true;
}
/// <summary>Filter by PID.</summary>
/// <remarks>Stubbfel, 11.09.2013.</remarks>
/// <param name="pidList">List of pids.</param>
/// <returns>filtered list of places.</returns>
public List<PlaceModel> FilterByPid(List<string> pidList)
{
List<PlaceModel> fitlerList = new List<PlaceModel>();
foreach (PlaceModel place in this.Places)
{
if (pidList.Contains(place.PlaceId))
{
fitlerList.Add(place);
}
}
return fitlerList;
}
#endregion
#region private
/// <summary>
/// Method check if a certain place matched by query string
/// </summary>
/// <param name="place">the Place</param>
/// <param name="query">the Query</param>
/// <param name="ignoreCases"> (Optional) the ignore cases.</param>
/// <param name="informationNames">(Optional) name of the information.</param>
/// <returns>true if it match otherwise false</returns>
private bool IsPlaceQueryMatched(PlaceModel place, string query, bool ignoreCases = true, List<string> informationNames = null)
{
string queryString = query;
if (ignoreCases)
{
queryString = query.ToLower();
}
bool allInfos = true;
if (informationNames != null && informationNames.Count > 0)
{
allInfos = false;
}
foreach (PlaceInformation info in place.Informations)
{
if (allInfos || informationNames.Contains(info.InformationName))
{
string infoVal = info.InformationValue;
if (ignoreCases)
{
infoVal = infoVal.ToLower();
}
if (infoVal.Contains(queryString))
{
return true;
}
}
}
return false;
}
#endregion
#endregion
}
}

View File

@@ -9,6 +9,7 @@ namespace CampusAppWP8.Model.Lecture
{
using System.Collections.ObjectModel;
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
@@ -18,6 +19,21 @@ namespace CampusAppWP8.Model.Lecture
{
#region Members
/// <summary>The activity icon name lecture.</summary>
private const string ActivityIconNameLecture = "Vorlesung";
/// <summary>The activity icon name seminar.</summary>
private const string ActivityIconNameSeminar = "Seminar";
/// <summary>The activity icon name practice.</summary>
private const string ActivityIconNamePract = "Übung";
/// <summary>The activity icon name lab.</summary>
private const string ActivityIconNameLab = "Labor";
/// <summary>The activity icon name exam.</summary>
private const string ActivityIconNameExam = "Prüfung";
/// <summary>
/// List of lecturer
/// </summary>
@@ -38,7 +54,11 @@ namespace CampusAppWP8.Model.Lecture
/// </summary>
private string topic;
/// <summary>URL of the icon.</summary>
private string iconUrl;
#endregion
#region Constructor
/// <summary>
@@ -83,7 +103,7 @@ namespace CampusAppWP8.Model.Lecture
public LectureModule Modul { get; set; }
/// <summary>
/// Gets or sets LectureTitel
/// Gets or sets LectureTitle
/// </summary>
[XmlElement("titel")]
public string Title { get; set; }
@@ -179,15 +199,27 @@ namespace CampusAppWP8.Model.Lecture
{
if (value != this.topic)
{
this.topic = StringManager.StripHTML(value);
this.topic = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
/// <summary>Gets URL of the icon.</summary>
/// <value>The icon URL.</value>
public string IconUrl
{
get
{
this.CreateIconUrl();
return this.iconUrl;
}
}
#endregion
#region Methods
#region public
/// <summary>
/// Method create a formatted string of the LecturerList
/// </summary>
@@ -196,10 +228,10 @@ namespace CampusAppWP8.Model.Lecture
string result = string.Empty;
foreach (LectureLecturer tmpLecturer in this.Lecturer)
{
result += StringManager.AddNewLine(tmpLecturer.ToString());
result += Wp8StringManager.AddNewLine(tmpLecturer.ToString());
}
this.LecturerString = StringManager.RemvoveNewLine(result);
this.LecturerString = Wp8StringManager.RemoveNewLine(result);
}
/// <summary>
@@ -210,12 +242,50 @@ namespace CampusAppWP8.Model.Lecture
string result = string.Empty;
foreach (LectureCourse course in this.Course)
{
result += StringManager.AddNewLine(course.Title);
result += Wp8StringManager.AddNewLine(course.Title);
}
this.CourseString = StringManager.RemvoveNewLine(result);
this.CourseString = Wp8StringManager.RemoveNewLine(result);
}
#endregion
#region private
/// <summary>Creates icon URL.</summary>
/// <remarks>Stubbfel, 12.09.2013.</remarks>
private void CreateIconUrl()
{
string typeStr = this.Type;
if (typeStr.Contains(LectureActivity.ActivityIconNameLecture))
{
this.iconUrl = Icons.Lecture;
}
else if (typeStr.Contains(LectureActivity.ActivityIconNameExam))
{
this.iconUrl = Icons.Exams;
}
else if (typeStr.Contains(LectureActivity.ActivityIconNamePract))
{
this.iconUrl = Icons.Practise;
}
else if (typeStr.Contains(LectureActivity.ActivityIconNameSeminar))
{
this.iconUrl = Icons.Info;
}
else if (typeStr.Contains(LectureActivity.ActivityIconNameLab))
{
this.iconUrl = Icons.Lab;
}
else
{
this.iconUrl = Icons.Info;
}
}
#endregion
#endregion
}
}

View File

@@ -13,6 +13,8 @@ namespace CampusAppWP8.Model.Lecture
/// </summary>
public class LectureCourse
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="LectureCourse" /> class.
/// </summary>
@@ -20,10 +22,16 @@ namespace CampusAppWP8.Model.Lecture
{
}
#endregion
#region Property
/// <summary>
/// Gets or sets the title of the course
/// </summary>
[XmlElement("bezeichnung")]
public string Title { get; set; }
#endregion
}
}

View File

@@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.Lecture
/// </summary>
public class LectureDate
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="LectureDate" /> class.
/// </summary>
@@ -21,6 +23,10 @@ namespace CampusAppWP8.Model.Lecture
{
}
#endregion
#region Property
/// <summary>
/// Gets or sets WeekDay
/// </summary>
@@ -63,5 +69,6 @@ namespace CampusAppWP8.Model.Lecture
[XmlElement("enddatum")]
public string EndDate { get; set; }
#endregion
}
}

View File

@@ -14,6 +14,8 @@ namespace CampusAppWP8.Model.Lecture
/// </summary>
public class LectureLecturer
{
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="LectureLecturer" /> class.
/// </summary>
@@ -21,6 +23,10 @@ namespace CampusAppWP8.Model.Lecture
{
}
#endregion
#region Property
/// <summary>
/// Gets or sets the FirstName of a lecturer
/// </summary>
@@ -45,6 +51,10 @@ namespace CampusAppWP8.Model.Lecture
[XmlAttribute("zustaendigkeit")]
public string Responsibility { get; set; }
#endregion
#region Method
/// <summary>
/// Method overrides the base ToString() and create an formatted string of the lecturer
/// </summary>
@@ -68,5 +78,7 @@ namespace CampusAppWP8.Model.Lecture
return result;
}
#endregion
}
}

View File

@@ -52,6 +52,24 @@ namespace CampusAppWP8.Model.Lecture
return activity;
}
/// <summary>Filter by course string.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
/// <param name="filter">Specifies the filter.</param>
public void FilterByCourseTitle(string filter)
{
ObservableCollection<LectureActivity> filteredCollection = new ObservableCollection<LectureActivity>();
filter = filter.Trim().ToLower();
foreach (LectureActivity activity in this.Activities)
{
activity.CreateCourseString();
if (activity.Title.ToLower().Contains(filter))
{
filteredCollection.Add(activity);
}
}
this.Activities = filteredCollection;
}
#endregion
}
}

View File

@@ -7,11 +7,9 @@
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Lecture
{
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using CampusAppWP8.Model.Setting;
using CampusAppWP8.Model.Utility;
using CampusAppWP8.Resources;
/// <summary>
/// Model for the LecturePage
@@ -21,28 +19,63 @@ namespace CampusAppWP8.Model.Lecture
{
#region Members
/// <summary>
/// Variable for the courseIndex
/// </summary>
[DataMember]
public int selectCourseIndex;
/// <summary>
/// Variable for the degreeIndex
/// </summary>
[DataMember]
public int selectDegreeIndex;
/// <summary>
/// Variable for the semesterIndex
/// </summary>
[DataMember]
public int selectSemesterIndex;
/// <summary>
/// Variable for the fromIndex
/// </summary>
[DataMember]
public int selectFromIndex;
/// <summary>
/// Variable for the toIndex
/// </summary>
[DataMember]
public int selectToIndex;
/// <summary>
/// List for the courses of the BTU
/// </summary>
/// <remarks>
/// need to be extend to full list
/// </remarks>
private List<ListPickerItemModel> courseList;
private CourseListPickerItemListModel courseList;
/// <summary>
/// List of the degrees
/// </summary>
private List<ListPickerItemModel> degreeList;
private ListPickerItemListModel degreeList;
/// <summary>
/// List of the semester
/// </summary>
private List<ListPickerItemModel> semesterList;
private ListPickerItemListModel semesterList;
/// <summary>
/// List for the number of semester
/// List for the number of semester (from)
/// </summary>
private List<ListPickerItemModel> numberList;
private ListPickerItemListModel fromNumberList;
/// <summary>
/// List for the number of semester (to)
/// </summary>
private ListPickerItemListModel toNumberList;
#endregion
@@ -56,42 +89,121 @@ namespace CampusAppWP8.Model.Lecture
}
#endregion
#region events
/// <summary>
/// Delegate of the OnIO callback function.
/// </summary>
public delegate void OnIO();
/// <summary>
/// Callback pointer, called after loading.
/// </summary>
public event OnIO OnLoaded = null;
#endregion
#region Proberty
/// <summary>
/// Gets or sets the selected course index
/// </summary>
[DataMember]
public int SelectCourseIndex { get; set; }
public int SelectCourseIndex
{
get
{
return this.selectCourseIndex;
}
set
{
if (value != this.selectCourseIndex && this.courseList != null && value < this.courseList.List.Count)
{
this.selectCourseIndex = value;
}
}
}
/// <summary>
/// Gets or sets the selected degree index
/// </summary>
[DataMember]
public int SelectDegreeIndex { get; set; }
public int SelectDegreeIndex
{
get
{
return this.selectDegreeIndex;
}
set
{
if (value != this.selectDegreeIndex && this.degreeList != null && value < this.degreeList.List.Count)
{
this.selectDegreeIndex = value;
}
}
}
/// <summary>
/// Gets or sets the selected semester-index
/// </summary>
[DataMember]
public int SelectSemesterIndex { get; set; }
public int SelectSemesterIndex
{
get
{
return this.selectSemesterIndex;
}
set
{
if (value != this.selectSemesterIndex && this.semesterList != null && value < this.semesterList.List.Count)
{
this.selectSemesterIndex = value;
}
}
}
/// <summary>
/// Gets or sets the selected from-index
/// </summary>
[DataMember]
public int SelectFromIndex { get; set; }
public int SelectFromIndex
{
get
{
return this.selectFromIndex;
}
set
{
if (value != this.selectFromIndex && this.fromNumberList != null && value < this.fromNumberList.List.Count)
{
this.selectFromIndex = value;
}
}
}
/// <summary>
/// Gets or sets the selected to-index
/// </summary>
[DataMember]
public int SelectToIndex { get; set; }
public int SelectToIndex
{
get
{
return this.selectToIndex;
}
set
{
if (value != this.selectToIndex && this.toNumberList != null && value < this.toNumberList.List.Count)
{
this.selectToIndex = value;
}
}
}
/// <summary>
/// Gets List for the courses of the BTU
/// </summary>
public List<ListPickerItemModel> CourseList
public ListPickerItemListModel CourseList
{
get
{
@@ -102,7 +214,7 @@ namespace CampusAppWP8.Model.Lecture
/// <summary>
/// Gets List of the degrees
/// </summary>
public List<ListPickerItemModel> DegreeList
public ListPickerItemListModel DegreeList
{
get
{
@@ -113,7 +225,7 @@ namespace CampusAppWP8.Model.Lecture
/// <summary>
/// Gets List of the semester
/// </summary>
public List<ListPickerItemModel> SemesterList
public ListPickerItemListModel SemesterList
{
get
{
@@ -124,11 +236,22 @@ namespace CampusAppWP8.Model.Lecture
/// <summary>
/// Gets List for the number of semester
/// </summary>
public List<ListPickerItemModel> NumberList
public ListPickerItemListModel FromNumberList
{
get
{
return this.numberList;
return this.fromNumberList;
}
}
/// <summary>
/// Gets the NumberList
/// </summary>
public ListPickerItemListModel ToNumberList
{
get
{
return this.toNumberList;
}
}
#endregion
@@ -142,108 +265,87 @@ namespace CampusAppWP8.Model.Lecture
/// </summary>
public void LoadLists()
{
this.LoadCourseList();
this.LoadDegreeList();
this.LoadNumberList();
this.LoadSemesterList();
this.courseList = new CourseListPickerItemListModel();
this.courseList.OnLoaded += new CourseListPickerItemListModel.OnIO(this.CourseListIsReady);
this.courseList.LoadCourseList();
}
/// <summary>
/// Load the NumberList
/// </summary>
public void LoadFromNumberList()
{
string selectValue = null;
if (this.fromNumberList != null && this.fromNumberList.List.Count > 0)
{
selectValue = this.fromNumberList.List[this.SelectFromIndex].Value;
}
this.fromNumberList = this.CreateNumberList(1, 10);
this.SelectFromIndex = this.fromNumberList.GetIndexOrDefault(selectValue);
}
/// <summary>
/// Load the NumberList
/// </summary>
public void LoadToNumberList()
{
string selectValue = null;
if (this.toNumberList != null && this.toNumberList.List.Count > 0)
{
selectValue = this.toNumberList.List[this.SelectToIndex].Value;
}
this.toNumberList = this.CreateNumberList(this.SelectFromIndex + 1, 10);
this.SelectToIndex = this.toNumberList.GetIndexOrDefault(selectValue);
}
#endregion
#region private
/// <summary>
/// Load the NumberList
/// </summary>
private void LoadNumberList()
/// <summary>Course list is ready.</summary>
/// <remarks>Stubbfel, 10.09.2013.</remarks>
private void CourseListIsReady()
{
this.numberList = new List<ListPickerItemModel>();
this.numberList.Add(new ListPickerItemModel() { Text = "1", Value = "1" });
this.numberList.Add(new ListPickerItemModel() { Text = "2", Value = "2" });
this.numberList.Add(new ListPickerItemModel() { Text = "3", Value = "3" });
this.numberList.Add(new ListPickerItemModel() { Text = "4", Value = "4" });
this.numberList.Add(new ListPickerItemModel() { Text = "5", Value = "5" });
this.numberList.Add(new ListPickerItemModel() { Text = "5", Value = "6" });
this.numberList.Add(new ListPickerItemModel() { Text = "7", Value = "7" });
this.numberList.Add(new ListPickerItemModel() { Text = "8", Value = "8" });
this.numberList.Add(new ListPickerItemModel() { Text = "9", Value = "9" });
this.numberList.Add(new ListPickerItemModel() { Text = "10", Value = "10" });
this.degreeList = new DegreeListPickerItemListModel();
this.semesterList = new SemesterListPickerItemListModel();
this.LoadFromNumberList();
this.LoadToNumberList();
UserProfilModel userModel = Settings.UserProfil;
this.selectCourseIndex = this.courseList.GetIndexOrDefault(((int)userModel.Course).ToString().PadLeft(3, '0'));
this.selectDegreeIndex = this.degreeList.GetIndexOrDefault(((int)userModel.Degree).ToString());
this.selectSemesterIndex = this.semesterList.GetIndexOrDefault(((int)userModel.Semester).ToString());
if (this.OnLoaded != null)
{
this.OnLoaded();
}
}
/// <summary>
/// Load the SemesterList
/// Method create a NumberList
/// </summary>
private void LoadSemesterList()
/// <param name="startvalue">startValue of the list</param>
/// <param name="endvalue">endValue of the list</param>
/// <returns>return list</returns>
private ListPickerItemListModel CreateNumberList(int startvalue, int endvalue)
{
this.semesterList = new List<ListPickerItemModel>();
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 13", Value = "20131" });
this.semesterList.Add(new ListPickerItemModel() { Text = "WiSe 13/14", Value = "20132" });
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 14", Value = "20131" });
}
ListPickerItemListModel list = new ListPickerItemListModel();
string degree = this.DegreeList.List[this.SelectDegreeIndex].Value;
/// <summary>
/// Load the DegreeList
/// </summary>
private void LoadDegreeList()
{
this.degreeList = new List<ListPickerItemModel>();
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Bachelor, Value = "82" });
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Master, Value = "88" });
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Diploma, Value = "11" });
}
for (int i = startvalue; i <= endvalue; i++)
{
if ((i > 4 && "88".Equals(degree)) || (i > 6 && "82".Equals(degree)))
{
break;
}
/// <summary>
/// Load the DegreeList
/// </summary>
private void LoadCourseList()
{
this.courseList = new List<ListPickerItemModel>();
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur", Value = "013" });
this.courseList.Add(new ListPickerItemModel() { Text = "Bauingenieurwesen", Value = "017" });
this.courseList.Add(new ListPickerItemModel() { Text = "Betriebswirtschaftslehre", Value = "021" });
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsrecht für Technologieunternehmen", Value = "042" });
this.courseList.Add(new ListPickerItemModel() { Text = "Elektrotechnik", Value = "048" });
this.courseList.Add(new ListPickerItemModel() { Text = "Informatik ", Value = "079" });
this.courseList.Add(new ListPickerItemModel() { Text = "Maschinenbau", Value = "104" });
this.courseList.Add(new ListPickerItemModel() { Text = "Mathematik", Value = "105" });
this.courseList.Add(new ListPickerItemModel() { Text = "Physik ", Value = "128" });
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsingenieurwesen", Value = "179" });
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftswissenschaften ", Value = "184" });
this.courseList.Add(new ListPickerItemModel() { Text = "Biomedizinische Gerätetechnik ", Value = "215" });
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik", Value = "226" });
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsmathematik ", Value = "276" });
this.courseList.Add(new ListPickerItemModel() { Text = "Kultur und Technik ", Value = "711" });
this.courseList.Add(new ListPickerItemModel() { Text = "Physik der Halbleiter-Technologie", Value = "744" });
this.courseList.Add(new ListPickerItemModel() { Text = "Angewandte Mathematik ", Value = "749" });
this.courseList.Add(new ListPickerItemModel() { Text = "Technologie- und Innovationsmanagement", Value = "764" });
this.courseList.Add(new ListPickerItemModel() { Text = "Stadt- und Regionalplanung", Value = "766" });
this.courseList.Add(new ListPickerItemModel() { Text = "Informations- und Medientechnik ", Value = "767" });
this.courseList.Add(new ListPickerItemModel() { Text = "World Heritage Studies", Value = "768" });
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen und Verfahrenstechnik", Value = "770" });
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental and Resource Management", Value = "771" });
this.courseList.Add(new ListPickerItemModel() { Text = "Landnutzung und Wasserbewirtschaftung", Value = "772" });
this.courseList.Add(new ListPickerItemModel() { Text = "Bauen und Erhalten", Value = "773" });
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen", Value = "774" });
this.courseList.Add(new ListPickerItemModel() { Text = "eBusiness", Value = "794" });
this.courseList.Add(new ListPickerItemModel() { Text = "Civil Engineering", Value = "798" });
this.courseList.Add(new ListPickerItemModel() { Text = "Structural Engineering", Value = "799" });
this.courseList.Add(new ListPickerItemModel() { Text = "Electrical Power Engineering ", Value = "800" });
this.courseList.Add(new ListPickerItemModel() { Text = "Euro Hydroinformatics and Water Management", Value = "841" });
this.courseList.Add(new ListPickerItemModel() { Text = "Technologien Biogener Rohstoffe", Value = "842" });
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental Technologies", Value = "843" });
this.courseList.Add(new ListPickerItemModel() { Text = "Process Engineering and Plant Design", Value = "844" });
this.courseList.Add(new ListPickerItemModel() { Text = "Architekturvermittlung", Value = "845" });
this.courseList.Add(new ListPickerItemModel() { Text = "Nachwachsende Rohstoffe und Erneuerbare Energien", Value = "851" });
this.courseList.Add(new ListPickerItemModel() { Text = "Energieträger aus Biomasse und Abfällen", Value = "852" });
this.courseList.Add(new ListPickerItemModel() { Text = "Power Engineering", Value = "853" });
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik - Prozess- und Anlagentechnik", Value = "857" });
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur.Studium.Generale", Value = "858" });
this.courseList.Add(new ListPickerItemModel() { Text = "Verarbeitungstechnologien der Werkstoffe", Value = "860" });
this.courseList.Add(new ListPickerItemModel() { Text = "Forensic Sciences and Engineering", Value = "871" });
this.courseList = this.courseList.OrderBy(o => o.Text).ToList();
}
list.AddItem(i.ToString(), i.ToString());
}
return list;
}
#endregion
#endregion

View File

@@ -7,18 +7,26 @@
//-----------------------------------------------------------------------------
namespace CampusAppWP8
{
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model.Utility;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using CampusAppWP8.Utility;
/// <summary>
/// Base model io handling class.
/// </summary>
/// <typeparam name="T">model type</typeparam>
public abstract class MainModel<T> : IDisposable
public abstract class MainModel<T>
{
#region Member
/// <summary>
/// File object.
/// </summary>
protected CampusAppWP8.Utility.File file = null;
/// <summary>
/// Model io type.
/// </summary>
@@ -29,11 +37,6 @@ namespace CampusAppWP8
/// </summary>
private T model = default(T);
/// <summary>
/// File object.
/// </summary>
private CampusAppWP8.Utility.File file = null;
/// <summary>
/// Web object.
/// </summary>
@@ -49,6 +52,15 @@ namespace CampusAppWP8
/// </summary>
private Uri httpApiUri = null;
/// <summary>
/// Parameterized uri of the feed.
/// </summary>
private Uri paramizedUri = null;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MainModel{T}" /> class.
/// </summary>
@@ -57,55 +69,43 @@ namespace CampusAppWP8
/// <param name="url">url of the feed</param>
public MainModel(ModelType modelType, string fileName, string url)
{
this.modelType = modelType;
if ((url != null) && (url.Equals(string.Empty) == false))
{
this.httpApiUri = new Uri(url, UriKind.Absolute);
}
this.fileName = fileName;
if ((this.IsFile() == true)
&& (fileName.Equals(string.Empty) == false))
{
this.InitFile(CampusAppWP8.Utility.File.IOTypeRead.ReadSync, CampusAppWP8.Utility.File.IOTypeWrite.WriteAsync);
}
if ((this.IsHttpApi() == true)
&& (url.Equals(string.Empty) == false))
{
this.InitHttpApi();
}
this.Init(modelType, fileName, url);
}
/// <summary>
/// Finalizes an instance of the <see cref="MainModel{T}" /> class.
/// Initializes a new instance of the <see cref="MainModel{T}" /> class.
/// </summary>
~MainModel()
/// <param name="modelType">Model IO type</param>
/// <param name="sourceName">name of the file or the url of the feed</param>
public MainModel(ModelType modelType, string sourceName)
{
this.SaveData();
if (modelType == ModelType.File)
{
this.Init(modelType, sourceName, string.Empty);
}
else if (modelType == ModelType.Feed)
{
this.Init(modelType, string.Empty, sourceName);
}
else
{
throw new NotSupportedException("Wrong constructor was called for Feed and File support.");
}
}
/// <summary>
/// Delegate of the OnLoading callback function.
/// </summary>
public delegate void OnLoading();
#endregion
#region Events
/// <summary>
/// Delegate of the OnLoaded callback function.
/// Delegate of the OnIO callback function.
/// </summary>
public delegate void OnLoaded();
public delegate void OnIO();
/// <summary>
/// Delegate of the OnSaving callback function.
/// Delegate of the OnFailed(File/Web) callback function.
/// </summary>
public delegate void OnSaving();
/// <summary>
/// Delegate of the OnSaved callback function.
/// </summary>
public delegate void OnSaved();
public delegate void OnFailed();
/// <summary>
/// Delegate of the IsModelUpToDate callback function.
@@ -125,32 +125,68 @@ namespace CampusAppWP8
/// <summary>
/// Callback pointer, called before loading.
/// </summary>
public event OnLoading onLoading = null;
public event OnIO OnLoading = null;
/// <summary>
/// Callback pointer, called after loading.
/// </summary>
public event OnLoaded onLoaded = null;
public event OnIO OnLoaded = null;
/// <summary>
/// Callback pointer, called before saving.
/// </summary>
public event OnSaving onSaving = null;
public event OnIO OnSaving = null;
/// <summary>
/// Callback pointer, called after saving.
/// </summary>
public event OnSaved onSaved = null;
public event OnIO OnSaved = null;
/// <summary>
/// Callback pointer, for checking if file is up to date.
/// Callback pointer, called after failed file loading.
/// </summary>
public event IsFileUpToDate isFileUpToDate = null;
public event OnFailed OnFailedFile = null;
/// <summary>
/// Callback pointer, for checking if model is up to date.
/// Callback pointer, called after failed web loading.
/// </summary>
public event IsModelUpToDate isModelUpToDate = null;
public event OnFailed OnFailedWeb = null;
/// <summary>
/// Callback pointer, called after failed file or web loading, if there
/// is no specialized onFailed callback set.
/// </summary>
public event OnFailed OnFailedLoad = null;
/// <summary>
/// Callback pointer, called after failed saving data to file.
/// </summary>
public event OnFailed OnFailedSave = null;
/// <summary>
/// Callback pointer, for checking if file is up to date at loading.
/// </summary>
public event IsFileUpToDate IsFileUpToDateOnLoad = null;
/// <summary>
/// Callback pointer, for checking if file is up to date at saving.
/// </summary>
public event IsFileUpToDate IsFileUpToDateOnSave = null;
/// <summary>
/// Callback pointer, for checking if model is up to date at loading.
/// </summary>
public event IsModelUpToDate IsModelUpToDateOnLoad = null;
/// <summary>
/// Callback pointer, for checking if model is up to date at saving.
/// (currently unused)
/// </summary>
public event IsModelUpToDate IsModelUpToDateOnSave = null;
#endregion
#region Enum
/// <summary>
/// Specifies the I/O type of the model.
@@ -178,6 +214,23 @@ namespace CampusAppWP8
FileAndFeed = 3
}
/// <summary>Values that represent ForceType for load function.</summary>
public enum ForceType
{
/// <summary>An enumeration constant representing the invalid/default/unset option.</summary>
INVALID = 0,
/// <summary>An enumeration constant representing the force file option.</summary>
FORCE_FILE = 1,
/// <summary>An enumeration constant representing the force web option.</summary>
FORCE_WEB = 2
}
#endregion
#region Property
/// <summary>
/// Gets or sets the Model.
/// </summary>
@@ -194,92 +247,121 @@ namespace CampusAppWP8
}
}
/// <summary>
/// Called before finalizing. Can maybe be removed.
/// </summary>
public void Dispose()
{
this.SaveData();
}
#endregion
#region Method
#region public
/// <summary>
/// Forces a update from web.
/// </summary>
public void ForceWebUpdate()
{
if (this.api != null)
{
if (this.onLoading != null)
{
this.onLoading();
}
this.api.HttpGet(this.httpApiUri, this.OnLoadDataComplete);
}
this.LoadData(ForceType.FORCE_WEB);
}
/// <summary>
/// Forces a update from file.
/// </summary>
public void ForceReadFile()
{
this.LoadData(ForceType.FORCE_FILE);
}
/// <summary>
/// Load the data if necessary, from web or from file, regarding if
/// the file data is up to date.
/// </summary>
public void LoadData()
/// <param name="force">if set/not invalid/not default, force to load from web or file</param>
public void LoadData(ForceType force = ForceType.INVALID)
{
bool loadFromFile = true;
if (this.onLoading != null)
this.RunOnIOCallback(this.OnLoading);
// check which source is used for loading the data
if (force == ForceType.INVALID)
{
this.onLoading();
// if the model is not up to date
if (this.CheckIsNotUpToDate(this.IsModelUpToDateOnLoad) == true)
{
force = ForceType.FORCE_FILE;
if (this.file != null)
{
// if the file does not exist or is size of 0 or is not
// up to date, then load from web
if ((this.file.Exist() == false)
|| (this.file.GetFileInfo().Length == 0)
|| (this.CheckIsNotUpToDate(this.IsFileUpToDateOnLoad) == true))
{
force = ForceType.FORCE_WEB;
}
}
else
{
// if the file object does not exist, load from web
force = ForceType.FORCE_WEB;
}
// if the web object does not exist, load from file
if (this.api == null)
{
force = ForceType.FORCE_FILE;
}
}
else
{
// if it is up to date, nothing has to be loaded
this.RunOnIOCallback(this.OnLoaded);
}
}
if (((this.isModelUpToDate == null)
|| (this.isModelUpToDate(this.model) == false))
&& ((this.file != null) || this.api != null))
// load from web
if (force == ForceType.FORCE_WEB)
{
if (this.api != null)
{
if (this.paramizedUri != null)
{
this.api.HttpGet(this.paramizedUri, this.OnLoadDataComplete);
}
else
{
this.api.HttpGet(this.httpApiUri, this.OnLoadDataComplete);
}
}
else
{
// if web object does not exist, call OnFailed callbacks
this.RunOnFailedCallback(this.OnFailedWeb, this.OnFailedLoad);
}
}
// load from file
if (force == ForceType.FORCE_FILE)
{
if (this.file != null)
{
if ((this.file.Exist() == false)
|| (this.file.GetFileInfo().Length == 0))
{
loadFromFile = false;
}
byte[] data = this.file.ReadFile();
if (((this.isFileUpToDate != null) && (this.isFileUpToDate(this.model, this.file.GetFileInfo()) == false))
|| (this.isFileUpToDate == null))
if (data == null)
{
loadFromFile = false;
this.RunOnFailedCallback(this.OnFailedFile, this.OnFailedLoad);
}
else
{
if (data.Length > 0)
{
this.DeserializeModel(data);
}
this.RunOnIOCallback(this.OnLoaded);
}
}
else
{
loadFromFile = false;
}
if (this.api == null)
{
loadFromFile = true;
}
if (loadFromFile == false)
{
this.api.HttpGet(this.httpApiUri, this.OnLoadDataComplete);
}
else
{
string data = this.file.ReadFile();
if (data != null && !data.Equals(string.Empty))
{
this.DeserializeModel(Encoding.UTF8.GetBytes(data));
}
}
}
if (loadFromFile == true)
{
if (this.onLoaded != null)
{
this.onLoaded();
// if file object does not exist, call OnFailed callbacks
this.RunOnFailedCallback(this.OnFailedFile, this.OnFailedLoad);
}
}
}
@@ -287,22 +369,31 @@ namespace CampusAppWP8
/// <summary>
/// Save the model data if necessary.
/// </summary>
public void SaveData()
/// <param name="force">force saving. DEFAULT: false</param>
public void SaveData(bool force = false)
{
if ((this.file != null)
&& ((this.isFileUpToDate == null) || (this.isFileUpToDate(this.model, this.file.GetFileInfo()) == false)))
&& ((this.CheckIsNotUpToDate(this.IsFileUpToDateOnSave) == true) || (force == true)))
{
if (this.onSaving != null)
{
this.onSaving();
}
this.RunOnIOCallback(this.OnSaving);
byte[] data = this.SerializeModel();
this.file.WriteFile(data);
if (this.onSaved != null)
if ((this.OnSaved != null) && (this.OnFailedSave != null))
{
this.onSaved();
this.file.WriteFile(data, delegate { this.OnSaved(); }, delegate { this.OnFailedSave(); });
}
else if (this.OnSaved != null)
{
this.file.WriteFile(data, delegate { this.OnSaved(); }, null);
}
else if (this.OnFailedSave != null)
{
this.file.WriteFile(data, null, delegate { this.OnFailedSave(); });
}
else
{
this.file.WriteFile(data, null, null);
}
}
}
@@ -325,6 +416,30 @@ namespace CampusAppWP8
return this.model;
}
/// <summary>
/// Create the parameterized uri.
/// </summary>
/// <param name="parameters">uri parameter list</param>
public void SetUriParams(List<UrlParamModel> parameters)
{
if (this.api != null)
{
this.paramizedUri = this.api.CreateGetUrl(parameters);
}
}
/// <summary>
/// Clear the parameterized uri.
/// </summary>
public void ClearUriParams()
{
this.paramizedUri = null;
}
#endregion
#region protected
/// <summary>
/// Abstract declaration of the model deserialize function.
/// </summary>
@@ -370,17 +485,49 @@ namespace CampusAppWP8
return retValue;
}
#endregion
#region private
/// <summary>
/// Initialize the class. Is called by the constructors.
/// </summary>
/// <param name="modelType">model IO type</param>
/// <param name="fileName">name of the data file</param>
/// <param name="url">url of the feed data</param>
private void Init(ModelType modelType, string fileName, string url)
{
this.modelType = modelType;
if ((url != null) && (url.Equals(string.Empty) == false))
{
this.httpApiUri = new Uri(url, UriKind.Absolute);
}
this.fileName = fileName;
if ((this.IsFile() == true)
&& (fileName.Equals(string.Empty) == false))
{
this.InitFile();
}
if ((this.IsHttpApi() == true)
&& (url.Equals(string.Empty) == false))
{
this.InitHttpApi();
}
}
/// <summary>
/// Initializes the file object.
/// </summary>
/// <param name="readType">read io type (Default: sync)</param>
/// <param name="writeType">write io type (Default: async)</param>
private void InitFile(CampusAppWP8.Utility.File.IOTypeRead readType = CampusAppWP8.Utility.File.IOTypeRead.ReadSync, CampusAppWP8.Utility.File.IOTypeWrite writeType = CampusAppWP8.Utility.File.IOTypeWrite.WriteAsync)
private void InitFile()
{
if ((this.IsFile() == true)
&& (this.file == null))
{
this.file = new CampusAppWP8.Utility.File(this.fileName, readType, writeType);
this.file = new CampusAppWP8.Utility.File(this.fileName);
}
}
@@ -392,7 +539,7 @@ namespace CampusAppWP8
if ((this.IsHttpApi() == true)
&& (this.api == null))
{
this.api = new HttpRequest();
this.api = new HttpRequest(this.httpApiUri);
}
}
@@ -401,24 +548,89 @@ namespace CampusAppWP8
/// </summary>
/// <param name="sender">sending object</param>
/// <param name="e">event args</param>
private void OnLoadDataComplete(object sender, DownloadStringCompletedEventArgs e)
private void OnLoadDataComplete(object sender, OpenReadCompletedEventArgs e)
{
Exception downloadError = e.Error;
if (downloadError != null)
{
return;
this.RunOnFailedCallback(this.OnFailedWeb, this.OnFailedLoad);
}
string downloadResult = e.Result;
if (downloadResult != null && !downloadResult.Equals(string.Empty))
else
{
this.DeserializeModel(Encoding.UTF8.GetBytes(downloadResult));
}
byte[] data;
using (MemoryStream ms = new MemoryStream())
{
e.Result.CopyTo(ms);
data = ms.ToArray();
}
if (this.onLoaded != null)
{
this.onLoaded();
if (data != null && data.Length > 0)
{
this.DeserializeModel(data);
}
this.RunOnIOCallback(this.OnLoaded);
}
}
/// <summary>
/// Executes the on i/o callback operation.
/// </summary>
/// <param name="callbackFunc">The callback function.</param>
private void RunOnIOCallback(OnIO callbackFunc)
{
if (callbackFunc != null)
{
callbackFunc();
}
}
/// <summary>Executes the on failed callback operation.</summary>
/// <param name="specialFunc">The special function.</param>
/// <param name="defaultFunc">The default function.</param>
private void RunOnFailedCallback(OnFailed specialFunc, OnFailed defaultFunc)
{
if (specialFunc != null)
{
specialFunc();
}
else if (defaultFunc != null)
{
defaultFunc();
}
}
/// <summary>Check if model or file is not up to date.</summary>
/// <param name="checkFunc">The check function.</param>
/// <returns>true if model or file is not up to date, false if it is.</returns>
private bool CheckIsNotUpToDate(object checkFunc)
{
bool retValue = false;
// if there is no check function, the model or file is not up to date
if (checkFunc == null)
{
retValue = true;
}
else
{
Type funcType = checkFunc.GetType();
if (funcType.Equals(typeof(IsFileUpToDate)))
{
retValue = !(checkFunc as IsFileUpToDate)(this.model, this.file.GetFileInfo());
}
else if (funcType.Equals(typeof(IsModelUpToDate)))
{
retValue = !(checkFunc as IsModelUpToDate)(this.model);
}
}
return retValue;
}
#endregion
#endregion
}
}

View File

@@ -1,269 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="MenuModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>04.05.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.Mensa
{
using System;
using System.Xml.Serialization;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
/// <summary>
/// Model for menu
/// </summary>
public class MenuModel
{
#region Member
/// <summary>
/// Name for bio dinner
/// </summary>
private string bio = AppResources.MensaApp_NotToday;
/// <summary>
/// Name for 1. dinner
/// </summary>
private string dinner1 = AppResources.MensaApp_NotToday;
/// <summary>
/// Name for 2. dinner
/// </summary>
private string dinner2 = AppResources.MensaApp_NotToday;
/// <summary>
/// Name for 3. dinner
/// </summary>
private string dinner3 = AppResources.MensaApp_NotToday;
/// <summary>
/// Name for 4. dinner
/// </summary>
private string dinner4 = AppResources.MensaApp_NotToday;
/// <summary>
/// Name for action dinner
/// </summary>
private string action = AppResources.MensaApp_NotToday;
/// <summary>
/// Name of the day
/// </summary>
private string dayName;
/// <summary>
/// DateTime of the day
/// </summary>
private DateTime date;
/// <summary>
/// DateTime of the monday
/// </summary>
private DateTime monday;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="MenuModel" /> class.
/// </summary>
public MenuModel()
{
this.monday = MenuWeekModel.CalcFirstWeekDay();
}
#endregion
#region Property
/// <summary>
/// Gets or sets the WeekDay
/// </summary>
[XmlElement("Wochentag")]
public string Day
{
get
{
return this.dayName;
}
set
{
this.SetValue(value, ref this.dayName);
this.CalcDateOfDay();
}
}
/// <summary>
/// Gets or sets of Date
/// </summary>
public DateTime Date
{
get
{
return this.date;
}
set
{
if (value != this.date)
{
this.date = value;
}
}
}
/// <summary>
/// Gets or sets dinner 1
/// </summary>
[XmlElement("Essen1")]
public string Dinner1
{
get
{
return this.dinner1;
}
set
{
this.SetValue(value, ref this.dinner1);
}
}
/// <summary>
/// Gets or sets dinner 2
/// </summary>
[XmlElement("Essen2")]
public string Dinner2
{
get
{
return this.dinner2;
}
set
{
this.SetValue(value, ref this.dinner2);
}
}
/// <summary>
/// Gets or sets dinner 3
/// </summary>
[XmlElement("Essen3")]
public string Dinner3
{
get
{
return this.dinner3;
}
set
{
this.SetValue(value, ref this.dinner3);
}
}
/// <summary>
/// Gets or sets dinner 4
/// </summary>
[XmlElement("Essen4")]
public string Dinner4
{
get
{
return this.dinner4;
}
set
{
this.SetValue(value, ref this.dinner4);
}
}
/// <summary>
/// Gets or sets dinner bio
/// </summary>
[XmlElement("Bio")]
public string Bio
{
get
{
return this.bio;
}
set
{
this.SetValue(value, ref this.bio);
}
}
/// <summary>
/// Gets or sets dinner action
/// </summary>
[XmlElement("Aktionstag")]
public string Action
{
get
{
return this.action;
}
set
{
this.SetValue(value, ref this.action);
}
}
#endregion
#region Method
/// <summary>
/// Methods sets the property
/// </summary>
/// <remarks> maybe move to base class</remarks>
/// <param name="value">new property value</param>
/// <param name="property">name of the property</param>
private void SetValue(string value, ref string property)
{
if (value != null && !string.Empty.Equals(value) && !value.Equals(property))
{
property = StringManager.StripHTML(value);
}
}
/// <summary>
/// Method calculate the DateTime of the MenuDay
/// </summary>
private void CalcDateOfDay()
{
switch (this.dayName)
{
case "Montag":
this.date = this.monday;
break;
case "Diensttag":
this.date = this.monday.AddDays(1);
break;
case "Mittwoch":
this.date = this.monday.AddDays(2);
break;
case "Donnerstag":
this.date = this.monday.AddDays(3);
break;
case "Freitag":
this.date = this.monday.AddDays(4);
break;
default:
this.date = this.monday;
break;
}
}
#endregion
}
}

View File

@@ -28,9 +28,7 @@ namespace CampusAppWP8.Model.Openinghours
/// <summary>
/// Gets or sets feed information item list.
/// </summary>
[XmlArray("data")]
[XmlArrayItem("institution")]
public ObservableCollection<OpeninghoursInstitutionModel> institutions { get; set; }
private ObservableCollection<OpeninghoursInstitutionModel> institutions;
#endregion
@@ -41,6 +39,7 @@ namespace CampusAppWP8.Model.Openinghours
/// </summary>
public OpeninghoursModel()
{
this.institutions = new ObservableCollection<OpeninghoursInstitutionModel>();
this.createTime = DateTime.Now;
}
@@ -60,20 +59,23 @@ namespace CampusAppWP8.Model.Openinghours
}
/// <summary>
/// Gets the Institutions.
/// Gets or sets the Institutions.
/// </summary>
[XmlArray("data")]
[XmlArrayItem("institution")]
public ObservableCollection<OpeninghoursInstitutionModel> Institutions
{
get
{
return this.institutions;
}
set
{
this.institutions = value;
}
}
#endregion
#region Method
#endregion
}
}

View File

@@ -0,0 +1,187 @@
//-----------------------------------------------------------------------------
// <copyright file="PersonFunctionModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>05.09.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.Person
{
using System.Xml.Serialization;
using CampusAppWP8.Utility;
/// <summary>Person function model.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public class PersonFunctionModel
{
#region Member
/// <summary>The first tel.</summary>
private string tel1;
/// <summary>The second tel.</summary>
private string tel2;
/// <summary>The fax.</summary>
private string fax;
/// <summary>The mail.</summary>
private string mail;
/// <summary>The function.</summary>
private string function;
/// <summary>The appointment.</summary>
private string appointment;
/// <summary>The building.</summary>
private string building;
#endregion
#region Property
/// <summary>Gets or sets the tel 1.</summary>
/// <value>The tel 1.</value>
[XmlAttribute("telefon")]
public string Tel1
{
get
{
return this.tel1;
}
set
{
if (value != null && value != string.Empty && value != this.tel1)
{
this.tel1 = Wp8StringManager.CreateUniTelefonNumber(value);
}
}
}
/// <summary>Gets or sets the tel 2.</summary>
/// <value>The tel 2.</value>
[XmlAttribute("telefon2")]
public string Tel2
{
get
{
return this.tel2;
}
set
{
if (value != null && value != string.Empty && value != this.tel2)
{
this.tel2 = Wp8StringManager.CreateUniTelefonNumber(value);
}
}
}
/// <summary>Gets or sets the fax.</summary>
/// <value>The fax.</value>
[XmlAttribute("fax")]
public string Fax
{
get
{
return this.fax;
}
set
{
if (value != null && value != string.Empty && value != this.fax)
{
this.fax = Wp8StringManager.CreateUniTelefonNumber(value);
}
}
}
/// <summary>Gets or sets the function.</summary>
/// <value>The function.</value>
[XmlAttribute("funktion")]
public string Function
{
get
{
return this.function;
}
set
{
if (value != this.function)
{
this.function = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
/// <summary>Gets or sets the appointment.</summary>
/// <value>The appointment.</value>
[XmlAttribute("einrichtung")]
public string Appointment
{
get
{
return this.appointment;
}
set
{
if (value != this.appointment)
{
this.appointment = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
/// <summary>Gets or sets the building.</summary>
/// <value>The building.</value>
[XmlAttribute("gebaeude")]
public string Building
{
get
{
return this.building;
}
set
{
if (value != this.building)
{
this.building = Wp8StringManager.StripAndDecodeHTML(value);
}
}
}
/// <summary>Gets or sets the mail.</summary>
/// <value>The mail.</value>
[XmlAttribute("mail")]
public string Mail
{
get
{
return this.mail;
}
set
{
if (value != null && value != this.mail && Wp8StringManager.IsValidEmail(value))
{
this.mail = value;
}
}
}
/// <summary>Gets or sets the identifier of the person.</summary>
/// <value>The identifier of the person.</value>
public string PersonID { get; set; }
/// <summary>Gets or sets zero-based index of the function.</summary>
/// <value>The function index.</value>
public int FunctionIndex { get; set; }
#endregion
}
}

View File

@@ -0,0 +1,87 @@
//-----------------------------------------------------------------------------
// <copyright file="PersonListModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>05.09.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.Person
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
/// <summary>Person list model.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
[XmlRoot("Uebersicht")]
public class PersonListModel
{
#region Property
/// <summary>Gets or sets the persons.</summary>
/// <value>The persons.</value>
[XmlElement("person")]
public ObservableCollection<PersonModel> Persons { get; set; }
#endregion
#region Method
/// <summary>Sets person identifier to function.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public void SetPersonIdToFunction()
{
foreach (PersonModel person in this.Persons)
{
person.SetPersonIdToFunction();
}
}
/// <summary>Gets a person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
/// <param name="id">The identifier.</param>
/// <returns>The person.</returns>
public PersonModel GetPerson(string id)
{
foreach (PersonModel tmpPerson in this.Persons)
{
if (tmpPerson.ID.Equals(id))
{
return tmpPerson;
}
}
return null;
}
/// <summary>Removes the non function and set identifiers person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public void RemoveNonFunctionAndSetIdsPerson()
{
this.RemoveNonFunctionPerson();
this.SetPersonIdToFunction();
}
/// <summary>Removes the non function person.</summary>
/// <remarks>Stubbfel, 05.09.2013.</remarks>
public void RemoveNonFunctionPerson()
{
List<PersonModel> removeList = new List<PersonModel>();
foreach (PersonModel tmpPerson in this.Persons)
{
if (tmpPerson.Functions.Count < 1)
{
removeList.Add(tmpPerson);
}
}
foreach (PersonModel removePerson in removeList)
{
this.Persons.Remove(removePerson);
}
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show More