protected override void Dispose(bool disposing) { if (disposing) { Controller = null; if (CellFactory != null) { CellFactory.Dispose(); CellFactory = null; } foreach(var section in Sections.Values) { var disposable = section as IDisposable; if (disposable != null) { disposable.Dispose(); disposable = null; } } } base.Dispose(disposing); }
public TableRows(ICollection rowElements, IActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory) { foreach (AutomationElement automationElement in rowElements) { Add(new TableRow(automationElement, actionListener, tableHeader, tableCellFactory)); } }
public ListSource(DialogViewController controller, IList list, IEnumerable<Type> viewTypes) : base(controller) { Sections = new Dictionary<int, Section>(); var section = new Section(controller) { DataContext = list }; IList<Type> viewTypesList = null; if (viewTypes != null) viewTypesList = viewTypes.ToList(); var genericType = list.GetType().GetGenericArguments().FirstOrDefault(); CellId = new NSString(genericType.ToString()); section.ViewTypes.Add(CellId, viewTypesList); Sections.Add(0, section); SelectedItems = list.GetType().CreateGenericListFromEnumerable(null); CellFactory = new TableCellFactory<UITableViewCell>(CellId); //SelectionDisplayMode = SelectionDisplayMode.Collapsed; //CollapsedList = new List<object>(); // foreach(var item in Sections[0].DataContext) // { // CollapsedList.Add(item); // } // Sections[0].DataContext.Clear(); // //IsCollapsed = true; }
public TableRow(AutomationElement automationElement, ActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory) : base(automationElement, actionListener) { this.tableHeader = tableHeader; this.tableCellFactory = tableCellFactory; }
public ViewSource(DialogViewController controller) : base(controller) { CellFactory = new TableCellFactory<UITableViewCell>("cell"); }