예제 #1
0
        public static void Init()
        {
            var monkey = new Monkey
            {
                Name = "Orangutan",
                Description = "Native to Indonesia and Malaysia, orangutans are currently found in only the rainforests of Borneo and Sumatra. "
            };

            Add(monkey);
        }
예제 #2
0
        public CreateMonkeyPage()
        {
            Title = "Create Monkey";

            nameEntry = new Entry
            {
                 Placeholder = "Name"
            };

            descriptionEntry = new Entry
            {
                    Placeholder = "Description"
            };

            save = new Button
            {
                    Text = "Save"
            };

            save.Clicked += delegate
            {
                    var monkey = new Monkey
                    {
                        Name = nameEntry.Text,
                        Description = descriptionEntry.Text
                    };

                    DummyData.Add(monkey);
                    this.Navigation.PopAsync();
            };

            Content = new StackLayout
            {
                    Padding = 20,
                    Children = {nameEntry, descriptionEntry, save}
            };
        }
예제 #3
0
 internal static void Add(Monkey monkey)
 {
     Monkies.Add(monkey);
 }
예제 #4
0
 internal static void Add(Monkey monkey)
 {
     Monkies.Add(monkey);
 }