示例#1
0
 public LoginView()
 {
     //_service = new AzureDataService();
     //_db = new DbSQLite();
     _service = new AzureDataService();
     Content  = getView();
 }
示例#2
0
 public DbSQLite()
 {
     db = DependencyService.Get <ISQLite>().GetConnection();
     db.CreateTable <Preferiti>();
     db.CreateTable <Orari>();
     _service = new AzureDataService();
 }
 public OrarioGiornCell()
 {
     _db      = new DbSQLite();
     _service = new AzureDataService();
     setUpContextAction();
     View = getView();
 }
示例#4
0
        public MasterDetailView()
        {
            if (Service == null)
            {
                Service = new AzureDataService();
            }

            pages          = new Dictionary <MenuType, NavigationPage>();
            BindingContext = new MasterDetailViewModel();
            NavigationPage.SetHasNavigationBar(this, false);
            Master = master = new MasterView(ViewModel);

            NavigationPage homeNav;

            //if (Settings.SuccessLogin) {
            if (Settings.IsLoggedIn && Settings.SuccessLogin)
            {
                homeNav = new NavigationPage(new TabbedHomeView())
                {
                    BarBackgroundColor = ColorHelper.Blue700,
                    BarTextColor       = ColorHelper.White
                };
            }
            else
            {
                homeNav = new NavigationPage(new HomeSkipView())
                {
                    BarBackgroundColor = ColorHelper.Blue700,
                    BarTextColor       = ColorHelper.White
                };
            }

            Detail      = homeNav;
            IsPresented = false;
            pages.Add(MenuType.Home, homeNav);

//			App.Current.MainPage = this;

            master.PageSelectionChanged = (menuType) =>
            {
                NavigationPage newPage;
                if (pages.ContainsKey(menuType))
                {
                    newPage = pages[menuType];
                }
                else
                {
                    newPage = new NavigationPage(master.PageSelection)
                    {
                        BarBackgroundColor = ColorHelper.Blue700,
                        BarTextColor       = Color.White
                    };
                    pages.Add(menuType, newPage);
                }

                Detail       = newPage;
                Detail.Title = master.PageSelection.Title;
                IsPresented  = false;
            };
        }
示例#5
0
		public App ()
		{
            AzureService = new AzureDataService();

            // The root page of your application
            MainPage = new NavigationPage(new PaginaListaAmigos());
		}
 public MainPage()
 {
     this.InitializeComponent();
     _azureDataService = new AzureDataService();
     _usersList        = new List <User>();
     connectWithbackend();
 }
示例#7
0
 public OrarioComplCellGroup()
 {
     _db      = new DbSQLite();
     _service = new AzureDataService();
     setUpContextAction();
     View = getView();
 }
示例#8
0
 //--------------------------------------------------CONSTRUTOR-------------------------------------------------//
 public EventStatusPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService) : base(navigationService, pageDialogService)
 {
     Title                  = "INFORMAÇÕES";
     azureDataService       = Xamarin.Forms.DependencyService.Get <AzureDataService>();
     DesmarcarButtonCommand = new DelegateCommand(DesmarcarButtonCommandExecute);
     CancelarButtonCommand  = new DelegateCommand(CancelarButtonCommandExecute);
 }
示例#9
0
 public MieiCorsiCell()
 {
     _db      = new DbSQLite();
     _service = new AzureDataService();
     setUpContextAction();
     View = getView();
 }
示例#10
0
 public TutorialView()
 {
     Padding         = new Thickness(0, 0, 0, 0);
     BackgroundColor = ColorHelper.Blue700;
     Title           = "Tutorial";
     _service        = new AzureDataService();
     getPages();
 }
示例#11
0
        // c'tor
        public HighScoresViewModel()
        {
            this.service     = new AzureDataService();
            this.highScorers = new ObservableCollection <HighScoreEntry>();

            this.StatusConnectivity =
                (CrossConnectivity.Current.IsConnected) ? "Online" : "Offline";
        }
示例#12
0
 public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     mAzureDataService  = new AzureDataService();
     context            = Activity;
     inflater           = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
     mPerformanceIdList = new List <string>();
     mAzureDataService.Initialize();
 }
示例#13
0
        public BotViewModel()
        {
            azureDataService = DependencyService.Get <AzureDataService>();
            _botConnector    = new BotConnector();
            setupBotConnectorAsync();
            EntryText = _entryText;

            SendMessageCommand   = new RelayCommand(new Action <object>(SendMessage));
            RemoveMessageCommand = new RelayCommand(new Action <object>(RemoveMessage));
        }
示例#14
0
 public DbSQLite(SQLiteConnection sqliteConnection)
 {
     db = sqliteConnection;
     // db = DependencyService.Get<ISQLite>().GetConnection();
     //db = App.SQLite.GetConnection();
     db.CreateTable <Preferiti>();
     db.CreateTable <Orari>();
     db.CreateTable <Utenze>();
     db.CreateTable <LogTb>();
     _service = new AzureDataService();
 }
        protected async override void OnAppearing()
        {
            base.OnAppearing();

            service = App.AzureService;
            var azureVideo = await service.GetVideo(id);

            if (azureVideo != null)
            {
                this.ToolbarItems.RemoveAt(0);
            }
        }
        //--------------------------------------------------CONSTRUTOR-------------------------------------------------//
        public EditServicesPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService) : base(navigationService, pageDialogService)
        {
            Title = "EDIÇÃO DOS SERVIÇOS";
            BarberServicesList = new ObservableCollection <BarberService>();

            azureDataService = Xamarin.Forms.DependencyService.Get <AzureDataService>();

            SyncServices();

            AdicionarButtonCommand = new DelegateCommand(async() => await ExecuteAdicionarButtonCommand());
            EditarButtonCommand    = new DelegateCommand(async() => await ExecuteEditarButtonCommand());
            DeletarButtonCommand   = new DelegateCommand(async() => await ExecuteDeletarButtonCommand());
        }
示例#17
0
        //--------------------------------------------------CONSTRUTOR-------------------------------------------------//
        public NewEventPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService) : base(navigationService, pageDialogService)
        {
            Title            = "NOVO AGENDAMENTO";
            azureDataService = Xamarin.Forms.DependencyService.Get <AzureDataService>();

            NomeEntry             = "";
            TelefoneEntry         = "";
            AgendarButtonCommand  = new DelegateCommand(async() => await ExecuteAgendarButtonCommand());
            CancelarButtonCommand = new DelegateCommand(async() => await ExecuteCancelarButtonCommand());

            BarberServicesList = new ObservableCollection <BarberService>();
            SyncServices();
        }
示例#18
0
 //--------------------------------------------------CONSTRUTOR-------------------------------------------------//
 public HoursPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService) : base(navigationService, pageDialogService)
 {
     loginService    = new AzureService();
     scheduleService = new AzureDataService();
     Hours           = new ObservableCollection <string>();
     Schedules       = new ObservableCollection <BarberSchedule>();
     HoursAvaliable  = new ObservableCollection <BarberHour>();
     Temp            = new ObservableCollection <BarberSchedule>();
     Title           = "ESCOLHA O HORÁRIO";
     dayTapped       = new BarberDay();
     serviceTapped   = new BarberService();
     scheduleTemp    = new BarberSchedule();
     CallSync();
 }
        //private ToolbarItem tbiSync;
        #endregion

        #region Constructor
        public TabbedHomeView()
        {
            _db      = new DbSQLite();
            _service = new AzureDataService();

            Logcat.Write("COUNT: " + _db.GetAllMieiCorsi().Count());
            this.Title = "Home";

            //IdentifyingUser (); //IDENTIFYING USER DISABLE!!

            //BackgroundColor = ColorHelper.White;

            Logcat.Write(string.Format("{0}: {1}", "TabbedHomeView", "costruttore"));

            checkDays();  //controllo che giorni sono necessari nelle tab

            //RIMOSSO PER DEBUG!!
            //loadListCorsiGiorno(); //carico la lista dei giorni

            this.ItemTemplate = new DataTemplate(() =>
            {
                return(new TabbedDayView());
            });

            //tbiSync = new ToolbarItem("Sync", "ic_sync.png", sync, 0, 0);
            //ToolbarItems.Add(tbiSync);

            MessagingCenter.Subscribe <TabbedDayView>(this, "delete_corso", (sender) => {
                loadListCorsiGiorno();
            });
            MessagingCenter.Subscribe <OrarioFavCell> (this, "delete_corso_fav", (sender) => {
                loadListCorsiGiorno();
            });

            MessagingCenter.Subscribe <OrarioFavCell> (this, "delete_corso_fav_impostazioni", (sender) => {
                loadListCorsiGiorno();
            });

            MessagingCenter.Subscribe <TabbedDayView, int>(this, "pullToRefresh", (sender, x) =>
            {
                //serve per refreshare i corsi nella tabbed day view
                //this.SelectedItem = null;
                loadListCorsiGiorno();
            });

            //MessagingCenter.Subscribe<OrarioGiornCell>(this, "delete_corso_context", deleteMioCorsoContext);
            //MessagingCenter.Subscribe<TabbedDayView>(this, "delete_corso", loadListCorsiGiorno());
        }
示例#20
0
        public MainPage(string _aToken)
        {
            token = _aToken;
            //vm = new Location();
            _azure = new AzureDataService();

            //var navigationPage = new NavigationPage(new BackpackMain());
            //BindingContext
            Children.Add(new ShoppingList(User));
            Children.Add(new BackpackView(User));



            InitializeComponent();
            //WebViewOnNavigated();
        }
 //--------------------------------------------------CONSTRUTOR-------------------------------------------------//
 public HoursAdminPageViewModel(INavigationService navigationService, IPageDialogService pageDialogService) : base(navigationService, pageDialogService)
 {
     NomeEntry             = "";
     TelefoneEntry         = "";
     scheduleService       = new AzureDataService();
     Hours                 = new ObservableCollection <string>();
     Schedules             = new ObservableCollection <BarberSchedule>();
     HoursAvaliable        = new ObservableCollection <BarberHour>();
     Temp                  = new ObservableCollection <BarberSchedule>();
     Title                 = "AGENDAMENTO";
     dayTapped             = new BarberDay();
     serviceTapped         = new BarberService();
     scheduleTemp          = new BarberSchedule();
     AgendarButtonCommand  = new DelegateCommand(async() => await ExecuteAgendarButtonCommand());
     CancelarButtonCommand = new DelegateCommand(async() => await ExecuteCancelarButtonCommand());
     CallSync();
 }
示例#22
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Initialize Azure Mobile Client
            Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
            _dataService = new AzureDataService("@string/azure_mobile_app_url");

            // Need to Initialize _items from Azure DB

            CacheListView adapter = new CacheListView(this, _items);

            _listView.Adapter = adapter;
        }
示例#23
0
        public App()
        {
            //***DEBUG NO AUTENTICAZIONE
            //MainPage = new NavigationPage(
            //    new MasterDetailView())
            //{
            //    BarBackgroundColor = ColorHelper.Blue700,
            //    BarTextColor = ColorHelper.White
            //};

            _service = new AzureDataService();
            MobileCenter.Start(typeof(Analytics), typeof(Crashes));

            if (Settings.PrimoAvvio) //prima volta che avvio la app
            {
                MainPage = new TutorialView()
                {
                    Service = _service
                };
            }
            else
            {
                if (Settings.IsLoggedIn) //login effettuto con successo
                {
                    Settings.ToUpdate = false;
                    MainPage          = new MasterDetailView()
                    {
                        Service = _service
                    };
                }

                else //utente non login
                {
                    MainPage = new LoginView()
                    {
                        Service = _service
                    }
                };
            }
        }
示例#24
0
        protected async override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.List);

            var dataService = new AzureDataService();

            var video = new Video()
            {
                Id          = Guid.NewGuid().ToString(),
                Description =
                    "Disruptive Innovation theory observes how new innovations create a new market and a new value network, which in turn disrupts an existing market. What often happens with companies that stay too close to their existing customers and invest aggressively to retain them, rather than investing to serve the needs of their future customers.",
                EmbedUrl     = "Cu6J6taqOSg",
                Title        = "Disruptive Innovation",
                Votes        = 0,
                RelatedUnits = "IFB101",
                ThumbnailUrl = "http://img.youtube.com/vi/Cu6J6taqOSg/hqdefault.jpg",
                Tags         = "Innovation,Disruptive Innovation,IFB101",
                Comments     = new ObservableCollection <Comment>()
                {
                    new Comment()
                    {
                        CreatedAt = DateTime.UtcNow,
                        Id        = Guid.NewGuid().ToString(),
                        Text      = "Great Video!"
                    }
                }
            };

            var result = await dataService.SaveVideo(video);

            //result.ContinueWith((t) =>
            //{
            //    RunOnUiThread(() => Toast.MakeText(this, result.Status.ToString(), ToastLength.Long).Show());
            //});
        }
示例#25
0
        public App()
        {
            InitializeComponent();

            MainPage = new SplashView();

            var dataService = new AzureDataService();

            dataService.Initialize()
            .ContinueWith(t =>
            {
                if (t.IsFaulted)
                {
                    Debug.WriteLine("Faulted");
                }

                var categoriesPage  = new CategoriesView();
                NavigationPage root = new NavigationPage(categoriesPage);

                IFileHelper fileHelper   = DependencyService.Get <IFileHelper>();
                categoriesPage.ViewModel = new CategoriesViewModel(dataService, root.Navigation, fileHelper);
                MainPage = root;
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }
示例#26
0
 public App()
 {
     // InitializeComponent();
     AzureService = new AzureDataService();
     MainPage     = new Carrusel();
 }
示例#27
0
        public JobListViewModel(INavigationService navigationService, AzureDataService azureDataService)
        {
            _navigationService = navigationService;

            _azureDataService = azureDataService;
        }
示例#28
0
        private async void CommonOperationCameraLibPictures(Stream stream)
        {
            if (stream != null)
            {
                activityIndicator.IsRunning = true;
                //loadingIndicator = true;
                // Photo.Source = ImageSource.FromStream(() => stream);
                byte[] m_Bytes      = ReadToEnd(stream);
                string AIreturnData = await MakePredictionRequest(m_Bytes);

                // loadingIndicator = false;// first step, contact to AI

                if (AIreturnData != null)
                {
                    //  loadingIndicator = true;
                    string[] threeSpecies = new string[6];
                    threeSpecies = getDetailsFromAIreturn(AIreturnData);//get the top 3 possible results

                    AzureDataService azureDataService = new AzureDataService();
                    List <Species>   speciesList      = new List <Species>();

                    try
                    {
                        string name1 = threeSpecies[0];
                        IEnumerable <Species> iEnumerableSpecies1 = await azureDataService.GetSpeciesAsync(name1);

                        Species species1 = iEnumerableSpecies1.First();
                        species1.similarity = System.Convert.ToDouble(threeSpecies[1].Substring(0, 6));//keep it to the fourth decimal place
                        speciesList.Add(species1);

                        string name2 = threeSpecies[2];
                        IEnumerable <Species> iEnumerableSpecies2 = await azureDataService.GetSpeciesAsync(name2);

                        Species species2 = iEnumerableSpecies2.First();
                        species2.similarity = System.Convert.ToDouble(threeSpecies[3].Substring(0, 6));
                        speciesList.Add(species2);

                        string name3 = threeSpecies[4];
                        IEnumerable <Species> iEnumerableSpecies3 = await azureDataService.GetSpeciesAsync(name3);

                        Species species3 = iEnumerableSpecies3.First();
                        species3.similarity = System.Convert.ToDouble(threeSpecies[5].Substring(0, 6));
                        speciesList.Add(species3);
                    }
                    catch (Exception exp)
                    {
                        activityIndicator.IsRunning = false;
                        Debug.WriteLine(@"Sync error: {0}", exp.Message);
                    }
                    activityIndicator.IsRunning = false;
                    //relativeLayout.Children.Remove(relativeLayoutSubset);//remove google map
                    //relativeLayout.Children.Add(new IdentifyListView(speciesList));
                    //relativeLayout.Children.Add(new IdentifyListView(speciesList), Constraint.RelativeToParent((parent) => { return parent.X; }), Constraint.RelativeToParent((parent) => { return parent.Height; }));
                    //relativeLayout.Children.Clear();

                    IdentifyListPage identifyListPage = new IdentifyListPage();
                    Navigation.PushAsync(identifyListPage);

                    identifyListPage.Content = new IdentifyListView(speciesList);

                    //relativeLayout.Children.Add(identifyListView, Constraint.RelativeToParent((parent) => { return parent.X; }),
                    //                                                       Constraint.RelativeToParent((parent) => { return parent.Y; }),
                    //                                                       Constraint.RelativeToParent((parent) => { return parent.Width; }),
                    //                                                       Constraint.RelativeToParent((parent) => { return parent.Height; }));
                    //relativeLayout.Children.Insert(1,new IdentifyListView(speciesList));
                }
                else
                {
                    await DisplayAlert("AI Return Results is ", "NULL", "!!!");
                }
            }
            else
            {
                await DisplayAlert("Photos Stream is ", "NULL", "!!!");
            }
        }
示例#29
0
 //Initialize our global variables
 GlobalValues()
 {
     azureService = new AzureDataService();
     azureService.Initialize();
 }