public App() { InitializeComponent(); FlowListView.Init(); var navigator = new NavigationService(new ViewLocator()); #if MOCKBLE ContainerService.Current.RegisterInstance <IAdapter>(new Mocks.MockBLEAdapter()); #else ContainerService.Current.RegisterInstance <IAdapter>(CrossBluetoothLE.Current.Adapter); #endif #if MOCKAUTH ContainerService.Current.RegisterInstance <IAuthViewModel>(new Mocks.MockAuthViewModel(navigator)); #else ContainerService.Current.RegisterInstance <IAuthViewModel>(new AuthViewModel(navigator)); #endif #if APIMOCK ContainerService.Current.RegisterInstance <DataClient>(new Mocks.Clients.MockServiceClient(null)); ContainerService.Current.RegisterInstance <ARMClient>(new Mocks.Clients.MockArmClient(null)); #endif ContainerService.Current.RegisterInstance <IPermissions>(new Permissions()); navigator.PresentAsMainPage(new MainViewModel(navigator)); //navigator.PresentAsMainPage(new UserDetailsViewModel(navigator)); //navigator.PresentAsNavigatableMainPage(new WifiScanViewModel(navigator)); }
public App() { InitializeComponent(); FlowListView.Init(); MainPage = new MainMasterPage(); }
public App(IMediaService mediaService) { _mediaService = mediaService; InitializeComponent(); FlowListView.Init(); MainPage = new NavigationPage(new MainPage(_mediaService)); }
public App(IOAuth2Service oAuth2Service) { InitializeComponent(); FlowListView.Init(); MessagingCenter.Subscribe <MessageCenterManager, ChatModel>(this, "sendMessage", (sender, arg) => { var value = JsonConvert.SerializeObject(arg); Console.WriteLine("boom panes panes" + value); socket.Emit("hi", value); }); try { string ip = sqlites.GetIpAddress().Url; ApiConnection.SocketUrl = ip; } catch (Exception ex) { ipAddress.Url = ApiConnection.SocketUrl; sqlites.setIpAddress(ipAddress); string ip = sqlites.GetIpAddress().Url; ApiConnection.SocketUrl = ip; } MainPage = new NavigationPage(new SplashScreen(oAuth2Service)); /** * if (hasLoggedIn()) * { * MainPage = new NavigationPage(new MainPage()); * } * else * { * MainPage = new NavigationPage(new Login()); * } */ }
public App() { InitializeComponent(); FlowListView.Init(); var admin = DbContext.Instance.GetAdministrator(); var user = DbContext.Instance.GetUser(); var owner = DbContext.Instance.GetOwner(); if (admin != null) { MainPage = new Views.Administrator.MasterDetailAdministrator(); } else if (user != null) { MainPage = new Views.User.MasterDetailUser(); } else if (owner != null) { MainPage = new Views.Owner.MasterDetailOwner(); } else { MainPage = new Views.Session.LoginPage(); } OneSignal.Current.IdsAvailable(IdsAvailable); OneSignal.Current.StartInit("c2df8f3d-8733-47b2-87b3-9787310cecc3").InFocusDisplaying(OSInFocusDisplayOption.Notification).EndInit(); }
public MainPage() { InitializeComponent(); FlowListView.Init(); Set(false, false); }
//inside OnCreate after LoadApplication(new App()); add these lines protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; UserDialogs.Init(this); base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); FlowListView.Init(); CachedImageRenderer.Init(false); LoadApplication(new App()); MainPage.Instance.ShouldTakePicture += () => { ICursor cursor = loadCursor(); image_count_before = cursor.Count; cursor.Close(); Intent intent = new Intent(MediaStore.IntentActionStillImageCamera); IList <ResolveInfo> activities = PackageManager.QueryIntentActivities(intent, 0); if (activities.Count > 0) { StartActivityForResult(Intent.CreateChooser(intent, "Camera Capture"), OPENCAMERACODE); } }; }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CarouselViewRenderer.Init(); FlowListView.Init(); CachedImageRenderer.Init(); UserDialogs.Init(this); //AndroidAppLinks.Init(this); MobileAds.Initialize(ApplicationContext, "ca-app-pub-XXXXXXXXXXX"); FileAccessHelper.GetLocalFilePath("Data.sqlite"); LoadApplication(new App()); //var x = typeof(Xamarin.Forms.Themes.DarkThemeResources); //x = typeof(Xamarin.Forms.Themes.LightThemeResources); //x = typeof(Xamarin.Forms.Themes.Android.UnderlineEffect); }
public App() { InitializeComponent(); FlowListView.Init(); MainPage = new NavigationPage(new LogInPage()); }
private void InitializeCustomComponents() { FlowListView.Init(); AppCenter.Start(AppCenterConstants.IOSKey + /* AppCenterConstants.UwpKey + */ AppCenterConstants.AndroidKey, typeof(Analytics), typeof(Crashes)); }
public App() { InitializeComponent(); FlowListView.Init(); string dbPathtemp = DependencyService.Get <IPath>().GetDatabasePath(DBFILENAME); using (var db = new ZavodDB(dbPathtemp)) { db.Database.EnsureCreated(); if (db.Instruments.Count() < 5) { var assembly = IntrospectionExtensions.GetTypeInfo(typeof(App)).Assembly; Stream stream = assembly.GetManifestResourceStream("Info.Instruments.xml"); ObservableCollection <Instruments> lstInst; using (var reader = new System.IO.StreamReader(stream)) { var serializer = new XmlSerializer(typeof(ObservableCollection <Instruments>)); lstInst = (ObservableCollection <Instruments>)serializer.Deserialize(reader); } foreach (var item in lstInst) { db.Instruments.Add(item); } db.SaveChanges(); } } MainPage = new MainPage(); }
public EventsPage() { FlowListView.Init(); Vm.Init(); BindingContext = Vm; InitializeComponent(); }
protected override void OnInitialized() { InitializeComponent(); FlowListView.Init(); Settings.AppToken = "wall3dc1tylah0r3"; Instance = this; }
public App() { InitializeComponent(); FlowListView.Init(); //MainPage = new Pages.HomePage(); MainPage = new CustomNavigationPage(new MainPage()); }
public App() { InitializeComponent(); FlowListView.Init(); IsFirstTime = true; MainPage = new NavigationPage(new MainPage()); }
public App(IMediaService mediaService) { InitializeComponent(); FlowListView.Init(); MainPage = new MainPage(mediaService); }
public App() { InitializeComponent(); AppResources.Culture = CrossMultilingual.Current.DeviceCultureInfo; FlowListView.Init(); InitNavigation(); }
public App() { InitializeComponent(); MainPage = new NavigationPage(new Animacion()); FlowListView.Init(); //Notificaciones al iniciar la aplicación /*CrossFirebasePushNotification.Current.OnTokenRefresh += (s, p) => * { * System.Diagnostics.Debug.WriteLine("Token:",$"TOKEN : {p.Token}"); * };*/ /*CrossFirebasePushNotification.Current.OnNotificationReceived += (s, p) => * { * * System.Diagnostics.Debug.WriteLine("Received"); * * };*/ /* CrossFirebasePushNotification.Current.OnNotificationOpened += (s, p) => * { * System.Diagnostics.Debug.WriteLine("Opened"); * foreach (var data in p.Data) * { * System.Diagnostics.Debug.WriteLine($"{data.Key} : {data.Value}"); * } * * if (!string.IsNullOrEmpty(p.Identifier)) * { * System.Diagnostics.Debug.WriteLine($"ActionId: {p.Identifier}"); * } * * };*/ }
//public static NavigationPage Navigation = null; public App() { InitializeComponent(); FlowListView.Init(); MainPage = new NavigationPage(new LandingPage()); BlobCache.ApplicationName = "Manofthematch"; }
// public AppSetup(Application application, ContainerBuilder cb) { _application = application; _cb = cb; //Initializes ListView derivative to present lists of data[TODO: Which data?] FlowListView.Init(); }
public App() { FlowListView.Init(); InitializeComponent(); InitApp(); //MainPage = new MainPage(); }
public App() { InitializeComponent(); FlowListView.Init(); MainPage = new MasterTemplate(); //MainPage = new CouponPage(); }
public App() { InitializeComponent(); FlowListView.Init(); DependencyService.Register <MockDataStore>(); MainPage = new MainPage(); }
public App() { SetupRealm(); OneSignal.Current.StartInit("84ec0128-74a1-40f9-89b1-35e35da35acd") .EndInit(); InitializeComponent(); var temp = this.FindByName <ControlTemplate>("Template"); vm = ViewModelLocator.HeaderVM; BindingContext = vm; FlowListView.Init(); if (Current.Properties.ContainsKey("IsUserLoggedIn")) { if ((string)Current.Properties["LoginType"] == "Google") { GooglePlusAutoLogin(); } else if ((string)Current.Properties["LoginType"] == "Facebook") { FacebookAutoLogin(); } } MainPage = new NavigationPage(new FrontPage()); NavigationPage.SetHasNavigationBar(this, false); }
public App() { Instance = this; FlowListView.Init(); GetUserCredentials(); InitializeComponent(); var tabbedPageViewModel = new TabbedPageViewModel(); RefreshViews += (o, e) => { tabbedPageViewModel.RefreshViewModels(); }; MainPage = new NavigationPage(new MainTabbedPage() { BindingContext = tabbedPageViewModel }); if (!UserAuthorised) { InitAuthorisation(); } else { realmPath = CurrentUser.Name; InitializeDatabasePaths(); SetRealmConnection(); RefreshViews?.Invoke(new object(), EventArgs.Empty); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // FFImageLoading CachedImageRenderer.Init(true); CrossCurrentActivity.Current.Init(this, bundle); Rg.Plugins.Popup.Popup.Init(this); //// AudioService setup //AudioServiceIntent = new Intent(Droid.Audio.AudioService.ActionStart); //ComponentName name = StartService(AudioServiceIntent); //var _connection = new AudioServiceConnection(this); //bool binded = BindService(AudioServiceIntent, _connection, Bind.AutoCreate); global::Xamarin.Forms.Forms.Init(this, bundle); // FlowListView FlowListView.Init(); var intent = new Intent(this, typeof(MainActivity)); StartActivity(intent); Finish(); }
public App() { InitializeComponent(); FlowListView.Init(); Iconize .With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeBrandsModule()) .With(new Plugin.Iconize.Fonts.FontAwesomeSolidModule()); if (string.IsNullOrEmpty(Settings.Token)) { this.MainPage = new NavigationPage(new LoginPage()); } else { var mainViewModel = MainViewModel.GetInstance(); mainViewModel.Token = Settings.Token; mainViewModel.User = Settings.Username; //mainViewModel.Travel = new TravelViewModel(); mainViewModel.Home = new HomeViewModel(); this.MainPage = new MasterPage(); } }
public FlowPage(PlayerModel model) { model.Navigation = Navigation; FlowListView.Init(); InitializeComponent(); if (!model.ChildModel) { ToolbarItem exit = new ToolbarItem() { Text = "Exit" }; exit.Clicked += ToolbarItem_Clicked; ToolbarItems.Add(exit); ToolbarItem undo = new ToolbarItem() { Text = "Undo" }; undo.SetBinding(MenuItem.CommandProperty, new Binding("Undo")); ToolbarItems.Add(undo); ToolbarItem redo = new ToolbarItem() { Text = "Redo" }; redo.SetBinding(MenuItem.CommandProperty, new Binding("Redo")); ToolbarItems.Add(redo); } BindingContext = Model = model; }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); //CrossCurrentActivity.Current.Activity.Init(this, bundle); Xamarin.Essentials.Platform.Init(this, bundle); // add this line to your code //... global::Xamarin.Auth.Presenters.XamarinAndroid.AuthenticationConfiguration.Init(this, bundle); FFImageLoading.Forms.Platform.CachedImageRenderer.Init(enableFastRenderer: true); Plugin.InputKit.Platforms.Droid.Config.Init(this, bundle); Rg.Plugins.Popup.Popup.Init(this, bundle); global::Xamarin.Forms.Forms.Init(this, bundle); CarouselViewRenderer.Init(); //var ignore = typeof(SvgCachedImage); FlowListView.Init(); Acr.UserDialogs.UserDialogs.Init(this); ImageCircleRenderer.Init(); //google analytics GoogleAnalytics.Current.Config.TrackingId = "UA-XXXXXXXX-2"; GoogleAnalytics.Current.Config.AppId = "GASample"; GoogleAnalytics.Current.Config.AppName = "Google Analytics Sample"; GoogleAnalytics.Current.Config.AppVersion = "1.0.0.0"; GoogleAnalytics.Current.InitTracker(); LoadApplication(new App()); }
public App() { InitializeComponent(); FlowListView.Init(); Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeRegularModule()); DependencyService.Register <MockDataStore>(); MainPage = new MainPage(); }