示例#1
0
        private async void LoadingInitAsync()
        {
            // 로딩 시작
            await Global.LoadingStartAsync();

            #region 네트워크 상태 확인
            var current_network = Connectivity.NetworkAccess; // 현재 네트워크 상태
            if (current_network != NetworkAccess.Internet)    // 네트워크 연결 불가
            {
                await DisplayAlert("알림", "네트워크에 연결할 수 없습니다. 다시 한번 시도해주세요.", "확인");

                pp = null;
                // 로딩 완료
                await Global.LoadingEndAsync();

                return;
            }
            #endregion
            #region 네트워크 연결 가능
            else
            {
                if (Global.b_guest_login == true)
                {
                    pp = new PT_Point {
                        PT_POINT_HAVEPOINT = 10000, PT_POINT_INDEX = 1000, USER_ID = "Guest",
                    };
                }
                else
                {
                    pp = PT_DB.PostSearchPointListToID(Global.ID); // 사용자 아이디로 아이디에 해당하는 포인트 테이블 가져옴
                }
            }
            #endregion

            pal = new PointAddList(this, pp);
            pul = new PointUsedList(this, pp);
            pcv = new PointChargeView(this, pp);
            pwv = new PointWidhdrawView(this, pp);

            init(pal);

            // 로딩 완료
            await Global.LoadingEndAsync();
        }
示例#2
0
        public void init(ContentView cv)
        {
            PointContentView.Content = cv;

            // 적립 내역 이벤트
            AddGrid.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(async() =>
                {
                    // 로딩 시작
                    await Global.LoadingStartAsync();

                    pal = new PointAddList(this, pp);
                    PointContentView.Content = pal;

                    ((CustomLabel)AddGrid.Children[0]).TextColor        = Color.CornflowerBlue;
                    ((BoxView)AddGrid.Children[1]).BackgroundColor      = Color.CornflowerBlue;
                    ((CustomLabel)UsedGrid.Children[0]).TextColor       = Color.Black;
                    ((BoxView)UsedGrid.Children[1]).BackgroundColor     = Color.White;
                    ((CustomLabel)ChargeGrid.Children[0]).TextColor     = Color.Black;
                    ((BoxView)ChargeGrid.Children[1]).BackgroundColor   = Color.White;
                    ((CustomLabel)WidhdrawGrid.Children[0]).TextColor   = Color.Black;
                    ((BoxView)WidhdrawGrid.Children[1]).BackgroundColor = Color.White;

                    // 로딩 완료
                    await Global.LoadingEndAsync();
                })
            });
            // 사용 내역 이벤트
            UsedGrid.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(async() =>
                {
                    // 로딩 시작
                    await Global.LoadingStartAsync();

                    pul = new PointUsedList(this, pp);
                    PointContentView.Content = pul;

                    ((CustomLabel)AddGrid.Children[0]).TextColor        = Color.Black;
                    ((BoxView)AddGrid.Children[1]).BackgroundColor      = Color.White;
                    ((CustomLabel)UsedGrid.Children[0]).TextColor       = Color.CornflowerBlue;
                    ((BoxView)UsedGrid.Children[1]).BackgroundColor     = Color.CornflowerBlue;
                    ((CustomLabel)ChargeGrid.Children[0]).TextColor     = Color.Black;
                    ((BoxView)ChargeGrid.Children[1]).BackgroundColor   = Color.White;
                    ((CustomLabel)WidhdrawGrid.Children[0]).TextColor   = Color.Black;
                    ((BoxView)WidhdrawGrid.Children[1]).BackgroundColor = Color.White;

                    // 로딩 완료
                    await Global.LoadingEndAsync();
                })
            });
            // 포인트 충전 이벤트
            ChargeGrid.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(() =>
                {
                    pcv = new PointChargeView(this, pp);
                    PointContentView.Content = pcv;

                    ((CustomLabel)AddGrid.Children[0]).TextColor        = Color.Black;
                    ((BoxView)AddGrid.Children[1]).BackgroundColor      = Color.White;
                    ((CustomLabel)UsedGrid.Children[0]).TextColor       = Color.Black;
                    ((BoxView)UsedGrid.Children[1]).BackgroundColor     = Color.White;
                    ((CustomLabel)ChargeGrid.Children[0]).TextColor     = Color.CornflowerBlue;
                    ((BoxView)ChargeGrid.Children[1]).BackgroundColor   = Color.CornflowerBlue;
                    ((CustomLabel)WidhdrawGrid.Children[0]).TextColor   = Color.Black;
                    ((BoxView)WidhdrawGrid.Children[1]).BackgroundColor = Color.White;
                })
            });
            // 포인트 출금 이벤트
            WidhdrawGrid.GestureRecognizers.Add(new TapGestureRecognizer()
            {
                Command = new Command(() =>
                {
                    pwv = new PointWidhdrawView(this, pp);
                    PointContentView.Content = pwv;
                    ((CustomLabel)AddGrid.Children[0]).TextColor        = Color.Black;
                    ((BoxView)AddGrid.Children[1]).BackgroundColor      = Color.White;
                    ((CustomLabel)UsedGrid.Children[0]).TextColor       = Color.Black;
                    ((BoxView)UsedGrid.Children[1]).BackgroundColor     = Color.White;
                    ((CustomLabel)ChargeGrid.Children[0]).TextColor     = Color.Black;
                    ((BoxView)ChargeGrid.Children[1]).BackgroundColor   = Color.White;
                    ((CustomLabel)WidhdrawGrid.Children[0]).TextColor   = Color.CornflowerBlue;
                    ((BoxView)WidhdrawGrid.Children[1]).BackgroundColor = Color.CornflowerBlue;
                })
            });
        }