From: Wootak Jung Date: Fri, 31 Mar 2023 02:17:36 +0000 (+0900) Subject: Fix resource path to SettingCore X-Git-Tag: accepted/tizen/unified/20230404.025047~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed45018c983dbc632827d2aea87e045f57538e47;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsetting-bluetooth.git Fix resource path to SettingCore Change-Id: Ife2d0b953f8b10cc4d6b3c8d73eba1197c42efda Signed-off-by: Wootak Jung --- diff --git a/SettingBluetooth/SettingBluetooth/Controller/DeviceController.cs b/SettingBluetooth/SettingBluetooth/Controller/DeviceController.cs index 8f792c7..90e3e2d 100644 --- a/SettingBluetooth/SettingBluetooth/Controller/DeviceController.cs +++ b/SettingBluetooth/SettingBluetooth/Controller/DeviceController.cs @@ -1,4 +1,5 @@ -using System; +using SettingCore; +using System; using System.Collections.Generic; using System.Text; using Tizen; @@ -29,7 +30,7 @@ namespace SettingBluetooth }; //DialogPage.ShowAlertDialog(Resources.IDS_BT_HEADER_DISCONNECT_DEVICE_ABB, String.Format(Resources.IDS_WMGR_POP_THIS_WILL_END_YOUR_CONNECTION_WITH_PS, btDevice.Name), cancelButton, disconnectButton); - DialogPage.ShowAlertDialog("Disconnect device", String.Format("This will end your connection with { 0 }.", btDevice.Name), cancelButton, disconnectButton); + SettingCore.RoundedDialogPage.ShowAlertDialog("Disconnect device", String.Format("This will end your connection with { 0 }.", btDevice.Name), cancelButton, disconnectButton); } internal static void ConnectA2dp(BtDevice device) diff --git a/SettingBluetooth/SettingBluetooth/SettingBluetooth.cs b/SettingBluetooth/SettingBluetooth/SettingBluetooth.cs index 44a8f86..887a248 100644 --- a/SettingBluetooth/SettingBluetooth/SettingBluetooth.cs +++ b/SettingBluetooth/SettingBluetooth/SettingBluetooth.cs @@ -36,54 +36,65 @@ namespace SettingBluetooth protected override View OnCreate() { + Log.Info(LogTag, "OnCreate"); base.OnCreate(); + Resources.SetPath(GetResourcePath("/")); return BtMainView.Create(); } protected override void OnAppControlReceived(AppControlReceivedEventArgs e) { + Log.Info(LogTag, "OnAppControlReceived"); base.OnAppControlReceived(e); } protected override void OnPause() { + Log.Info(LogTag, "OnPause"); base.OnPause(); MainView.Hide(); } protected override void OnResume() { + Log.Info(LogTag, "OnResume"); base.OnResume(); MainView.Show(); } protected override void OnDestroy() { + Log.Info(LogTag, "OnDestroy"); base.OnDestroy(); } protected override void OnDeviceOrientationChanged(DeviceOrientationEventArgs e) { + Log.Info(LogTag, "OnDeviceOrientationChanged"); base.OnDeviceOrientationChanged(e); } protected override void OnLocaleChanged(LocaleChangedEventArgs e) { + Log.Info(LogTag, "OnLocaleChanged"); base.OnLocaleChanged(e); } protected override void OnLowBattery(LowBatteryEventArgs e) { + Log.Info(LogTag, "OnLowBattery"); base.OnLowBattery(e); } protected override void OnLowMemory(LowMemoryEventArgs e) { + Log.Info(LogTag, "OnLowMemory"); base.OnLowMemory(e); } protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e) { + Log.Info(LogTag, "OnRegionFormatChanged"); base.OnRegionFormatChanged(e); } } diff --git a/SettingBluetooth/SettingBluetooth/View/BtDeviceView.cs b/SettingBluetooth/SettingBluetooth/View/BtDeviceView.cs index 2fc3e24..58f1675 100644 --- a/SettingBluetooth/SettingBluetooth/View/BtDeviceView.cs +++ b/SettingBluetooth/SettingBluetooth/View/BtDeviceView.cs @@ -1,4 +1,5 @@ -using System; +using SettingCore; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; @@ -12,7 +13,8 @@ namespace SettingBluetooth { public class Device : INotifyPropertyChanged { - private string mResourcePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource; + private string mResourcePath = Resources.GetPath(); + //private string mResourcePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource; private string mIconDir; private string mAddress; private string mName; diff --git a/SettingBluetooth/SettingBluetooth/View/Resources.cs b/SettingBluetooth/SettingBluetooth/View/Resources.cs new file mode 100644 index 0000000..f6dced9 --- /dev/null +++ b/SettingBluetooth/SettingBluetooth/View/Resources.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SettingBluetooth +{ + static class Resources + { + static private string mResourcePath = ""; + + static public void SetPath(string path) + { + mResourcePath = path; + } + static public string GetPath() + { + return mResourcePath; + } + } +} diff --git a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk b/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk deleted file mode 100644 index a8651a0..0000000 Binary files a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk and /dev/null differ