public RelationsScreenView(SwitchChangeDelegate SwitchChange) { BackgroundColor = UIColor.FromRGB (255, 255, 255); RalationsListTableView = new UITableView () { Source=new RelationsScreenSource(SwitchChange), }; Add (RalationsListTableView); Rotate (); }
public ContactListScreenCell(SwitchChangeDelegate SwitchChange) : base(UITableViewCellStyle.Subtitle, Key) { // TODO: add subviews to the ContentView, set various colors, etc. TextLabel.Text=""; DetailTextLabel.Text=""; RowInTable = 0; EnableSwitch = new UISwitch (); EnableSwitch.Frame = new RectangleF ((float)Frame.Width - 70f, 5f, (float)EnableSwitch.Frame.X, (float)EnableSwitch.Frame.Y); EnableSwitch.On = false; EnableSwitch.ValueChanged += (s, e) => { SwitchChange(RowInTable,EnableSwitch.On); }; ContentView.Add(EnableSwitch); }
public RelationsScreenCell(SwitchChangeDelegate SwitchChange) : base(UITableViewCellStyle.Subtitle, Key) { // TODO: add subviews to the ContentView, set various colors, etc. TextLabel.Text=""; DetailTextLabel.Text=""; DetailTextLabel.TextColor = UIColor.LightGray; RowInTable = 0; EnableSwitch = new UISwitch (); EnableSwitch.On = false; EnableSwitch.BackgroundColor = BackgroundColor; EnableSwitch.ValueChanged += (s, e) => { SwitchChange(RowInTable,EnableSwitch.On); }; ContentView.Add(EnableSwitch); Rotate (); }
public ContactListScreenSource(List<MyPerson> ContactList,SwitchChangeDelegate SwitchChange,ContactType contactType) { this.ContactList=ContactList; this.SwitchChange = SwitchChange; this.contactType = contactType; }