📄 inteliimdataset.cs
字号:
public event MessageRowChangeEventHandler MessageRowChanged;
public event MessageRowChangeEventHandler MessageRowChanging;
public event MessageRowChangeEventHandler MessageRowDeleted;
public event MessageRowChangeEventHandler MessageRowDeleting;
public void AddMessageRow(MessageRow row) {
this.Rows.Add(row);
}
public MessageRow AddMessageRow(string Content, string To, bool Viewed) {
MessageRow rowMessageRow = ((MessageRow)(this.NewRow()));
rowMessageRow.ItemArray = new object[] {
Content,
null,
To,
Viewed};
this.Rows.Add(rowMessageRow);
return rowMessageRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
MessageDataTable cln = ((MessageDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new MessageDataTable();
}
internal void InitVars() {
this.columnContent = this.Columns["Content"];
this.columnId = this.Columns["Id"];
this.columnTo = this.Columns["To"];
this.columnViewed = this.Columns["Viewed"];
}
private void InitClass() {
this.columnContent = new DataColumn("Content", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnContent);
this.columnId = new DataColumn("Id", typeof(int), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnId);
this.columnTo = new DataColumn("To", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnTo);
this.columnViewed = new DataColumn("Viewed", typeof(bool), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnViewed);
this.columnId.AutoIncrement = true;
}
public MessageRow NewMessageRow() {
return ((MessageRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new MessageRow(builder);
}
protected override System.Type GetRowType() {
return typeof(MessageRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.MessageRowChanged != null)) {
this.MessageRowChanged(this, new MessageRowChangeEvent(((MessageRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.MessageRowChanging != null)) {
this.MessageRowChanging(this, new MessageRowChangeEvent(((MessageRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.MessageRowDeleted != null)) {
this.MessageRowDeleted(this, new MessageRowChangeEvent(((MessageRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.MessageRowDeleting != null)) {
this.MessageRowDeleting(this, new MessageRowChangeEvent(((MessageRow)(e.Row)), e.Action));
}
}
public void RemoveMessageRow(MessageRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class MessageRow : DataRow {
private MessageDataTable tableMessage;
internal MessageRow(DataRowBuilder rb) :
base(rb) {
this.tableMessage = ((MessageDataTable)(this.Table));
}
public string Content {
get {
try {
return ((string)(this[this.tableMessage.ContentColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableMessage.ContentColumn] = value;
}
}
public int Id {
get {
try {
return ((int)(this[this.tableMessage.IdColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableMessage.IdColumn] = value;
}
}
public string To {
get {
try {
return ((string)(this[this.tableMessage.ToColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableMessage.ToColumn] = value;
}
}
public bool Viewed {
get {
try {
return ((bool)(this[this.tableMessage.ViewedColumn]));
}
catch (InvalidCastException e) {
throw new StrongTypingException("无法获取值,因为它是 DBNull。", e);
}
}
set {
this[this.tableMessage.ViewedColumn] = value;
}
}
public bool IsContentNull() {
return this.IsNull(this.tableMessage.ContentColumn);
}
public void SetContentNull() {
this[this.tableMessage.ContentColumn] = System.Convert.DBNull;
}
public bool IsIdNull() {
return this.IsNull(this.tableMessage.IdColumn);
}
public void SetIdNull() {
this[this.tableMessage.IdColumn] = System.Convert.DBNull;
}
public bool IsToNull() {
return this.IsNull(this.tableMessage.ToColumn);
}
public void SetToNull() {
this[this.tableMessage.ToColumn] = System.Convert.DBNull;
}
public bool IsViewedNull() {
return this.IsNull(this.tableMessage.ViewedColumn);
}
public void SetViewedNull() {
this[this.tableMessage.ViewedColumn] = System.Convert.DBNull;
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class MessageRowChangeEvent : EventArgs {
private MessageRow eventRow;
private DataRowAction eventAction;
public MessageRowChangeEvent(MessageRow row, DataRowAction action) {
this.eventRow = row;
this.eventAction = action;
}
public MessageRow Row {
get {
return this.eventRow;
}
}
public DataRowAction Action {
get {
return this.eventAction;
}
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ContactGroupDataTable : DataTable, System.Collections.IEnumerable {
private DataColumn columnOwner;
private DataColumn columnData;
internal ContactGroupDataTable() :
base("ContactGroup") {
this.InitClass();
}
internal ContactGroupDataTable(DataTable table) :
base(table.TableName) {
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
this.CaseSensitive = table.CaseSensitive;
}
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
this.Locale = table.Locale;
}
if ((table.Namespace != table.DataSet.Namespace)) {
this.Namespace = table.Namespace;
}
this.Prefix = table.Prefix;
this.MinimumCapacity = table.MinimumCapacity;
this.DisplayExpression = table.DisplayExpression;
}
[System.ComponentModel.Browsable(false)]
public int Count {
get {
return this.Rows.Count;
}
}
internal DataColumn OwnerColumn {
get {
return this.columnOwner;
}
}
internal DataColumn DataColumn {
get {
return this.columnData;
}
}
public ContactGroupRow this[int index] {
get {
return ((ContactGroupRow)(this.Rows[index]));
}
}
public event ContactGroupRowChangeEventHandler ContactGroupRowChanged;
public event ContactGroupRowChangeEventHandler ContactGroupRowChanging;
public event ContactGroupRowChangeEventHandler ContactGroupRowDeleted;
public event ContactGroupRowChangeEventHandler ContactGroupRowDeleting;
public void AddContactGroupRow(ContactGroupRow row) {
this.Rows.Add(row);
}
public ContactGroupRow AddContactGroupRow(string Owner, string Data) {
ContactGroupRow rowContactGroupRow = ((ContactGroupRow)(this.NewRow()));
rowContactGroupRow.ItemArray = new object[] {
Owner,
Data};
this.Rows.Add(rowContactGroupRow);
return rowContactGroupRow;
}
public System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
public override DataTable Clone() {
ContactGroupDataTable cln = ((ContactGroupDataTable)(base.Clone()));
cln.InitVars();
return cln;
}
protected override DataTable CreateInstance() {
return new ContactGroupDataTable();
}
internal void InitVars() {
this.columnOwner = this.Columns["Owner"];
this.columnData = this.Columns["Data"];
}
private void InitClass() {
this.columnOwner = new DataColumn("Owner", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnOwner);
this.columnData = new DataColumn("Data", typeof(string), null, System.Data.MappingType.Element);
this.Columns.Add(this.columnData);
}
public ContactGroupRow NewContactGroupRow() {
return ((ContactGroupRow)(this.NewRow()));
}
protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
return new ContactGroupRow(builder);
}
protected override System.Type GetRowType() {
return typeof(ContactGroupRow);
}
protected override void OnRowChanged(DataRowChangeEventArgs e) {
base.OnRowChanged(e);
if ((this.ContactGroupRowChanged != null)) {
this.ContactGroupRowChanged(this, new ContactGroupRowChangeEvent(((ContactGroupRow)(e.Row)), e.Action));
}
}
protected override void OnRowChanging(DataRowChangeEventArgs e) {
base.OnRowChanging(e);
if ((this.ContactGroupRowChanging != null)) {
this.ContactGroupRowChanging(this, new ContactGroupRowChangeEvent(((ContactGroupRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleted(DataRowChangeEventArgs e) {
base.OnRowDeleted(e);
if ((this.ContactGroupRowDeleted != null)) {
this.ContactGroupRowDeleted(this, new ContactGroupRowChangeEvent(((ContactGroupRow)(e.Row)), e.Action));
}
}
protected override void OnRowDeleting(DataRowChangeEventArgs e) {
base.OnRowDeleting(e);
if ((this.ContactGroupRowDeleting != null)) {
this.ContactGroupRowDeleting(this, new ContactGroupRowChangeEvent(((ContactGroupRow)(e.Row)), e.Action));
}
}
public void RemoveContactGroupRow(ContactGroupRow row) {
this.Rows.Remove(row);
}
}
[System.Diagnostics.DebuggerStepThrough()]
public class ContactGroupRow : DataRow {
private ContactGroupDataTable tableContactGroup;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -