Ejemplo n.º 1
0
		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);
		}
Ejemplo n.º 2
0
 public TableRows(ICollection rowElements, IActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory)
 {
     foreach (AutomationElement automationElement in rowElements)
     {
         Add(new TableRow(automationElement, actionListener, tableHeader, tableCellFactory));
     }
 }
Ejemplo n.º 3
0
		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;
		}
Ejemplo n.º 4
0
 public TableRow(AutomationElement automationElement, ActionListener actionListener, TableHeader tableHeader, TableCellFactory tableCellFactory)
     : base(automationElement, actionListener)
 {
     this.tableHeader      = tableHeader;
     this.tableCellFactory = tableCellFactory;
 }
Ejemplo n.º 5
0
		public ViewSource(DialogViewController controller) : base(controller)
		{
			CellFactory = new TableCellFactory<UITableViewCell>("cell");
		}