Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using MonoTouch.Dialog;
- public class DialogTest: DialogViewController
- {
- RootElement root = new RootElement("");
- string letters = "xxxxxxxxxxxxxxxxxxxxxxxxx";
- public DialogTest () : base(null, true)
- {
- Random r = new Random();
- var max = r.Next(10);
- for (int i = 0; i < max; i++) {
- AddSection();
- }
- this.Root = root;
- }
- private void AddSection() {
- Section section = new Section("");
- Random r = new Random();
- var max = r.Next(10);
- for (int i = 0; i < max; i++) {
- var maxLetters = r.Next(20);
- MojoEntryElement entry = new MojoEntryElement(letters.Substring(0, maxLetters), "", "");
- section.Add (entry);
- }
- root.Add (section);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment