Exemple #1
0
        public override void LoadView()
        {
            base.LoadView();

            if (Aircraft == null)
            {
                Aircraft = new Aircraft();
                exists   = false;
            }

            Title = exists ? Aircraft.TailNumber : "New Aircraft";

            profile            = new EditAircraftProfileView(View.Bounds.Width);
            profile.Photograph = PhotoManager.Load(Aircraft.TailNumber, false);
            profile.TailNumber = Aircraft.TailNumber;
            profile.Model      = Aircraft.Model;
            profile.Make       = Aircraft.Make;

            Root.Add(CreateAircraftTypeSection());
            Root.Add(new Section("Notes")
            {
                (notes = new LimitedEntryElement(null, "Enter any additional notes about the aircraft here.",
                                                 Aircraft.Notes, 140)),
            });

            Root[0].HeaderView = profile;

            cancel = new UIBarButtonItem(UIBarButtonSystemItem.Cancel, OnCancelClicked);
            NavigationItem.LeftBarButtonItem = cancel;

            save = new UIBarButtonItem(UIBarButtonSystemItem.Save, OnSaveClicked);
            NavigationItem.RightBarButtonItem = save;
        }
Exemple #2
0
 Section CreateMakeAndModelSection()
 {
     return(new Section("Make & Model")
     {
         (make = new LimitedEntryElement("Make", "Aircraft Manufacturer", "", 30)),
         (model = new LimitedEntryElement("Model", "Aircraft Model", "", 20)),
     });
 }
Exemple #3
0
        Section CreateRemarksSection()
        {
            remarks = new LimitedEntryElement(null, "Enter any remarks here.", Flight.Remarks, 140);

            return(new Section("Remarks")
            {
                remarks
            });
        }
        public override void LoadView()
        {
            name = new LimitedEntryElement ("Name", "Enter the name of the pilot.", Pilot.Name);
            cfi = new BooleanElement ("Certified Flight Instructor", Pilot.IsCertifiedFlightInstructor);
            aifr = new BooleanElement ("Instrument Rated (Airplane)", Pilot.InstrumentRatings.HasFlag (InstrumentRating.Airplane));
            hifr = new BooleanElement ("Instrument Rated (Helicopter)", Pilot.InstrumentRatings.HasFlag (InstrumentRating.Helicopter));
            lifr = new BooleanElement ("Instrument Rated (Powered-Lift)", Pilot.InstrumentRatings.HasFlag (InstrumentRating.PoweredLift));
            certification = CreatePilotCertificationElement (Pilot.Certification);
            endorsements = CreateEndorsementsElement (Pilot.Endorsements);
            birthday = new DateEntryElement ("Date of Birth", Pilot.BirthDate);
            medical = new DateEntryElement ("Last Medical Exam", Pilot.LastMedicalExam);
            review = new DateEntryElement ("Last Flight Review", Pilot.LastFlightReview);

            base.LoadView ();

            Root.Add (new Section ("Pilot Information") { name, birthday, certification, endorsements, aifr, hifr, lifr, cfi });
            Root.Add (new Section ("Pilot Status") { medical, review });
        }
Exemple #5
0
        public override void LoadView()
        {
            Title = exists ? Flight.Date.ToShortDateString() : "New Flight Entry";

            Root.Add(CreateFlightSection());
            Root.Add(CreateExperienceSection());
            Root.Add(CreateInstrumentSection());

            Root.Add(new Section("Remarks")
            {
                (remarks = new LimitedEntryElement(null, "Enter any remarks here.", Flight.Remarks, 140)),
            });

            cancel = new UIBarButtonItem(UIBarButtonSystemItem.Cancel, OnCancelClicked);
            NavigationItem.LeftBarButtonItem = cancel;

            save = new UIBarButtonItem(UIBarButtonSystemItem.Save, OnSaveClicked);
            NavigationItem.RightBarButtonItem = save;

            base.LoadView();
        }
Exemple #6
0
        public override void LoadView()
        {
            name          = new LimitedEntryElement("Name", "Enter the name of the pilot.", Pilot.Name);
            cfi           = new BooleanElement("Certified Flight Instructor", Pilot.IsCertifiedFlightInstructor);
            aifr          = new BooleanElement("Instrument Rated (Airplane)", Pilot.InstrumentRatings.HasFlag(InstrumentRating.Airplane));
            hifr          = new BooleanElement("Instrument Rated (Helicopter)", Pilot.InstrumentRatings.HasFlag(InstrumentRating.Helicopter));
            lifr          = new BooleanElement("Instrument Rated (Powered-Lift)", Pilot.InstrumentRatings.HasFlag(InstrumentRating.PoweredLift));
            certification = CreatePilotCertificationElement(Pilot.Certification);
            endorsements  = CreateEndorsementsElement(Pilot.Endorsements);
            birthday      = new DateEntryElement("Date of Birth", Pilot.BirthDate);
            medical       = new DateEntryElement("Last Medical Exam", Pilot.LastMedicalExam);
            review        = new DateEntryElement("Last Flight Review", Pilot.LastFlightReview);

            base.LoadView();

            Root.Add(new Section("Pilot Information")
            {
                name, birthday, certification, endorsements, aifr, hifr, lifr, cfi
            });
            Root.Add(new Section("Pilot Status")
            {
                medical, review
            });
        }
 Section CreateMakeAndModelSection()
 {
     return new Section ("Make & Model") {
         (make = new LimitedEntryElement ("Make", "Aircraft Manufacturer", "", 30)),
         (model = new LimitedEntryElement ("Model", "Aircraft Model", "", 20)),
     };
 }
        public override void LoadView()
        {
            Title = exists ? Flight.Date.ToShortDateString () : "New Flight Entry";

            Root.Add (CreateFlightSection ());
            Root.Add (CreateExperienceSection ());
            Root.Add (CreateInstrumentSection ());

            Root.Add (new Section ("Remarks") {
                (remarks = new LimitedEntryElement (null, "Enter any remarks here.", Flight.Remarks, 140)),
            });

            cancel = new UIBarButtonItem (UIBarButtonSystemItem.Cancel, OnCancelClicked);
            NavigationItem.LeftBarButtonItem = cancel;

            save = new UIBarButtonItem (UIBarButtonSystemItem.Save, OnSaveClicked);
            NavigationItem.RightBarButtonItem = save;

            base.LoadView ();
        }
 Section CreateInstrumentSection()
 {
     return new Section ("Instrument Experience") {
         (actual = new HobbsMeterEntryElement ("Actual Time", "Time spent flying by instrumentation only.", Flight.InstrumentActual)),
         (hood = new HobbsMeterEntryElement ("Hood Time", "Time spent flying under a hood.", Flight.InstrumentHood)),
         (simulator = new HobbsMeterEntryElement ("Simulator Time", "Time spent practicing in a simulator.", Flight.InstrumentSimulator)),
         (approaches = new NumericEntryElement ("Approaches", "The number of approaches made.", Flight.InstrumentApproaches, 1, 99)),
         (actingSafety = new BooleanElement ("Acting Safety Pilot", false)),
         (safetyPilot = new LimitedEntryElement ("Safety Pilot", "The name of your safety pilot.", 40)),
     };
 }
        public override void LoadView()
        {
            base.LoadView ();

            if (Aircraft == null) {
                Aircraft = new Aircraft ();
                exists = false;
            }

            Title = exists ? Aircraft.TailNumber : "New Aircraft";

            profile = new EditAircraftProfileView (View.Bounds.Width);
            profile.Photograph = PhotoManager.Load (Aircraft.TailNumber, false);
            profile.TailNumber = Aircraft.TailNumber;
            profile.Model = Aircraft.Model;
            profile.Make = Aircraft.Make;

            Root.Add (CreateAircraftTypeSection ());
            Root.Add (new Section ("Notes") {
                (notes = new LimitedEntryElement (null, "Enter any additional notes about the aircraft here.",
                    Aircraft.Notes, 140)),
            });

            Root[0].HeaderView = profile;

            cancel = new UIBarButtonItem (UIBarButtonSystemItem.Cancel, OnCancelClicked);
            NavigationItem.LeftBarButtonItem = cancel;

            save = new UIBarButtonItem (UIBarButtonSystemItem.Save, OnSaveClicked);
            NavigationItem.RightBarButtonItem = save;
        }
        Section CreateRemarksSection()
        {
            remarks = new LimitedEntryElement (null, "Enter any remarks here.", Flight.Remarks, 140);

            return new Section ("Remarks") { remarks };
        }