public RaffleDetailScreenController(Tap5050Event raffle,UIImage raffleImage)
 {
     //objects
     this.raffle = raffle;
     this.raffleImage = raffleImage;
     this.selectedGoalView = SelectedGoalView.Detail;
 }
Пример #2
0
 public static string Format(string template, Tap5050Event raffle)
 {
     template= template.Replace("{link}", raffle.sell_ticket_url);
     template = template.Replace("{org}", raffle.organization);
     template = template.Replace("{jackpot}", raffle.jackpot_total);
     template = template.Replace("{jurisdiction}", GlobalVariable.currentlocation);
     return template;
 }
Пример #3
0
        public SocialShareView(Tap5050Event raffle)
        {
            this.raffle = raffle;
            BackgroundColor = UIColor.Clear;

            DismissBtn =UIButton.FromType(UIButtonType.RoundedRect);
            DismissBtn.BackgroundColor = UIColor.Clear;
            Add(DismissBtn);

            SubSocialView = new UIView () {
                BackgroundColor=UIColor.FromRGB(247,247,247),
            };
            Add (SubSocialView);

            facebookBtn =UIButton.FromType(UIButtonType.RoundedRect);
            facebookBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.FacebookImageFileName), UIControlState.Normal);
            SubSocialView.Add(facebookBtn);

            twitterBtn =UIButton.FromType(UIButtonType.RoundedRect);
            twitterBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.TwitterImageFileName), UIControlState.Normal);
            SubSocialView.Add(twitterBtn);

            SMSBtn =UIButton.FromType(UIButtonType.RoundedRect);
            SMSBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.SMSImageFileName), UIControlState.Normal);
            SubSocialView.Add(SMSBtn);

            emailBtn =UIButton.FromType(UIButtonType.RoundedRect);
            emailBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.EmailImageFileName), UIControlState.Normal);
            SubSocialView.Add(emailBtn);

            BuylaterTextField = new UITextField( )
            {
                Placeholder=RaffleDetailData.ContactTextFieldPlaceholder,
                Text=RaffleDetailData.ContactTextFieldText,
                ClearButtonMode=UITextFieldViewMode.Always,
                KeyboardType=UIKeyboardType.EmailAddress,
                AutocapitalizationType = UITextAutocapitalizationType.None,
                ReturnKeyType=UIReturnKeyType.Done,
                TextColor = UIColor.Black,
                BackgroundColor = UIColor.Clear,
                BorderStyle = UITextBorderStyle.RoundedRect,
                Enabled = true,
                SecureTextEntry=false
            };
            BuylaterTextField.ShouldReturn += (textField) =>
            {
                textField.ResignFirstResponder();
                return true;
            };
            SubSocialView.Add(BuylaterTextField);

            BuylaterBtn =new CustomBtn();
            BuylaterBtn.SetTitle (RaffleDetailData.BuyLaterBtnTitle, UIControlState.Normal);
            BuylaterBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            SubSocialView.Add(BuylaterBtn);

            Rotate ();
        }
Пример #4
0
        public SocialShareView(Tap5050Event raffle)
        {
            this.raffle = raffle;
            BackgroundColor = UIColor.FromRGB(247,247,247);

            facebookBtn =UIButton.FromType(UIButtonType.RoundedRect);
            facebookBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.FacebookImageFileName), UIControlState.Normal);
            Add(facebookBtn);

            twitterBtn =UIButton.FromType(UIButtonType.RoundedRect);
            twitterBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.TwitterImageFileName), UIControlState.Normal);
            Add(twitterBtn);

            SMSBtn =UIButton.FromType(UIButtonType.RoundedRect);
            SMSBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.SMSImageFileName), UIControlState.Normal);
            Add(SMSBtn);

            emailBtn =UIButton.FromType(UIButtonType.RoundedRect);
            emailBtn.SetBackgroundImage (UIImage.FromFile (RaffleDetailData.EmailImageFileName), UIControlState.Normal);
            Add(emailBtn);

            Rotate ();
        }
Пример #5
0
 public GoalsCard(Tap5050Event tap5050event,Bitmap bitmmaporiginal,Bitmap bitmapprize)
 {
     eventinfo = tap5050event;
     ornanizationbitmap = bitmmaporiginal;
     prizebitmap = bitmapprize;
 }
Пример #6
0
 public RequestTPScreenController(Tap5050Event raffle,UIImage raffleImage)
 {
     //objects
     this.raffle = raffle;
     this.raffleImage = raffleImage;
 }
Пример #7
0
 public EventCard(Tap5050Event tap5050event,Bitmap bitmmapsmall,Bitmap bitmmaporiginal)
 {
     eventinfo = tap5050event;
     imagemap = bitmmapsmall;
     originalmap = bitmmaporiginal;
 }
Пример #8
0
 public LeaderBoardSource(Tap5050Event raffle,SelectedGoalView selectedGoalView)
 {
     this.raffle = raffle;
     this.selectedGoalView = selectedGoalView;
 }
        public void LoadRaffleWebCallResponds(Tap5050WebResponse response)
        {
            if(response.available){
                Global.eventlist=(List<Tap5050Event>)response.parsedobject;
                if (Global.eventlist == null)
                {
                    Global.eventlist = new List<Tap5050Event> ();
                }
                Global.eventImageList = new List<UIImage> ();
                //insert default image
                for(int i=0;i<Global.eventlist.Count;i++)
                {
                    Global.eventImageList.Add (UIImage.FromFile (RaffleDetailData.DefaulImageFileName));
                }

                //get current raffle
                Boolean foundEvent=false;

                for(int i=0;i<Global.eventlist.Count;i++){
                    if(raffle.event_id==Global.eventlist[i].event_id){
                        raffle=Global.eventlist[i];
                        this.position = i;
                        foundEvent=true;
                    }
                }
                if(foundEvent){
                    InvokeOnMainThread (() => {
                        loadingOverlayView.Hide ();
                        raffleImage=Global.eventImageList [position];
                        initRaffleDetailScreenView();
                        //View.Add(socialShareView);
                        foreach (var x in NavigationItem.RightBarButtonItems) {
                            x.Enabled = true;
                        }
                        NavigationItem.HidesBackButton = false;
                        /*
                        foreach (var x in NavigationItem.LeftBarButtonItems) {
                            x.Enabled = true;
                        }
                        */
                    });
                    //start loading image
                    for(int i=0;i<Global.eventlist.Count;i++){
                        if(!String.IsNullOrEmpty(Global.eventlist[i].image_url)){
                                LoadImageWebCall (i);
                        }
                    }
                }
                else{
                    InvokeOnMainThread (() => {
                        loadingOverlayView.Hide ();

                        //alert
                        UIAlertController Alert = UIAlertController.Create (RaffleDetailData.AlertScreenCurrentRaffleErrorTitle,
                            RaffleDetailData.AlertScreenCurrentRaffleErrorMessage, UIAlertControllerStyle.Alert);
                        Alert.AddAction (UIAlertAction.Create (RaffleDetailData.AlertScreenCurrentRaffleErrorCancelBtnTitle,
                            UIAlertActionStyle.Cancel,action=>{
                                NavigationController.PopViewController(true);
                            }));
                        PresentViewController (Alert, true, null);
                    });
                }
            }
            else{
                InvokeOnMainThread (() => {
                    loadingOverlayView.Hide ();

                    //alert
                    UIAlertController Alert = UIAlertController.Create (RaffleListScreenData.AlertScreenLoadRafflesFailTitle,
                        response.exceptionreport.errormessage, UIAlertControllerStyle.Alert);
                    Alert.AddAction (UIAlertAction.Create (RaffleListScreenData.AlertScreenLoadRafflesFailCancelBtnTitle,
                        UIAlertActionStyle.Cancel,action=>{
                            DismissViewController(true,null);
                        }));
                    PresentViewController (Alert, true, null);
                });
            }
        }
Пример #10
0
        public RaffleDetailScreenView(Tap5050Event raffle,UIImage raffleImage,UIInterfaceOrientation UIInterfaceOrientation)
        {
            this.raffle = raffle;
            this.raffleImage = raffleImage;

            BackgroundColor = UIColor.FromRGB (235, 235, 235);

            //GUI component***********************************************
            raffleDetailView = new UIView () {
                BackgroundColor=UIColor.FromRGB (255, 255, 255),
            };
            Add (raffleDetailView);

            jackPotLabel = new UILabel ()
            {
                TextColor = UIColor.Red,
                TextAlignment=UITextAlignment.Center,
                Text="$"+raffle.jackpot_total,
                Hidden=(raffle.has_jackpot == "Y"?false:true)
            };
            Add(jackPotLabel);

            jackPotDescriptionLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.jackpot_description,
                Hidden=(raffle.has_jackpot == "Y"?false:true)
            };
            Add(jackPotDescriptionLabel);

            raffleImageView=new UIImageView()
            {
                ContentMode = UIViewContentMode.ScaleAspectFit,
                Image = raffleImage
            };
            Add (raffleImageView);

            raffleNameTextView = new UITextView ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.event_name,
                Editable=false,
                BackgroundColor=UIColor.Clear,
                ScrollEnabled=false
            };
            Add(raffleNameTextView);

            licenseNumberLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=RaffleDetailData.LicenseNumberLabelText,
            };
            Add(licenseNumberLabel);

            licenseNumberLabel2 = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.licence_number
            };
            Add(licenseNumberLabel2);

            organizationLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.organization,
            };
            Add(organizationLabel);

            descriptionTextView = new UITextView ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Left,
                Text=raffle.description,
                Editable=false,
                BackgroundColor=UIColor.Clear,
                ScrollEnabled=false
            };
            Add(descriptionTextView);

            seePrizeBtn =new CustomBtn();
            seePrizeBtn.SetTitle (RaffleDetailData.SeePrizeBtnTitle, UIControlState.Normal);
            seePrizeBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            seePrizeBtn.Hidden = (String.IsNullOrEmpty (raffle.prize_url)||(!raffle.prize_url.ToLower ().Contains ("https://")) ? true : false);
            Add(seePrizeBtn);

            sellTicketBtn =new CustomBtn();
            sellTicketBtn.SetTitle (RaffleDetailData.SellTicketBtnTitle, UIControlState.Normal);
            sellTicketBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            sellTicketBtn.Hidden = (raffle.have_contract == "Y" ? false : true);
            Add(sellTicketBtn);

            applyContractBtn =new CustomBtn();
            applyContractBtn.SetTitle (RaffleDetailData.ApplyContractBtnTitle, UIControlState.Normal);
            applyContractBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            applyContractBtn.Hidden = (raffle.have_contract == "Y" ? true : false);
            Add(applyContractBtn);

            //****************************************************************************************
            contactView = new UIView () {
                BackgroundColor=UIColor.FromRGB (255, 255, 255),
            };
            Add (contactView);

            contactDescriptionTextField= new UITextView ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=RaffleDetailData.contactDescriptionText,
                Editable=false,
                BackgroundColor=UIColor.Clear,
                ScrollEnabled=false
            };
            Add(contactDescriptionTextField);

            contactTextField = new UITextField( )
            {
                Placeholder=RaffleDetailData.ContactTextFieldPlaceholder,
                Text=RaffleDetailData.ContactTextFieldText,
                ClearButtonMode=UITextFieldViewMode.Always,
                KeyboardType=UIKeyboardType.EmailAddress,
                AutocapitalizationType = UITextAutocapitalizationType.None,
                ReturnKeyType=UIReturnKeyType.Done,
                TextColor = UIColor.Black,
                BackgroundColor = UIColor.Clear,
                BorderStyle = UITextBorderStyle.RoundedRect,
                Enabled = true,
                SecureTextEntry=false
            };
            contactTextField.ShouldReturn += (textField) =>
            {
                textField.ResignFirstResponder();
                return true;
            };
            Add(contactTextField);

            sentContactBtn =new CustomBtn();
            sentContactBtn.SetTitle (RaffleDetailData.SentContactBtnTitle, UIControlState.Normal);
            sentContactBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            Add(sentContactBtn);

            //move the view when the keyboard is up
            NSNotificationCenter.DefaultCenter.AddObserver
            (UIKeyboard.DidShowNotification,KeyBoardUpNotification);

            Rotate (UIInterfaceOrientation);
        }
Пример #11
0
 public TeamListScreenController(Tap5050Event theEvent)
 {
     this.theEvent = theEvent;
 }
Пример #12
0
 public ContactListScreenController(Tap5050Event raffle,ContactType contactType)
 {
     this.raffle = raffle;
     this.contactType = contactType;
 }
 public TeamMemberListScreenController(Tap5050Event theEvent)
 {
     //this.isLeader = isLeader;
     this.theEvent = theEvent;
 }
Пример #14
0
 public RequestTPScreenController(Tap5050Event raffle)
 {
     //objects
     this.raffle = raffle;
 }
Пример #15
0
        //********************************************
        //public GroupGoalScreenView GroupGoalView{ get; set;}
        public RaffleDetailScreenView(Tap5050Event raffle,UIImage raffleImage,UIInterfaceOrientation UIInterfaceOrientation)
        {
            this.raffle = raffle;
            this.raffleImage = raffleImage;

            BackgroundColor = UIColor.FromRGB (235, 235, 235);
            ScrollEnabled = false;
            //GUI component***********************************************
            PersonalBtn=UIButton.FromType(UIButtonType.System);
            PersonalBtn.BackgroundColor = UIColor.Clear;
            PersonalBtn.SetTitle (RaffleDetailData.PersonalGoalBtnTitle, UIControlState.Normal);
            PersonalBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
            Add(PersonalBtn);

            GrpBtn=UIButton.FromType(UIButtonType.System);
            GrpBtn.BackgroundColor = UIColor.Clear;
            GrpBtn.SetTitle (RaffleDetailData.GroupGoalBtnTitle, UIControlState.Normal);
            GrpBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
            Add(GrpBtn);

            RaffleDetailBtn=UIButton.FromType(UIButtonType.System);
            RaffleDetailBtn.BackgroundColor = UIColor.Clear;
            RaffleDetailBtn.SetTitle (RaffleDetailData.RaffleDetailBtnTitle, UIControlState.Normal);
            RaffleDetailBtn.SetTitleColor (UIColor.Black, UIControlState.Normal);
            Add(RaffleDetailBtn);

            RaffleDetailBarView= new UIView () {
                BackgroundColor=UIColor.FromRGB (245, 245, 245),
            };
            Add (RaffleDetailBarView);
            PersonalBarView= new UIView () {
                BackgroundColor=UIColor.FromRGB (245, 245, 245),
            };
            Add (PersonalBarView);
            GrpBarView= new UIView () {
                BackgroundColor=UIColor.FromRGB (245, 245, 245),
            };
            Add (GrpBarView);

            raffleDetailView = new UIScrollView () {
                BackgroundColor=UIColor.Clear,
            };
            Add (raffleDetailView);

            GoalView = new  GoalScreenView ();
            Add (GoalView);

            jackPotLabel = new UILabel ()
            {
                TextColor = UIColor.Red,
                TextAlignment=UITextAlignment.Center,
                Text="$"+raffle.jackpot_total,
                Hidden=(raffle.has_jackpot == "Y"?false:true)
            };
            raffleDetailView.Add(jackPotLabel);

            jackPotDescriptionLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.jackpot_description,
                Hidden=(raffle.has_jackpot == "Y"?false:true)
            };
            raffleDetailView.Add(jackPotDescriptionLabel);

            raffleImageView=new UIImageView()
            {
                ContentMode = UIViewContentMode.ScaleAspectFit,
                Image = raffleImage
            };
            raffleDetailView.Add (raffleImageView);

            raffleNameTextView = new UITextView ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.event_name,
                Editable=false,
                BackgroundColor=UIColor.Clear,
                ScrollEnabled=false
            };
            raffleDetailView.Add(raffleNameTextView);

            licenseNumberLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=RaffleDetailData.LicenseNumberLabelText,
            };
            raffleDetailView.Add(licenseNumberLabel);

            licenseNumberLabel2 = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.licence_number
            };
            raffleDetailView.Add(licenseNumberLabel2);

            organizationLabel = new UILabel ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Center,
                Text=raffle.organization,
            };
            raffleDetailView.Add(organizationLabel);

            descriptionTextView = new UITextView ()
            {
                TextColor = UIColor.Black,
                TextAlignment=UITextAlignment.Left,
                Text=raffle.description,
                Editable=false,
                BackgroundColor=UIColor.Clear,
                ScrollEnabled=false
            };
            raffleDetailView.Add(descriptionTextView);

            seePrizeBtn =new CustomBtn();
            seePrizeBtn.SetTitle (RaffleDetailData.SeePrizeBtnTitle, UIControlState.Normal);
            seePrizeBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            seePrizeBtn.Hidden = (String.IsNullOrEmpty (raffle.prize_url)||(!raffle.prize_url.ToLower ().Contains ("https://")) ? true : false);
            raffleDetailView.Add(seePrizeBtn);

            sellTicketBtn =new CustomBtn();
            sellTicketBtn.SetTitle (RaffleDetailData.SellTicketBtnTitle, UIControlState.Normal);
            sellTicketBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            sellTicketBtn.Hidden = (raffle.have_contract == "Y" ? false : true);
            raffleDetailView.Add(sellTicketBtn);

            applyContractBtn =new CustomBtn();
            applyContractBtn.SetTitle (RaffleDetailData.ApplyContractBtnTitle, UIControlState.Normal);
            applyContractBtn.SetTitleColor (UIColor.White, UIControlState.Normal);
            applyContractBtn.Hidden = (raffle.have_contract == "Y" ? true : false);
            raffleDetailView.Add(applyContractBtn);

            //GroupGoalView = new  GroupGoalScreenView ();
            //Add (GroupGoalView);

            //move the view when the keyboard is up
            NSNotificationCenter.DefaultCenter.AddObserver
            (UIKeyboard.DidShowNotification,KeyBoardUpNotification);

            Rotate (UIInterfaceOrientation);
        }