[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class App : Application
{
- //private const string ServiceAppId = "org.tizen.example.MapMyRunService";
- private const string ServiceAppId = "org.tizen.mapmyrunservice";
public Workout workout;
public SettingManager settingManager;
public App()
{
InitializeComponent();
- var dispatcher = MapMyRun.Models.Dispatcher.Instance;
- settingManager = new SettingManager(dispatcher);
- workout = new Workout(dispatcher, new PermissionManager(dispatcher));
- MainPage = new LoadingPage(); ;
+ MainPage = new LoadingPage();
}
protected override void OnStart()
using MapMyRun.Tizen.ViewModels;
using MapMyRun.Tizen.Models;
using MapMyRun.Models;
+using MapMyRun.Models.Workout;
+using MapMyRun.Models.Settings;
namespace MapMyRun.Tizen.Views
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class LoadingPage : CirclePage
{
- private readonly Loading _loading;
- private const string ServiceAppId = "org.tizen.mapmyrunservice";
+ private Loading _loading;
+ //private const string ServiceAppId = "org.tizen.example.MapMyRunService";
+ private const string ServiceAppId = "org.tizen.mapmyrunservice";
public static readonly BindableProperty ProgressProperty =
BindableProperty.Create("Progress",
typeof(double),
typeof(CircleProgressBarSurfaceItem),
propertyChanged: (b, o, n) =>
ProgressBarProgressChanged((CircleProgressBarSurfaceItem)b, (double)n));
-
public LoadingPage()
{
InitializeComponent();
ProgressBar.SetBinding(ProgressProperty, "Progress");
- var dispatcher = MapMyRun.Models.Dispatcher.Instance;
- _loading = new Loading(new AppLauncher(), new MessagePortHandler(),
- dispatcher, new PhoneService(dispatcher, new TizenPlatformService()), ((App)Application.Current).settingManager, ServiceAppId);
-
- BindingContext = new LoadingPageModel(_loading);
Appearing += (s, e) =>
{
+ var dispatcher = MapMyRun.Models.Dispatcher.Instance;
+
+ ((App)Application.Current).settingManager = new SettingManager(dispatcher);
+ ((App)Application.Current).workout = new Workout(dispatcher, new PermissionManager(dispatcher));
+
+ _loading = new Loading(new AppLauncher(), new MessagePortHandler(),
+ dispatcher, new PhoneService(dispatcher, new TizenPlatformService()), ((App)Application.Current).settingManager, ServiceAppId);
+ BindingContext = new LoadingPageModel(_loading);
_loading.StartLoading();
(Application.Current as App).workout.StartListenWorkoutData();
};