diff --git a/EggTimer/EggTimer.sln b/EggTimer/EggTimer.sln
new file mode 100644
index 0000000..fff07f2
--- /dev/null
+++ b/EggTimer/EggTimer.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EggTimer", "EggTimer\EggTimer.csproj", "{3FED465E-FEAA-4E12-AF2C-912898B4F608}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/EggTimer/EggTimer/App.xaml b/EggTimer/EggTimer/App.xaml
new file mode 100644
index 0000000..9246be3
--- /dev/null
+++ b/EggTimer/EggTimer/App.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/EggTimer/EggTimer/App.xaml.cs b/EggTimer/EggTimer/App.xaml.cs
new file mode 100644
index 0000000..4891ac2
--- /dev/null
+++ b/EggTimer/EggTimer/App.xaml.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+
+namespace EggTimer
+{
+ public partial class App : Application
+ {
+ ///
+ /// Bietet einen einfachen Zugriff auf den Stammframe der Phone-Anwendung.
+ ///
+ /// Der Stammframe der Phone-Anwendung.
+ public PhoneApplicationFrame RootFrame { get; private set; }
+
+ ///
+ /// Konstruktor für das Application-Objekt.
+ ///
+ public App()
+ {
+ // Globaler Handler für nicht abgefangene Ausnahmen.
+ UnhandledException += Application_UnhandledException;
+
+ // Silverlight-Standardinitialisierung
+ InitializeComponent();
+
+ // Phone-spezifische Initialisierung
+ InitializePhoneApplication();
+
+ // Während des Debuggens Profilerstellungsinformationen zur Grafikleistung anzeigen.
+ if (System.Diagnostics.Debugger.IsAttached)
+ {
+ // Zähler für die aktuelle Bildrate anzeigen.
+ Application.Current.Host.Settings.EnableFrameRateCounter = true;
+
+ // Bereiche der Anwendung hervorheben, die mit jedem Bild neu gezeichnet werden.
+ //Application.Current.Host.Settings.EnableRedrawRegions = true;
+
+ // Nicht produktiven Visualisierungsmodus für die Analyse aktivieren,
+ // in dem Bereiche einer Seite angezeigt werden, die mit einer Farbüberlagerung an die GPU übergeben wurden.
+ //Application.Current.Host.Settings.EnableCacheVisualization = true;
+
+ // Deaktivieren Sie die Leerlauferkennung der Anwendung, indem Sie die UserIdleDetectionMode-Eigenschaft des
+ // PhoneApplicationService-Objekts der Anwendung auf "Disabled" festlegen.
+ // Vorsicht: Nur im Debugmodus verwenden. Eine Anwendung mit deaktivierter Benutzerleerlauferkennung wird weiterhin ausgeführt
+ // und verbraucht auch dann Akkuenergie, wenn der Benutzer das Handy nicht verwendet.
+ PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
+ }
+
+ }
+
+ // 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)
+ {
+ }
+
+ // 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)
+ {
+ }
+
+ // Code, der ausgeführt werden soll, wenn die Anwendung deaktiviert wird (in den Hintergrund gebracht wird)
+ // Dieser Code wird beim Schließen der Anwendung nicht ausgeführt
+ private void Application_Deactivated(object sender, DeactivatedEventArgs e)
+ {
+ }
+
+ // Code, der beim Schließen der Anwendung ausgeführt wird (z. B. wenn der Benutzer auf "Zurück" klickt)
+ // Dieser Code wird beim Deaktivieren der Anwendung nicht ausgeführt
+ private void Application_Closing(object sender, ClosingEventArgs e)
+ {
+ }
+
+ // Code, der bei einem Navigationsfehler ausgeführt wird
+ private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ if (System.Diagnostics.Debugger.IsAttached)
+ {
+ // Navigationsfehler. Unterbrechen und Debugger öffnen
+ System.Diagnostics.Debugger.Break();
+ }
+ }
+
+ // Code, der bei nicht behandelten Ausnahmen ausgeführt wird
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ if (System.Diagnostics.Debugger.IsAttached)
+ {
+ // Eine nicht behandelte Ausnahme ist aufgetreten. Unterbrechen und Debugger öffnen
+ System.Diagnostics.Debugger.Break();
+ }
+ }
+
+ #region Initialisierung der Phone-Anwendung
+
+ // Doppelte Initialisierung vermeiden
+ private bool phoneApplicationInitialized = false;
+
+ // Fügen Sie keinen zusätzlichen Code zu dieser Methode hinzu
+ private void InitializePhoneApplication()
+ {
+ if (phoneApplicationInitialized)
+ return;
+
+ // Frame erstellen, aber noch nicht als RootVisual festlegen. Dadurch kann der Begrüßungsbildschirm
+ // aktiv bleiben, bis die Anwendung bereit für das Rendern ist.
+ RootFrame = new PhoneApplicationFrame();
+ RootFrame.Navigated += CompleteInitializePhoneApplication;
+
+ // Navigationsfehler behandeln
+ RootFrame.NavigationFailed += RootFrame_NavigationFailed;
+
+ // Sicherstellen, dass keine erneute Initialisierung erfolgt
+ phoneApplicationInitialized = true;
+ }
+
+ // Fügen Sie keinen zusätzlichen Code zu dieser Methode hinzu
+ private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
+ {
+ // Visuelle Stammkomponente festlegen, sodass die Anwendung gerendert werden kann
+ if (RootVisual != RootFrame)
+ RootVisual = RootFrame;
+
+ // Dieser Handler wird nicht mehr benötigt und kann entfernt werden
+ RootFrame.Navigated -= CompleteInitializePhoneApplication;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/EggTimer/EggTimer/ApplicationIcon.png b/EggTimer/EggTimer/ApplicationIcon.png
new file mode 100644
index 0000000..b352a43
Binary files /dev/null and b/EggTimer/EggTimer/ApplicationIcon.png differ
diff --git a/EggTimer/EggTimer/ApplicationIcon_small.png b/EggTimer/EggTimer/ApplicationIcon_small.png
new file mode 100644
index 0000000..a03bfc9
Binary files /dev/null and b/EggTimer/EggTimer/ApplicationIcon_small.png differ
diff --git a/EggTimer/EggTimer/Background.png b/EggTimer/EggTimer/Background.png
new file mode 100644
index 0000000..d8acf96
Binary files /dev/null and b/EggTimer/EggTimer/Background.png differ
diff --git a/EggTimer/EggTimer/Background_large.png b/EggTimer/EggTimer/Background_large.png
new file mode 100644
index 0000000..a151d2c
Binary files /dev/null and b/EggTimer/EggTimer/Background_large.png differ
diff --git a/EggTimer/EggTimer/EggTimer.csproj b/EggTimer/EggTimer/EggTimer.csproj
new file mode 100644
index 0000000..0e85854
--- /dev/null
+++ b/EggTimer/EggTimer/EggTimer.csproj
@@ -0,0 +1,104 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {3FED465E-FEAA-4E12-AF2C-912898B4F608}
+ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ EggTimer
+ EggTimer
+ v4.0
+ $(TargetFrameworkVersion)
+ WindowsPhone71
+ Silverlight
+ true
+
+
+ true
+ true
+ EggTimer.xap
+ Properties\AppManifest.xml
+ EggTimer.App
+ true
+ true
+
+
+ true
+ full
+ false
+ Bin\Debug
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ Bin\Release
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ App.xaml
+
+
+ MainPage.xaml
+
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/EggTimer/EggTimer/EggTimer.csproj.user b/EggTimer/EggTimer/EggTimer.csproj.user
new file mode 100644
index 0000000..0140cb8
--- /dev/null
+++ b/EggTimer/EggTimer/EggTimer.csproj.user
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ False
+
+
+
+
+
\ No newline at end of file
diff --git a/EggTimer/EggTimer/MainPage.xaml b/EggTimer/EggTimer/MainPage.xaml
new file mode 100644
index 0000000..273608f
--- /dev/null
+++ b/EggTimer/EggTimer/MainPage.xaml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/EggTimer/EggTimer/MainPage.xaml.cs b/EggTimer/EggTimer/MainPage.xaml.cs
new file mode 100644
index 0000000..91e43f1
--- /dev/null
+++ b/EggTimer/EggTimer/MainPage.xaml.cs
@@ -0,0 +1,149 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Controls;
+using System.Text.RegularExpressions;
+using System.Threading;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+
+namespace EggTimer
+{
+ public partial class MainPage : PhoneApplicationPage
+ {
+ // Konstruktor
+ private int min = 0;
+ private int sec = 0;
+ private Thread thread;
+ private DateTime dest;
+ private bool _stop = false;
+ public MainPage()
+ {
+ InitializeComponent();
+ tmin_KeyUp(null, null);
+ tsec_KeyUp(null, null);
+ }
+
+ void alarm_mp3_MediaEnded(object sender, RoutedEventArgs e)
+ {
+ if (this.start.Content.ToString() == "stop")
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ this.start.Content = "start";
+ tmin_KeyUp(null, null);
+ tsec_KeyUp(null, null);
+ });
+
+ }
+
+ private void GetInit()
+ {
+ int t = sec / 60;
+ this.clock.Text = (min + t) + ":" + (sec % 60).ToString().PadLeft(2, '0');
+ }
+
+ private void start_Click(object sender, RoutedEventArgs e)
+ {
+ if (this.start.Content.ToString() == "start")
+ this.start.Content = "stop";
+ else if (this.start.Content.ToString() == "stop")
+ this.start.Content = "start";
+ if (this.start.Content.ToString() == "stop")
+ {
+ this.dest = DateTime.Now.AddMinutes(min).AddSeconds(sec);
+ this.thread = new Thread(this.TimeRunner);
+ this._stop = false;
+ this.thread.Start();
+ while (!this.thread.IsAlive) ;
+ }
+ if (this.start.Content.ToString() == "start")
+ {
+ this.alarm_mp3.Stop();
+ this._stop = true;
+ if (this.min == 0 && this.sec == 0)
+ {
+ tmin_KeyUp(null, null);
+ tsec_KeyUp(null, null);
+ }
+ }
+ }
+
+ private void TimeRunner()
+ {
+ while (!_stop)
+ {
+ DateTime now = DateTime.Now;
+ TimeSpan d = dest.Subtract(now);
+ if (d.Ticks <= 0)
+ {
+ _stop = true;
+ alarm();
+ }
+ else
+ {
+ this.min = Convert.ToInt32(Math.Floor(d.TotalMinutes));
+ this.sec = d.Seconds;
+ Deployment.Current.Dispatcher.BeginInvoke(() => { this.clock.Text = this.min + ":" + this.sec.ToString().PadLeft(2, '0'); });
+ Thread.Sleep(250);
+ }
+
+ }
+
+
+ }
+
+ private void alarm()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(() => { this.alarm_mp3.Play(); });
+ }
+
+ private void tmin_KeyUp(object sender, KeyEventArgs e)
+ {
+ this.tmin.Text = Regex.Replace(this.tmin.Text, @"[^0-9]", "");
+ if (this.tmin.Text.Length > 3)
+ this.tmin.Text = this.tmin.Text.Remove(0, this.tmin.Text.Length - 4);
+ if (this.tmin.Text.Length == 0)
+ this.min = 0;
+ else
+ this.min = Convert.ToInt32(this.tmin.Text);
+ GetInit();
+ }
+
+ private void tsec_KeyUp(object sender, KeyEventArgs e)
+ {
+ this.tsec.Text = Regex.Replace(this.tsec.Text, @"[^0-9]", "");
+ if (this.tsec.Text.Length > 1)
+ this.tsec.Text = this.tsec.Text.Remove(0, this.tsec.Text.Length - 2);
+ if (this.tsec.Text.Length == 0)
+ this.sec = 0;
+ else
+ this.sec = Convert.ToInt32(this.tsec.Text);
+ GetInit();
+ }
+
+ private void tmin_LostFocus(object sender, RoutedEventArgs e)
+ {
+ if (this.tmin.Text.Length == 0)
+ {
+ this.tmin.Text = "0";
+ }
+ }
+
+ private void tsec_LostFocus(object sender, RoutedEventArgs e)
+ {
+ if (this.tsec.Text.Length == 0)
+ {
+ this.tsec.Text = "0";
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/EggTimer/EggTimer/Properties/AppManifest.xml b/EggTimer/EggTimer/Properties/AppManifest.xml
new file mode 100644
index 0000000..a955232
--- /dev/null
+++ b/EggTimer/EggTimer/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/EggTimer/EggTimer/Properties/AssemblyInfo.cs b/EggTimer/EggTimer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8dff4c5
--- /dev/null
+++ b/EggTimer/EggTimer/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// Allgemeine Informationen über eine Assembly werden über die folgende
+// Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die einer Assembly zugeordnet sind.
+[assembly: AssemblyTitle("EggTimer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("EggTimer")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly
+// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
+// COM aus zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
+[assembly: ComVisible(false)]
+
+// Die folgende GUID ist für die ID der typelib, wenn dieses Projekt für COM verfügbar gemacht wird
+[assembly: Guid("3e0ee68c-efe3-414a-8c19-93a74e68aefa")]
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+// Hauptversion
+// Nebenversion
+// Buildnummer
+// Revision
+//
+// Sie können alle Werte angeben oder die Standardwerte für Revisions- und Buildnummer verwenden
+// übernehmen, indem Sie "*" wie folgt verwenden:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguageAttribute("de-DE")]
diff --git a/EggTimer/EggTimer/Properties/WMAppManifest.xml b/EggTimer/EggTimer/Properties/WMAppManifest.xml
new file mode 100644
index 0000000..ac839db
--- /dev/null
+++ b/EggTimer/EggTimer/Properties/WMAppManifest.xml
@@ -0,0 +1,35 @@
+
+
+
+
+ ApplicationIcon.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Background.png
+ 0
+ EggTimer
+
+
+
+
+
diff --git a/EggTimer/EggTimer/SplashScreenImage.jpg b/EggTimer/EggTimer/SplashScreenImage.jpg
new file mode 100644
index 0000000..ed161b9
Binary files /dev/null and b/EggTimer/EggTimer/SplashScreenImage.jpg differ
diff --git a/EggTimer/EggTimer/SplashScreenImage.png b/EggTimer/EggTimer/SplashScreenImage.png
new file mode 100644
index 0000000..917818f
Binary files /dev/null and b/EggTimer/EggTimer/SplashScreenImage.png differ
diff --git a/EggTimer/EggTimer/alarm.mp3 b/EggTimer/EggTimer/alarm.mp3
new file mode 100644
index 0000000..396b690
Binary files /dev/null and b/EggTimer/EggTimer/alarm.mp3 differ