예제 #1
0
        public async Task onAppearing()
        {
            //edw pera 8a koitaei thn vash kai 8a kanei load ta messages!!
            try
            {
                await Shell.Current.Navigation.PushPopupAsync(new LoadingPopup());

                await ChatHub.Init(CurrentGroup);

                await ChatHub.hubConnection.StartAsync();

                await ChatHub.JoinGroup(CurrentGroup);

                var list1 = await server.GetGroypMessages(CurrentGroup);

                RoomMessages = new ObservableCollection <GroupMessages>(list1);
                await Shell.Current.Navigation.PopPopupAsync();

                //await server.AddRoom(CurrentGroup);
            }
            catch (Exception ex)
            {
                await Shell.Current.Navigation.PopPopupAsync();

                await Shell.Current.Navigation.PushPopupAsync(new InfoPopup("Error", ex.Message));

                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.Message);
            }
        }
예제 #2
0
        public async Task OnAppearing()
        {
            await ChatHub.Init();

            Console.WriteLine("");
        }