Ejemplo n.º 1
0
 public MyDogsPage()
 {
     InitializeComponent();
     BackgroundColor = Color.White;
     manager         = DogManager.DefaultManager;
     GetDogsByOwner(App.currentOwner.UserName);
 }
Ejemplo n.º 2
0
        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;
                }
            };
        }
Ejemplo n.º 3
0
        public Login()
        {
            manager  = OwnerManager.DefaultManager;
            dManager = DogManager.DefaultManager;

            InitializeComponent();
        }
Ejemplo n.º 4
0
        public TripMap()
        {
            // Consts
            locatorDesiredAccuracy = 5;
            distanceFromMapInMiles = Distance.FromMiles(0.05);
            double speedThresholdKMH = 8;

            InitializeComponent();
            dogManager   = DogManager.DefaultManager;
            tripsManager = TripsManager.DefaultManager;
            InitMap(speedThresholdKMH);
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
        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())); });
                }
            };
        }