public MyDogsPage() { InitializeComponent(); BackgroundColor = Color.White; manager = DogManager.DefaultManager; GetDogsByOwner(App.currentOwner.UserName); }
public EditMyDogProfile() { InitializeComponent(); BindingContext = App.currentDog; manager = DogManager.DefaultManager; memStream = null; hasImageChanged = false; //Checking if the dog has an image. If not, showing default image. if (App.currentDog.ImageD != null) { image.Source = ImageSource.FromStream(() => Utils.ImageStream.ConvertStringToStream(App.currentDog.ImageD)); } else { image.Source = ImageSource.FromFile("Dog.png"); } pickPhoto.Clicked += async(sender, e) => { var stream = await DependencyService.Get <IPicturePicker>().GetImageStreamAsync(); if (stream != null) { memStream = Utils.ImageStream.ConvertStreamToMemoryStream(stream); image.Source = ImageSource.FromStream(() => { return(new MemoryStream(memStream.ToArray())); }); hasImageChanged = true; } }; }
public Login() { manager = OwnerManager.DefaultManager; dManager = DogManager.DefaultManager; InitializeComponent(); }
public TripMap() { // Consts locatorDesiredAccuracy = 5; distanceFromMapInMiles = Distance.FromMiles(0.05); double speedThresholdKMH = 8; InitializeComponent(); dogManager = DogManager.DefaultManager; tripsManager = TripsManager.DefaultManager; InitMap(speedThresholdKMH); }
protected override async void OnAppearing() { await SqliteConnectionSet._connection.CreateTableAsync <Owner>(); var owner = await SqliteConnectionSet._connection.Table <Owner>().ToListAsync(); SqliteConnectionSet._user = new ObservableCollection <Owner>(owner); manager = OwnerManager.DefaultManager; dManager = DogManager.DefaultManager; movePage(); base.OnAppearing(); }
public DogList() { manager = DogManager.DefaultManager; InitializeComponent(); memStream = null; image.Source = ImageSource.FromFile("Dog.png"); pickPhoto.Clicked += async(sender, e) => { var stream = await DependencyService.Get <IPicturePicker>().GetImageStreamAsync(); if (stream != null) { memStream = Utils.ImageStream.ConvertStreamToMemoryStream(stream); image.Source = ImageSource.FromStream(() => { return(new MemoryStream(memStream.ToArray())); }); } }; }