コード例 #1
0
        public ForgotPassword()
        {
            InitializeComponent();
            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));
            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));

            mobilenumber.Completed += (s, e) =>
            {
                if (CrossConnectivity.Current.IsConnected)
                {
                    try
                    {
                        ClickSubmit();
                    }
                    catch (Exception ex)
                    {
                        System.Diagnostics.Debug.WriteLine(ex);
                    }
                }
                else
                {
                    DisplayAlert("Alert", "Please check your internet connection", "OK");
                }
            };
        }
コード例 #2
0
 public AddUser()
 {
     InitializeComponent();
     CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
     CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));
     CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));
 }
コード例 #3
0
        public SelectCategory()
        {
            InitializeComponent();

            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));

            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));

            BindingContext = this;
            //  suggestionlistview.ItemsSource = categ;


            categ.Add(new SearchCat {
                Name = "Shirts", TextColor = Color.Red
            });
            categ.Add(new SearchCat {
                Name = "Books"
            });
            categ.Add(new SearchCat {
                Name = "Mobiles"
            });
            categ.Add(new SearchCat {
                Name = "Laptops"
            });
            categ.Add(new SearchCat {
                Name = "Home Appliances"
            });
            categ.Add(new SearchCat {
                Name = "T-Shirts"
            });
        }
コード例 #4
0
        public SetPassword(string userid)
        {
            userId = userid;

            InitializeComponent();
            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));

            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));

            password.Completed += async(s, e) =>
            {
                if (CrossConnectivity.Current.IsConnected)
                {
                    try
                    {
                        Boolean boolisValid = await IsValid();

                        if (boolisValid)
                        {
                            DoneClick();
                        }
                    }
                    catch (Exception ex)
                    {
                        System.Diagnostics.Debug.WriteLine(ex);
                    }
                }
                else
                {
                    await DisplayAlert("Alert", "Please check your internet connection", "OK");
                }
            };
            cpassword.Completed += async(s, e) =>
            {
                if (CrossConnectivity.Current.IsConnected)
                {
                    try
                    {
                        Boolean boolisValid = await IsValid();

                        if (boolisValid)
                        {
                            DoneClick();
                        }
                    }
                    catch (Exception ex)
                    {
                        System.Diagnostics.Debug.WriteLine(ex);
                    }
                }
                else
                {
                    await DisplayAlert("Alert", "Please check your internet connection", "OK");
                }
            };
        }
コード例 #5
0
ファイル: Home.xaml.cs プロジェクト: davidvasquezr/ABMeter
        public Home()
        {
            CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 0, 0));
            InitializeComponent();

            map.MyLocationEnabled = true;
            map.UiSettings.MyLocationButtonEnabled = true;

            //Sets the title position to end
            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);

            //Sets shadow for bar bottom
            CustomNavigationPage.SetHasShadow(this, true);

            //Sets the title text font to Micro
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));

            //Sets the title color
            CustomNavigationPage.SetTitleColor(this, Color.White);

            //Sets bar background opacity
            //CustomNavigationPage.SetBarBackgroundOpacity(this, 0.6f);

            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#00838f"), Color.FromHex("#00838f")));
            //CustomNavigationPage.SetGradientColors(this, new Tuple<Color, Color>(Color.FromHex("#00838f"), Color.FromHex("#4fb3bf")));
            CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.LeftToRight);

            // Map Long clicked
            map.MapLongClicked += (sender, e) =>
            {
                var lat = e.Point.Latitude.ToString("0.000000");
                var lng = e.Point.Longitude.ToString("0.000000");
                //this.DisplayAlert("MapLongClicked", $"{lat}/{lng}", "CLOSE");
                latDestino.Text = lat;
                lonDestino.Text = lng;

                var pin = new Pin()
                {
                    Label    = "Destino",
                    Position = new Position(e.Point.Latitude, e.Point.Longitude)
                };

                map.Pins.Clear();
                map.Pins.Add(pin);
            };

            //Device.StartTimer(TimeSpan.FromSeconds(1), () =>
            //{
            //    // Do something
            //    CalculateLocation();

            //    return llego; // True = Repeat again, False = Stop the timer
            //});
        }
コード例 #6
0
        public Signup(string googleacc, string website)
        {
            InitializeComponent();
            try
            {
                CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
                CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));
                CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));
                BindingContext = this;
                GoogleAccount  = googleacc;
                Website        = website;
                geoCoder       = new Geocoder();
                if (Website == "Yes")
                {
                    storewebsite.IsVisible = true;
                }
                else
                {
                    storewebsite.IsVisible = false;
                }

                //GetSignUpDetails();
                if (CrossConnectivity.Current.IsConnected)
                {
                    GetStateService();
                    GetLocationAsync();
                    GetJSON();
                }
                else
                {
                    DisplayAlert("Alert", "Please check your Internet Connection", "Ok");
                }

                opentime = new TimePicker()
                {
                    Time = new TimeSpan(08, 0, 0)
                };

                OpenDuration = new TimePicker()
                {
                    Time = new TimeSpan(02, 0, 0)
                };

                tt = closingTime.Time - openingTime.Time;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
            }
        }
コード例 #7
0
        public PublishUnpublish_Offer(string img, string offer, string Id, string validfrom, string validto, string tc, string status, string storeUid)
        {
            InitializeComponent();

            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));
            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));

            imagepath2 = img;
            string Offer = offer;

            OfferID   = Id;
            Validfrom = validfrom;
            Validto   = validto;
            string Tc     = tc;
            string Status = status;

            StoreUID = storeUid;

            if (imagepath2.StartsWith("File"))
            {
                int index = imagepath2.IndexOf("File");
                var img1  = imagepath2.Substring(index + 6);
                offerimage.Source = img1;
            }
            else if (imagepath2.StartsWith("Uri"))
            {
                int index = imagepath2.IndexOf("Uri");
                var img1  = imagepath2.Substring(index + 5);
                offerimage.Source = ImageSource.FromUri(new System.Uri(img1));
            }

            offer1.Text     = Offer;
            tc1.Text        = Tc;
            validfrom1.Text = Validfrom;
            validto1.Text   = Validto;

            entryoffer1.Text     = Offer;
            entrytc1.Text        = Tc;
            entryvalidfrom1.Date = Convert.ToDateTime(Validfrom);
            entryvalidto1.Date   = Convert.ToDateTime(Validto);
        }
コード例 #8
0
        //     "Sector 29, Gurugram","MG Road, Gurugram","Sector 31, Gurugram"

        public SelectLocation()
        {
            InitializeComponent();
            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));
            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#17a39d"), Color.FromHex("#17a39d")));

            BindingContext = this;
            // suggestionlistview.ItemsSource = categ;

            location.Add(new SearchLoc {
                Name = "Saket, New Delhi", TextColor = Color.Red, img = ImageSource.FromFile("TickRed.png")
            });
            location.Add(new SearchLoc {
                Name = "MG Road, Gurugram", TextColor = Color.FromHex("#16325c")
            });
            location.Add(new SearchLoc {
                Name = "Sector 31, Gurugram", TextColor = Color.FromHex("#16325c")
            });
        }
コード例 #9
0
ファイル: Navigator.cs プロジェクト: Wallffiti/callaladdin2
        public Page GetPage(PageType pageType, object parameter, TitleAlignment titleAlignment)
        {
            Page view = null;

            switch (pageType)
            {
            case PageType.USER_REGISTRATION:
                view = new UserRegistrationPage()
                {
                };
                break;

            case PageType.USER_LOGIN:
                view = new UserLoginPage(parameter as string);
                break;

            case PageType.DISCLAIMER:
                view = new DisclaimerPage(parameter as UserRegistration);
                break;

            case PageType.PERSONAL_DATA_PROTECTION:
                view = new PersonalDataProtectionPage(parameter as UserRegistration);
                break;

            case PageType.SMS_VERIFICATION:
                view = new SmsVerificationPage(parameter as UserRegistration);
                break;

            case PageType.HOME:
                view = new HomePage(parameter /*as UserProfile*/);
                break;

            case PageType.CHANGE_PHONE_NUMBER:
                view = new ChangePhoneNumberPage(parameter);
                break;

            case PageType.EDIT_REQUESTOR_PROFILE:
                view = new EditRequestorProfilePage(parameter);
                break;

            case PageType.EDIT_CONTRACTOR_PROFILE:
                view = new EditContractorProfilePage(parameter);
                break;

            case PageType.JOB_REQUEST:
                view = new JobRequestPage(parameter);
                break;

            case PageType.JOB_VIEW:
                view = new JobViewPage(parameter);
                break;

            case PageType.HISTORY_JOB_VIEW:
                view = new JobHistoryViewPage(parameter);
                break;

            case PageType.EDIT_JOB_VIEW:
                view = new EditJobPage(parameter);
                break;

            case PageType.PROFILE_VIEW:
                view = new ProfilePage(parameter);
                break;

            case PageType.JOB_ACCEPTANCE_VIEW:
                view = new JobAcceptanceViewPage(parameter);
                break;

            case PageType.DUMMY:
                view = new DummyPage();
                break;
            }

            if (view != null)
            {
                if (titleAlignment == TitleAlignment.LEFT)
                {
                    CustomNavigationPage.SetTitlePosition(view, CustomNavigationPage.TitleAlignment.Start);
                }
                else if (titleAlignment == TitleAlignment.RIGHT)
                {
                    CustomNavigationPage.SetTitlePosition(view, CustomNavigationPage.TitleAlignment.End);
                }
                else
                {
                    CustomNavigationPage.SetTitlePosition(view, CustomNavigationPage.TitleAlignment.Center);
                }

                CustomNavigationPage.SetTitleFont(view, Font.SystemFontOfSize(NamedSize.Large));
                CustomNavigationPage.SetTitleColor(view, Color.Black);
                CustomNavigationPage.SetTitleFont(view, Font.SystemFontOfSize(20, FontAttributes.Bold));
            }

            return(view);
        }