From 09ffded26359fc296fa53eb0c4ad8d7ea57c6a7b Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Tue, 29 Mar 2016 11:27:53 +0900 Subject: [PATCH] fix lifecycle functions Change-Id: Ifd499fd5e702bd1d03a5e34fd473be985794984e --- .../Tizen.Applications/Application.cs | 24 +++++++++++----------- .../Tizen.Applications/ServiceApplication.cs | 2 +- .../Tizen.Applications/UIApplication.cs | 22 ++++++++++---------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Tizen.Applications/Tizen.Applications/Application.cs b/Tizen.Applications/Tizen.Applications/Application.cs index 82a20a3..a9b653f 100755 --- a/Tizen.Applications/Tizen.Applications/Application.cs +++ b/Tizen.Applications/Tizen.Applications/Application.cs @@ -24,12 +24,12 @@ namespace Tizen.Applications /// /// /// - public event EventHandler Created; + public event EventHandler Created; /// /// /// - public event EventHandler Terminated; + public event EventHandler Terminated; /// /// @@ -77,12 +77,12 @@ namespace Tizen.Applications /// /// /// - protected virtual void OnCreate(EventArgs e) + protected virtual void OnCreate() { - var eh = Created as EventHandler; + EventHandler eh = Created; if (eh != null) { - eh(this, e); + eh(this, EventArgs.Empty); } } @@ -90,12 +90,12 @@ namespace Tizen.Applications /// /// /// - protected virtual void OnTerminate(EventArgs e) + protected virtual void OnTerminate() { - var eh = Terminated as EventHandler; + EventHandler eh = Terminated; if (eh != null) { - eh(this, e); + eh(this, EventArgs.Empty); } } @@ -105,7 +105,7 @@ namespace Tizen.Applications /// protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e) { - var eh = AppControlReceived as EventHandler; + EventHandler eh = AppControlReceived; if (eh != null) { eh(this, e); @@ -118,7 +118,7 @@ namespace Tizen.Applications /// protected virtual void OnLowMemory(LowMemoryEventArgs e) { - var eh = LowMemory as EventHandler; + EventHandler eh = LowMemory; if (eh != null) { eh(this, e); @@ -131,7 +131,7 @@ namespace Tizen.Applications /// protected virtual void OnLocaleChanged(LocaleChangedEventArgs e) { - var eh = LocaleChanged as EventHandler; + EventHandler eh = LocaleChanged; if (eh != null) { eh(this, e); @@ -141,7 +141,7 @@ namespace Tizen.Applications internal void SendCreate() { ApplicationInfo = new ApplicationInfo(); - OnCreate(EventArgs.Empty); + OnCreate(); } private void HandleAppEvent(string eventName, IntPtr eventData, IntPtr data) diff --git a/Tizen.Applications/Tizen.Applications/ServiceApplication.cs b/Tizen.Applications/Tizen.Applications/ServiceApplication.cs index 25436f9..f5ef489 100755 --- a/Tizen.Applications/Tizen.Applications/ServiceApplication.cs +++ b/Tizen.Applications/Tizen.Applications/ServiceApplication.cs @@ -32,7 +32,7 @@ namespace Tizen.Applications }; ops.OnTerminate = (data) => { - OnTerminate(EventArgs.Empty); + OnTerminate(); }; ops.OnAppControl = (appControlHandle, data) => { diff --git a/Tizen.Applications/Tizen.Applications/UIApplication.cs b/Tizen.Applications/Tizen.Applications/UIApplication.cs index 262d3fe..aaffbc3 100755 --- a/Tizen.Applications/Tizen.Applications/UIApplication.cs +++ b/Tizen.Applications/Tizen.Applications/UIApplication.cs @@ -19,12 +19,12 @@ namespace Tizen.Applications /// /// /// - public event EventHandler Resumed; + public event EventHandler Resumed; /// /// /// - public event EventHandler Paused; + public event EventHandler Paused; /// /// @@ -42,7 +42,7 @@ namespace Tizen.Applications }; ops.OnTerminate = (data) => { - OnTerminate(EventArgs.Empty); + OnTerminate(); }; ops.OnAppControl = (appControlHandle, data) => { @@ -50,11 +50,11 @@ namespace Tizen.Applications }; ops.OnResume = (data) => { - OnResume(EventArgs.Empty); + OnResume(); }; ops.OnPause = (data) => { - OnPause(EventArgs.Empty); + OnPause(); }; TizenSynchronizationContext.Initialize(); @@ -72,24 +72,24 @@ namespace Tizen.Applications /// /// /// - protected virtual void OnResume(EventArgs e) + protected virtual void OnResume() { - var eh = Resumed as EventHandler; + EventHandler eh = Resumed; if (eh != null) { - eh(this, e); + eh(this, EventArgs.Empty); } } /// /// /// - protected virtual void OnPause(EventArgs e) + protected virtual void OnPause() { - var eh = Paused as EventHandler; + EventHandler eh = Paused; if (eh != null) { - eh(this, e); + eh(this, EventArgs.Empty); } } } -- 2.7.4