Пример #1
0
 public override void OnShow()
 {
     base.OnShow();
     GpsTracking.StartAsync();
     PushService.Init();
     DynamicScreenRefreshService.Init();
 }
Пример #2
0
        public override void OnCreate()
        {
            base.OnCreate();
            DConsole.WriteLine("DB init...");
            DBHelper.Init();
            DConsole.WriteLine("Settings init...");
            Settings.Init();
            DConsole.WriteLine("Authorization init...");
            DynamicScreenRefreshService.Init();
            Authorization.Init();
            if (Authorization.FastAuthorization() && Settings.UserDetailedInfo != null)
            {
#if DEBUG
                DConsole.WriteLine($"Логин и пароль были сохранены." +
                                   $"{Environment.NewLine}" +
                                   $"Login: {Settings.User} Password: {Settings.Password}{Environment.NewLine}");
#endif
                DConsole.WriteLine("Loading first screen...");
                Navigation.Move(nameof(EventListScreen));
            }
            else
            {
#if DEBUG
                if (Settings.UserDetailedInfo == null)
                {
                    Utils.TraceMessage("Произошло падение базы... извините");
                }
                DConsole.WriteLine($"Логин и пароль НЕ были сохранены." +
                                   $"{Environment.NewLine}" +
                                   $"Login: {Settings.User} Password: {Settings.Password} {Environment.NewLine}");
#endif
                DConsole.WriteLine("Loading first screen...");
                Navigation.Move(nameof(AuthScreen));
            }
        }