示例#1
0
 public NotifyViewModel(Page page)
 {
     this.page     = page;
     service       = new BoshokuService();
     categoryList  = LocalCategory.getListMain();
     sqliteManager = new SqliteManager();
 }
 public ActivitysViewModel(Page page) : base(page)
 {
     currentPage  = page;
     service      = new BoshokuService();
     activityList = new ObservableCollection <FirebaseObject <Activities> >();
     subscribe();
 }
示例#3
0
 public BaseViewModel(Page currentPage)
 {
     this.currentPage                  = currentPage;
     service                           = new BoshokuService();
     currentPage.Appearing            += onApering;
     Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged;
 }
示例#4
0
 public SurveyMVVM(Page page)
 {
     service     = new BoshokuService();
     this.page   = page;
     _surveyList = new ObservableCollection <FirebaseObject <Surveys> >();
     subsPage();
 }
 //sayfanın navigation bilgisini çekiyoruz
 public NewsFeedViewModel(Page pageNavigation) : base(pageNavigation)
 {
     service       = new BoshokuService();
     new_AnnList   = new ObservableCollection <FirebaseObject <Announcements> >();
     _annList      = new ObservableCollection <FirebaseObject <Announcements> >();
     isEmptyList   = false;
     isPageLoading = true;
     subscribeFastMenu();
     subscribeNotification();
     sqliteManager = new SqliteManager();
     notifyList    = new List <Announcements>();
 }
示例#6
0
 public UserRequestMVVM(Page page) : base(page)
 {
     service         = new BoshokuService();
     listDepartments = new List <department>()
     {
         new department {
             key = "-L3-jRbXhj7lglCULUc0", name = "İnsan Kaynakları"
         },
         new department {
             key = "-L3-jUMxK107f7s0amiH", name = "İş Sağlığı ve Güvenliği"
         }
     };
 }
示例#7
0
        public EventViewModel(Page page) : base(page)
        {
            serivce   = new BoshokuService();
            eventList = new ObservableCollection <FirebaseObject <Competitions> >();
            this.page = page;



            MessagingCenter.Subscribe <NewsFeedViewModel, FirebaseObject <Announcements> >(this, MCenter.annMultipleChoice.ToString(), async(pg, data) =>
            {
                MessagingCenter.Unsubscribe <NewsFeedViewModel>(this, MCenter.annMultipleChoice.ToString());

                await onItemSelected(AnnCategory.multiple_choice, data);
            });

            MessagingCenter.Subscribe <NewsFeedViewModel, FirebaseObject <Announcements> >(this, MCenter.annUserInteraction.ToString(), async(pg, data) =>
            {
                MessagingCenter.Unsubscribe <NewsFeedViewModel>(this, MCenter.annUserInteraction.ToString());
                await onItemSelected(AnnCategory.user_interaction, data);
            });

            MessagingCenter.Subscribe <App, string>(this, MCenter.dataUserInteraction.ToString(), async(arg1, key) =>
            {
                MessagingCenter.Unsubscribe <App, string>(this, MCenter.dataUserInteraction.ToString());
                await getEventDetail(AnnCategory.user_interaction, key);
            });
            MessagingCenter.Subscribe <App, string>(this, MCenter.dataMultipleChoice.ToString(), async(arg1, key) =>
            {
                MessagingCenter.Unsubscribe <App, string>(this, MCenter.dataMultipleChoice.ToString());
                await getEventDetail(AnnCategory.multiple_choice, key);
            });


            MessagingCenter.Subscribe <EventQuestionViewModel, string>(this, MCenter.deleteSurveyKey.ToString(), (pg, data) =>
            {
                eventList.Remove(eventList.FirstOrDefault(x => x.Key == data));
                MessagingCenter.Unsubscribe <EventQuestionViewModel, string>(this, MCenter.deleteSurveyKey.ToString());
            });

            MessagingCenter.Subscribe <InteractionViewModel, string>(this, MCenter.deleteSurveyKey.ToString(), (pg, data) =>
            {
                eventList.Remove(eventList.FirstOrDefault(x => x.Key == data));
                MessagingCenter.Unsubscribe <EventQuestionViewModel, string>(this, MCenter.deleteSurveyKey.ToString());
            });
        }
        public InteractionViewModel(Page page) : base(page)
        {
            competition = new Competitions();
            response    = new InteractionResponse();
            uploadPhoto = new Image();
            service     = new BoshokuService();
            MessagingCenter.Subscribe <EventViewModel, FirebaseObject <Competitions> >(this, MCenter.competitionToInteractionKey.ToString(), (arg1, item) =>
            {
                MessagingCenter.Unsubscribe <EventViewModel, FirebaseObject <Competitions> >(this, MCenter.competitionToInteractionKey.ToString());
                uploadPhoto.Source = "ic_add_icon";
                eventKey           = item.Key;
                competition        = item.Object;
            });
            MessagingCenter.Subscribe <EventViewModel, Competitions>(this, MCenter.eventToIntereact.ToString(), (arg1, item) =>
            {
                MessagingCenter.Unsubscribe <EventViewModel, Competitions>(this, MCenter.eventToIntereact.ToString());
                uploadPhoto.Source = "ic_add_icon";
                eventKey           = item.key;
                competition        = item;
            });

            MessagingCenter.Subscribe <EventViewModel, FirebaseObject <Announcements> >(this, MCenter.announToInteractionKey.ToString(), (arg1, item) =>
            {
                MessagingCenter.Unsubscribe <EventViewModel, FirebaseObject <Announcements> >(this, MCenter.announToInteractionKey.ToString());
                uploadPhoto.Source    = "ic_add_icon";
                eventKey              = item.Key;
                var trash_competition = new Competitions()
                {
                    compName    = item.Object.title,
                    compDesc    = item.Object.desc,
                    createdDate = item.Object.createdDate,
                    image       = item.Object.image
                };
                competition = trash_competition;
            });
        }