mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* MetaTable.cs: implemented Init - calls Init on all the columns present in this instance. * MetaModel.cs: constructor initializes FieldTemplateFactory after it is instantiated. RegisterContextCore first registers the context type, then creates tables and finally calls Init on all the tables. * MetaColumn.cs: added internal Init method - called by MetaModel after context is registered and all tables are created and registered. * MetaChildrenColumn.cs: implemented ChildTable, ColumnInOtherTable, GetChildrenListPath, GetChildrenPath and added an internal Init method override. MonoTODO attributes stay until I write tests for the class. * FieldTemplateUserControl.cs: implemented ChildrenColumn, ChildrenPath, Column, ForeignKeyColumn, ForeignKeyPath, MetadataAttributes, Mode, Row, Table, SetHost * FieldTemplateFactory.cs: GetFieldTemplateVirtualPath fixes * DynamicControl.cs: implemented ApplyFormatInEditMode, ConvertEmptyStringToNull, DataField, DataFormatString, HtmlEncode, FormattingOptions, NullDisplayText, UIHint, OnInit, Render. 2009-09-18 Marek Habersack <[email protected]> * TestsBasePage.cs: added an event ItemDataBinding, invoked whenever an item is data bound. 2009-09-18 Marek Habersack <[email protected]> * Makefile (TEST_RESOURCE_FILES): added Test/WebPages/ListView_DynamicControl_10.aspx, Test/WebPages/ListView_DynamicControl_10.aspx.cs 2009-09-18 Marek Habersack <[email protected]> * DynamicControlTest.cs: FieldTemplate_1 - fixed fake edit postback for Mono. svn path=/trunk/mcs/; revision=142161
63 lines
1.4 KiB
C#
63 lines
1.4 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Collections;
|
|
using System.Collections.Specialized;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
using System.Xml.Linq;
|
|
using System.Web.DynamicData;
|
|
|
|
using MonoTests.Common;
|
|
|
|
public partial class ChildrenField : PokerFieldTemplateUserControl {
|
|
private bool _allowNavigation = true;
|
|
private string _navigateUrl;
|
|
|
|
public string NavigateUrl {
|
|
get {
|
|
return _navigateUrl;
|
|
}
|
|
set {
|
|
_navigateUrl = value;
|
|
}
|
|
}
|
|
|
|
public bool AllowNavigation {
|
|
get {
|
|
return _allowNavigation;
|
|
}
|
|
set {
|
|
_allowNavigation = value;
|
|
}
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e) {
|
|
HyperLink1.Text = "View " + ChildrenColumn.ChildTable.DisplayName;
|
|
}
|
|
|
|
protected string GetChildrenPath() {
|
|
if (!AllowNavigation) {
|
|
return null;
|
|
}
|
|
|
|
if (String.IsNullOrEmpty(NavigateUrl)) {
|
|
return ChildrenPath;
|
|
}
|
|
else {
|
|
return BuildChildrenPath(NavigateUrl);
|
|
}
|
|
}
|
|
|
|
public override Control DataControl {
|
|
get {
|
|
return HyperLink1;
|
|
}
|
|
}
|
|
}
|