public GroupDetailElement(MainScreenGroup parent, SmsGroupObject sms) : base("") { this.parent = parent; this.Sms = sms; this.style = UITableViewCellStyle.Subtitle; this.Accessory = UITableViewCellAccessory.DetailDisclosureButton; this.AccessoryTapped += ShowGroupDetail; this.Tapped += SendSms; this.LineBreakMode = UILineBreakMode.TailTruncation; }
public BatchMFMessageComposeViewController(MainScreenGroup parent, ABPerson[] recipients, string body, int batchSize, bool magicExpressionEnabled) : base() { this.Parent = parent; IndexSent = 0; this.Body = body; this.BatchSize = batchSize; LeftRecipients = new Stack <ABPerson>(recipients); this.MessageComposeDelegate = new CustomMessageComposeDelegate(); this.MagicExpressionEnabled = magicExpressionEnabled; }
public BatchMFMessageComposeViewController(MainScreenGroup parent, ABPerson[] recipients, string body, int batchSize, bool magicExpressionEnabled) : base() { this.Parent = parent; IndexSent = 0; this.Body = body; this.BatchSize = batchSize; LeftRecipients = new Stack<ABPerson>(recipients); this.MessageComposeDelegate = new CustomMessageComposeDelegate(); this.MagicExpressionEnabled = magicExpressionEnabled; }
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; }
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; }
public SmsComposerViewController(MainScreenGroup parent, SmsGroupObject sms) : this() { this.Title = string.Format ("{0} ({1})",sms.Name, sms.Count); Parent = parent; Sms = sms; this.Slider.MinValue = 1; this.Slider.MaxValue = Sms.Count; this.Slider.Value = Sms.Count > 10 ? 10: Sms.Count; this.SliderCount.Text = this.Slider.Value.ToString(); this.Slider.ValueChanged += HandleSliderhandleValueChanged; this.Message.Layer.CornerRadius = 10; // Localize Labels LabelComposeMessage.Text = Settings.GetLocalizedString(LabelComposeMessage.Text, LocalizedKey); LabelMaxContact.Text = Settings.GetLocalizedString(LabelMaxContact.Text, LocalizedKey); LabelUseMagicExpression.Text = Settings.GetLocalizedString(LabelUseMagicExpression.Text, LocalizedKey); ThreadPool.QueueUserWorkItem ((e) => { Sms.LoadPersons(); hasFinishedLoadedPersons = true; }); #if LITE MagicExpressionSwitch.Enabled = false; #endif // UITextView debug = null; // debug = new UITextView(new RectangleF(0, SendButton.Frame.Y + 2,160,20)); // this.Add(debug); // ThreadPool.QueueUserWorkItem ((e) => { // while(true){ // if(Ad!= null){ // InvokeOnMainThread(() => { // debug.Text = // string.Format("Loaded {0}, AdSection {1},", Ad.BannerLoaded, Ad.AdvertisingSection); // }); // // Thread.Sleep(1000); // } // } // }); }
public SmsComposerViewController(MainScreenGroup parent, SmsGroupObject sms) : this() { this.Title = string.Format("{0} ({1})", sms.Name, sms.Count); Parent = parent; Sms = sms; this.Slider.MinValue = 1; this.Slider.MaxValue = Sms.Count; this.Slider.Value = Sms.Count > 10 ? 10: Sms.Count; this.SliderCount.Text = this.Slider.Value.ToString(); this.Slider.ValueChanged += HandleSliderhandleValueChanged; this.Message.Layer.CornerRadius = 10; // Localize Labels LabelComposeMessage.Text = Settings.GetLocalizedString(LabelComposeMessage.Text, LocalizedKey); LabelMaxContact.Text = Settings.GetLocalizedString(LabelMaxContact.Text, LocalizedKey); LabelUseMagicExpression.Text = Settings.GetLocalizedString(LabelUseMagicExpression.Text, LocalizedKey); ThreadPool.QueueUserWorkItem((e) => { Sms.LoadPersons(); hasFinishedLoadedPersons = true; }); #if LITE MagicExpressionSwitch.Enabled = false; #endif // UITextView debug = null; // debug = new UITextView(new RectangleF(0, SendButton.Frame.Y + 2,160,20)); // this.Add(debug); // ThreadPool.QueueUserWorkItem ((e) => { // while(true){ // if(Ad!= null){ // InvokeOnMainThread(() => { // debug.Text = // string.Format("Loaded {0}, AdSection {1},", Ad.BannerLoaded, Ad.AdvertisingSection); // }); // // Thread.Sleep(1000); // } // } // }); }