Beispiel #1
0
        void FairEstimate_NextButton_Click()
        {
            Debug.WriteLine("Fair Estimate {0} {1}", pickupPosition.Latitude, pickupPosition.Longitude);
            var destinationPage = new DestinationPage();

            LoginResponse loginUser = Application.Current.Properties["userData"] as LoginResponse;


            if (LocationName == null && txtLocation.Text == "")
            {
                Application.Current.MainPage.DisplayAlert("Shofar", "Please choose correct location", "OK");
            }
            else if (LocationName != null && txtLocation.Text != "")
            {
                LocationName = txtLocation.Text;
            }
            else
            {
                LocationName = "Current Location";
            }

            // Create new booking
            ShoferAppST shoferBooking = ShoferAppST.Instance();

            shoferBooking.Booking = new BookingData();
            shoferBooking.Booking.PickupPosition     = pickupPosition;
            shoferBooking.Booking.PickupPositionName = LocationName;
            shoferBooking.Booking.VehicleType        = selectedCar;
            shoferBooking.Booking.DriverId           = "2";
            shoferBooking.Booking.UserId             = loginUser.id;
            shoferBooking.Booking.KMPrice            = Convert.ToDouble(selectedVechileInfo.per_km_charge);
            shoferBooking.Booking.BasePrice          = Convert.ToDouble(selectedVechileInfo.base_fare);

            destinationPage.pickupPosition = pickupPosition;
            Navigation.PushAsync(destinationPage);
        }
Beispiel #2
0
        public static void Main(String[] args)
        {
            try {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                InstallerResources.CurrentLanguageChanged += new EventHandler(InstallerResources_CurrentLanguageChanged);

                InstallationInfo.ProgramMode = ProgramMode.None;

                #region Initial PackageInfo Options

                // set this here because there's nowhere else to put it
                // HACK: Devise a shortlist of known languages that have this problem
                // also, does this affect Vista?
                if (Environment.OSVersion.Version.Major == 5)
                {
                    PackageInfo.LiteMode = System.Globalization.CultureInfo.InstalledUICulture.DisplayName.IndexOf("English", StringComparison.OrdinalIgnoreCase) == -1;
                }

                if (InstallerResources.IsCustomized)
                {
                    PackageInfo.IgnoreCondition = InstallerResources.CustomizedSettings.DisablePackageCheck;
                }

                PackageInfo.SystemRestore = true;

                InstallationInfo.FeedbackSend = true;

                #endregion

                if (args.Length > 0)
                {
                    //////////////////////////////////////////
                    // Pause
                    if (args.IndexOf("/pause") > -1)
                    {
                        MessageBox.Show("Paused", "Anolis Installer", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }

                    //////////////////////////////////////////
                    // Package Condition
                    if (args.IndexOf("/ignoreCondition") > -1)
                    {
                        PackageInfo.IgnoreCondition = true;
                    }

                    //////////////////////////////////////////
                    // Uninstall Mode
                    String uninstall = GetUninstallation(args);
                    if (uninstall != null)
                    {
                        InstallationInfo.UninstallPackage = new FileInfo(uninstall);
                        InstallationInfo.ProgramMode      = ProgramMode.UninstallPackage;
                    }

                    //////////////////////////////////////////
                    // Jump-to-Package
//
//					String filename = args[0];
//					if( File.Exists( filename ) ) {
//
//						String ext = Path.GetExtension( filename ).ToUpperInvariant();
//						if(ext == ".ANOP") { // package archive
//
//						} else if( ext == ".XML") { // package definition
//
//						}
//
//					}
                }



                // preload resources
                System.Drawing.Image
                    image = InstallerResources.GetImage("Background");
                image = InstallerResources.GetImage("Banner");

                // Set up the wizard

                // create the pages
                PageAWelcome    = new WelcomePage();
                PageBMainAction = new MainActionPage();

                PageCASelectPackage  = new SelectPackagePage();
                PageCBExtracting     = new ExtractingPage();
                PageCCUpdatePackage  = new UpdatePackagePage();
                PageCDReleaseNotes   = new ReleaseNotesPage();
                PageCE1Selector      = new SelectorPage();
                PageCE2ModifyPackage = new ModifyPackagePage();
                PageCFInstallOpts    = new InstallationOptionsPage();
                PageCFInstallOptForm = new InstallationOptionsForm();
                PageCGInstalling     = new InstallingPage();

                PageDADestination = new DestinationPage();
                PageDBDownloading = new DownloadingPage();

                PageEASelectBackup = new SelectBackupPage();

                PageFFinished = new FinishedPage();

                WizardForm = InstallationInfo.CreateWizard();

                WizardForm.CancelClicked += new EventHandler(wiz_CancelClicked);
                WizardForm.HasHelp        = false;
                WizardForm.Title          = InstallationInfo.InstallerTitle;
                WizardForm.Icon           = InstallerResources.GetIcon("Package");

                WizardForm.NextText   = InstallerResources.GetString("Wiz_Next");
                WizardForm.BackText   = InstallerResources.GetString("Wiz_Prev");
                WizardForm.CancelText = InstallerResources.GetString("Wiz_Cancel");

                InstallerResources.ForceLocalize();
            } catch (Exception ex) {
                StringBuilder sb = new StringBuilder();
                while (ex != null)
                {
                    sb.Append(ex.Message);
                    sb.Append("\r\n");
                    sb.Append(ex.StackTrace);

                    if (ex.InnerException != null)
                    {
                        sb.Append("\r\n\r\n");
                    }

                    ex = ex.InnerException;
                }

                MessageBox.Show(sb.ToString(), "Anolis Installer - Initialisation Exception", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                return;
            }

            switch (InstallationInfo.ProgramMode)
            {
            case ProgramMode.UninstallPackage:
                WizardForm.LoadPage(PageEASelectBackup);
                break;

            case ProgramMode.None:
            default:
                WizardForm.LoadPage(PageAWelcome);
                break;
            }

            WizardForm.Run();


            // Clean-up
            if (PackageInfo.Package != null && (PackageInfo.Source == PackageSource.Embedded || PackageInfo.Source == PackageSource.Archive))
            {
                PackageInfo.Package.DeleteFiles();
            }
        }
Beispiel #3
0
 public void SetUpAttribute()
 {
     page = new DestinationPage("chrome");
 }