示例#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);
 }