⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 workflow1.cs

📁 ASP.NET+VML开发的工作流图软件
💻 CS
📖 第 1 页 / 共 2 页
字号:
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.573
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

namespace VML.WorkFlow {
    using System;
    using System.Data;
    using System.Xml;
    using System.Runtime.Serialization;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Diagnostics.DebuggerStepThrough()]
    [System.ComponentModel.ToolboxItem(true)]
    public class WorkFlow : DataSet {
        
        private WorkFlowItemDataTable tableWorkFlowItem;
        
        private RelationDataTable tableRelation;
        
        public WorkFlow() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected WorkFlow(SerializationInfo info, StreamingContext context) {
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((strSchema != null)) {
                DataSet ds = new DataSet();
                ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["WorkFlowItem"] != null)) {
                    this.Tables.Add(new WorkFlowItemDataTable(ds.Tables["WorkFlowItem"]));
                }
                if ((ds.Tables["Relation"] != null)) {
                    this.Tables.Add(new RelationDataTable(ds.Tables["Relation"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.InitClass();
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public WorkFlowItemDataTable WorkFlowItem {
            get {
                return this.tableWorkFlowItem;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public RelationDataTable Relation {
            get {
                return this.tableRelation;
            }
        }
        
        public override DataSet Clone() {
            WorkFlow cln = ((WorkFlow)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(XmlReader reader) {
            this.Reset();
            DataSet ds = new DataSet();
            ds.ReadXml(reader);
            if ((ds.Tables["WorkFlowItem"] != null)) {
                this.Tables.Add(new WorkFlowItemDataTable(ds.Tables["WorkFlowItem"]));
            }
            if ((ds.Tables["Relation"] != null)) {
                this.Tables.Add(new RelationDataTable(ds.Tables["Relation"]));
            }
            this.DataSetName = ds.DataSetName;
            this.Prefix = ds.Prefix;
            this.Namespace = ds.Namespace;
            this.Locale = ds.Locale;
            this.CaseSensitive = ds.CaseSensitive;
            this.EnforceConstraints = ds.EnforceConstraints;
            this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
            this.InitVars();
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.tableWorkFlowItem = ((WorkFlowItemDataTable)(this.Tables["WorkFlowItem"]));
            if ((this.tableWorkFlowItem != null)) {
                this.tableWorkFlowItem.InitVars();
            }
            this.tableRelation = ((RelationDataTable)(this.Tables["Relation"]));
            if ((this.tableRelation != null)) {
                this.tableRelation.InitVars();
            }
        }
        
        private void InitClass() {
            this.DataSetName = "WorkFlow";
            this.Prefix = "";
            this.Namespace = "";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = true;
            this.tableWorkFlowItem = new WorkFlowItemDataTable();
            this.Tables.Add(this.tableWorkFlowItem);
            this.tableRelation = new RelationDataTable();
            this.Tables.Add(this.tableRelation);
        }
        
        private bool ShouldSerializeWorkFlowItem() {
            return false;
        }
        
        private bool ShouldSerializeRelation() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void WorkFlowItemRowChangeEventHandler(object sender, WorkFlowItemRowChangeEvent e);
        
        public delegate void RelationRowChangeEventHandler(object sender, RelationRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class WorkFlowItemDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnItemID;
            
            private DataColumn columnName;
            
            private DataColumn columnPosX;
            
            private DataColumn columnPosY;
            
            private DataColumn columnLimiteDate;
            
            private DataColumn columnisStart;
            
            internal WorkFlowItemDataTable() : 
                    base("WorkFlowItem") {
                this.InitClass();
            }
            
            internal WorkFlowItemDataTable(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 ItemIDColumn {
                get {
                    return this.columnItemID;
                }
            }
            
            internal DataColumn NameColumn {
                get {
                    return this.columnName;
                }
            }
            
            internal DataColumn PosXColumn {
                get {
                    return this.columnPosX;
                }
            }
            
            internal DataColumn PosYColumn {
                get {
                    return this.columnPosY;
                }
            }
            
            internal DataColumn LimiteDateColumn {
                get {
                    return this.columnLimiteDate;
                }
            }
            
            internal DataColumn isStartColumn {
                get {
                    return this.columnisStart;
                }
            }
            
            public WorkFlowItemRow this[int index] {
                get {
                    return ((WorkFlowItemRow)(this.Rows[index]));
                }
            }
            
            public event WorkFlowItemRowChangeEventHandler WorkFlowItemRowChanged;
            
            public event WorkFlowItemRowChangeEventHandler WorkFlowItemRowChanging;
            
            public event WorkFlowItemRowChangeEventHandler WorkFlowItemRowDeleted;
            
            public event WorkFlowItemRowChangeEventHandler WorkFlowItemRowDeleting;
            
            public void AddWorkFlowItemRow(WorkFlowItemRow row) {
                this.Rows.Add(row);
            }
            
            public WorkFlowItemRow AddWorkFlowItemRow(int ItemID, string Name, string PosX, string PosY, string LimiteDate, string isStart) {
                WorkFlowItemRow rowWorkFlowItemRow = ((WorkFlowItemRow)(this.NewRow()));
                rowWorkFlowItemRow.ItemArray = new object[] {
                        ItemID,
                        Name,
                        PosX,
                        PosY,
                        LimiteDate,
                        isStart};
                this.Rows.Add(rowWorkFlowItemRow);
                return rowWorkFlowItemRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                WorkFlowItemDataTable cln = ((WorkFlowItemDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new WorkFlowItemDataTable();
            }
            
            internal void InitVars() {
                this.columnItemID = this.Columns["ItemID"];
                this.columnName = this.Columns["Name"];
                this.columnPosX = this.Columns["PosX"];
                this.columnPosY = this.Columns["PosY"];
                this.columnLimiteDate = this.Columns["LimiteDate"];
                this.columnisStart = this.Columns["isStart"];
            }
            
            private void InitClass() {
                this.columnItemID = new DataColumn("ItemID", typeof(int), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnItemID);
                this.columnName = new DataColumn("Name", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnName);
                this.columnPosX = new DataColumn("PosX", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPosX);
                this.columnPosY = new DataColumn("PosY", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnPosY);
                this.columnLimiteDate = new DataColumn("LimiteDate", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnLimiteDate);
                this.columnisStart = new DataColumn("isStart", typeof(string), null, System.Data.MappingType.Element);
                this.Columns.Add(this.columnisStart);
                this.columnItemID.AllowDBNull = false;
                this.columnPosX.DefaultValue = "0";
                this.columnPosY.DefaultValue = "0";
            }
            
            public WorkFlowItemRow NewWorkFlowItemRow() {
                return ((WorkFlowItemRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new WorkFlowItemRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(WorkFlowItemRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.WorkFlowItemRowChanged != null)) {
                    this.WorkFlowItemRowChanged(this, new WorkFlowItemRowChangeEvent(((WorkFlowItemRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.WorkFlowItemRowChanging != null)) {
                    this.WorkFlowItemRowChanging(this, new WorkFlowItemRowChangeEvent(((WorkFlowItemRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.WorkFlowItemRowDeleted != null)) {
                    this.WorkFlowItemRowDeleted(this, new WorkFlowItemRowChangeEvent(((WorkFlowItemRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.WorkFlowItemRowDeleting != null)) {
                    this.WorkFlowItemRowDeleting(this, new WorkFlowItemRowChangeEvent(((WorkFlowItemRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveWorkFlowItemRow(WorkFlowItemRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class WorkFlowItemRow : DataRow {
            
            private WorkFlowItemDataTable tableWorkFlowItem;
            
            internal WorkFlowItemRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableWorkFlowItem = ((WorkFlowItemDataTable)(this.Table));
            }
            
            public int ItemID {
                get {
                    return ((int)(this[this.tableWorkFlowItem.ItemIDColumn]));
                }
                set {
                    this[this.tableWorkFlowItem.ItemIDColumn] = value;
                }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -