コード例 #1
0
        public EditContactBeforeSMSController(SmsGroupObject g) : base(true, ToolbarItemOption.Refresh, false)
        {
            Root     = new RootElement("Edit");
            contact  = new SegmentedSection("Contacts");
            this.Sms = g;

            contact.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("All", LocalizedKey),
                0, true);
            contact.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("None", LocalizedKey),
                1, true);
            contact.SegmentedControl.ValueChanged += HandleContactSegmentedControlAllTouchEvents;
            this.Root.Add(contact);
            Initialize();
        }
コード例 #2
0
        public EditContactBeforeSMSController(SmsGroupObject g)
            : base(true, ToolbarItemOption.Refresh, false)
        {
            Root = new RootElement("Edit");
            contact = new SegmentedSection("Contacts");
            this.Sms = g;

            contact.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("All", LocalizedKey),
                0,true);
            contact.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("None", LocalizedKey),
                1,true);
            contact.SegmentedControl.ValueChanged += HandleContactSegmentedControlAllTouchEvents;
            this.Root.Add(contact);
            Initialize();
        }
コード例 #3
0
        public ContactListController(MainScreenGroup parent, GroupDetailElement smsGroup = null) : base(true, ToolbarItemOption.Refresh, false)
        {
            this.EnableSearch   = true;
            this.AutoHideSearch = true;
            this.Parent         = parent;
            this.smsGroup       = smsGroup;

            Root           = new RootElement(Settings.GetLocalizedString("Contact List", LocalizedKey));
            this.isEditing = this.smsGroup != null;
            Section groupName = new Section(Settings.GenerateHeaderFooter("Group Name", LocalizedKey),
                                            Settings.GenerateHeaderFooter("The name that will best describe your group", LocalizedKey));

            groupName.IsSearchable = false;
            nameElement            = new EntryElement(
                Settings.GetLocalizedString("Name", LocalizedKey),
                Settings.GetLocalizedString("Group Name", LocalizedKey), smsGroup != null && smsGroup.Sms != null ? smsGroup.Sms.Name : "");
            nameElement.ClearButtonMode = UITextFieldViewMode.WhileEditing;
            groupName.Add(nameElement);

            //SegmentedSection
            contactSection            = new SegmentedSection("Contacts");
            contactSection.FooterView =
                Settings.GenerateHeaderFooter("Displays only contacts that have a mobile phone set", LocalizedKey);
            contactSection.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("All", LocalizedKey),
                0, true);
            contactSection.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("None", LocalizedKey),
                1, true);
            contactSection.SegmentedControl.ValueChanged += HandleContactSectionSegmentedControlTouchUpInside;

            ThreadPool.QueueUserWorkItem((e) => {
                InvokeOnMainThread(() => {
                    Initialize();
                    this.ReloadData();
                });
            });

            Root.Add(groupName);
            Root.Add(contactSection);

            UIBarButtonItem done = new UIBarButtonItem(UIBarButtonSystemItem.Done);

            done.Clicked += HandleDoneClicked;
            this.NavigationItem.RightBarButtonItem = done;
        }
コード例 #4
0
        public ContactListController(MainScreenGroup parent, GroupDetailElement smsGroup = null)
            : base(true, ToolbarItemOption.Refresh ,false)
        {
            this.EnableSearch = true;
            this.AutoHideSearch = true;
            this.Parent = parent;
            this.smsGroup = smsGroup;

            Root = new RootElement (Settings.GetLocalizedString("Contact List", LocalizedKey));
            this.isEditing = this.smsGroup != null;
            Section groupName = new Section(Settings.GenerateHeaderFooter("Group Name", LocalizedKey),
                Settings.GenerateHeaderFooter("The name that will best describe your group", LocalizedKey));
            groupName.IsSearchable = false;
            nameElement = new EntryElement(
                Settings.GetLocalizedString("Name", LocalizedKey),
                Settings.GetLocalizedString("Group Name", LocalizedKey), smsGroup != null && smsGroup.Sms != null ? smsGroup.Sms.Name : "");
            nameElement.ClearButtonMode = UITextFieldViewMode.WhileEditing;
            groupName.Add(nameElement);

            //SegmentedSection
            contactSection = new SegmentedSection("Contacts");
            contactSection.FooterView =
                Settings.GenerateHeaderFooter("Displays only contacts that have a mobile phone set", LocalizedKey);
            contactSection.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("All", LocalizedKey),
                0,true);
            contactSection.SegmentedControl.InsertSegment(
                Settings.GetLocalizedString("None", LocalizedKey),
                1,true);
            contactSection.SegmentedControl.ValueChanged += HandleContactSectionSegmentedControlTouchUpInside;

            ThreadPool.QueueUserWorkItem ((e) => {
                InvokeOnMainThread(()=>{
                    Initialize();
                    this.ReloadData();
                });
            });

            Root.Add(groupName);
            Root.Add(contactSection);

            UIBarButtonItem done = new UIBarButtonItem(UIBarButtonSystemItem.Done);
            done.Clicked += HandleDoneClicked;
            this.NavigationItem.RightBarButtonItem = done;
        }