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

📄 mobilereaderdataset.designer.cs

📁 用C#+SQLCE开发的RSS读取工具
💻 CS
字号:
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行库版本:2.0.50727.42
//
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------

namespace MobileReader.MobileReaderResultSets {
    using System;
    using System.Data;
    
    
    public partial class FeedResultSet : System.Data.SqlServerCe.SqlCeResultSet {
        
        private string resultSetConnectionString = null;
        
        private System.Data.SqlServerCe.SqlCeConnection sqlCeConnection = null;
        
        private System.Data.SqlServerCe.ResultSetOptions resultSetOptions;
        
        public FeedResultSet() {
            // Create default options
            // 
            resultSetOptions = System.Data.SqlServerCe.ResultSetOptions.Scrollable;
            resultSetOptions = (resultSetOptions | System.Data.SqlServerCe.ResultSetOptions.Sensitive);
            resultSetOptions = (resultSetOptions | System.Data.SqlServerCe.ResultSetOptions.Updatable);
            // To enable design time support, the resultSetConnectionString property needs to switched between a Designtime and Runtime connection string.
            // The design time connection string is used to make a valid connection to the database and retrieve schema information.
            // 
            if (MobileReaderDataSetUtil.DesignerUtil.IsDesignTime()) {
                // Designtime Connection String
                resultSetConnectionString = "Data Source =\"D:\\My Webcasts\\MobileReader\\MobileReader.sdf\"";
            }
            else {
                // Runtime Connection String
                resultSetConnectionString = ("Data Source =" 
                            + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\MobileReader.sdf;"));
            }
            // Call Open() to initialize the ResultSet
            // 
            this.Open();
        }
        
        public FeedResultSet(string connectionString, System.Data.SqlServerCe.ResultSetOptions options) {
            resultSetConnectionString = connectionString;
            resultSetOptions = options;
            this.Open();
        }
        
        public System.Data.SqlServerCe.SqlCeConnection Connection {
            get {
                return sqlCeConnection;
            }
        }
        
        public System.Guid FeedID {
            get {
                return ((System.Guid)(base.GetGuid(base.GetOrdinal("FeedID"))));
            }
            set {
                base.SetGuid(base.GetOrdinal("FeedID"), value);
            }
        }
        
        public string Url {
            get {
                try {
                    return ((string)(base.GetString(base.GetOrdinal("Url"))));
                }
                catch (System.InvalidCastException e) {
                    throw new System.Data.StrongTypingException("StrongTyping_CananotAccessDBNull", e);
                }
            }
            set {
                base.SetString(base.GetOrdinal("Url"), value);
            }
        }
        
        public string Title {
            get {
                try {
                    return ((string)(base.GetString(base.GetOrdinal("Title"))));
                }
                catch (System.InvalidCastException e) {
                    throw new System.Data.StrongTypingException("StrongTyping_CananotAccessDBNull", e);
                }
            }
            set {
                base.SetString(base.GetOrdinal("Title"), value);
            }
        }
        
        public void Open() {
            System.Data.SqlServerCe.SqlCeCommand sqlCeSelectCommand;
            // Open a connection to the database
            // 
            sqlCeConnection = new System.Data.SqlServerCe.SqlCeConnection(this.resultSetConnectionString);
            sqlCeConnection.Open();
            // Create the command
            // 
            sqlCeSelectCommand = sqlCeConnection.CreateCommand();
            sqlCeSelectCommand.CommandText = "Feed";
            sqlCeSelectCommand.CommandType = System.Data.CommandType.TableDirect;
            // Generate the ResultSet
            // 
            sqlCeSelectCommand.ExecuteResultSet(this.resultSetOptions, this);
        }
        
        public void MoveToRow(int Row) {
            base.ReadAbsolute(Row);
        }
        
        public void DeleteRecord() {
            base.Delete();
        }
        
        public bool IsUrlNull() {
            return base.IsDBNull(base.GetOrdinal("Url"));
        }
        
        public void SetUrlNull() {
            base.SetValue(base.GetOrdinal("Url"), System.DBNull.Value);
        }
        
        public bool IsTitleNull() {
            return base.IsDBNull(base.GetOrdinal("Title"));
        }
        
        public void SetTitleNull() {
            base.SetValue(base.GetOrdinal("Title"), System.DBNull.Value);
        }
        
        public void AddFeedRecord(System.Guid FeedID, string Url, string Title) {
            System.Data.SqlServerCe.SqlCeUpdatableRecord newRecord = base.CreateRecord();
            newRecord["FeedID"] = FeedID;
            newRecord["Url"] = Url;
            newRecord["Title"] = Title;
            base.Insert(newRecord);
        }
        
        public void Bind(System.Windows.Forms.BindingSource bindingSource) {
            bindingSource.DataSource = this.ResultSetView;
        }
    }
    
    public partial class ItemResultSet : System.Data.SqlServerCe.SqlCeResultSet {
        
        private string resultSetConnectionString = null;
        
        private System.Data.SqlServerCe.SqlCeConnection sqlCeConnection = null;
        
        private System.Data.SqlServerCe.ResultSetOptions resultSetOptions;
        
        public ItemResultSet() {
            // Create default options
            // 
            resultSetOptions = System.Data.SqlServerCe.ResultSetOptions.Scrollable;
            resultSetOptions = (resultSetOptions | System.Data.SqlServerCe.ResultSetOptions.Sensitive);
            resultSetOptions = (resultSetOptions | System.Data.SqlServerCe.ResultSetOptions.Updatable);
            // To enable design time support, the resultSetConnectionString property needs to switched between a Designtime and Runtime connection string.
            // The design time connection string is used to make a valid connection to the database and retrieve schema information.
            // 
            if (MobileReaderDataSetUtil.DesignerUtil.IsDesignTime()) {
                // Designtime Connection String
                resultSetConnectionString = "Data Source =\"D:\\My Webcasts\\MobileReader\\MobileReader.sdf\"";
            }
            else {
                // Runtime Connection String
                resultSetConnectionString = ("Data Source =" 
                            + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\MobileReader.sdf;"));
            }
            // Call Open() to initialize the ResultSet
            // 
            this.Open();
        }
        
        public ItemResultSet(string connectionString, System.Data.SqlServerCe.ResultSetOptions options) {
            resultSetConnectionString = connectionString;
            resultSetOptions = options;
            this.Open();
        }
        
        public System.Data.SqlServerCe.SqlCeConnection Connection {
            get {
                return sqlCeConnection;
            }
        }
        
        public System.Guid ItemID {
            get {
                return ((System.Guid)(base.GetGuid(base.GetOrdinal("ItemID"))));
            }
            set {
                base.SetGuid(base.GetOrdinal("ItemID"), value);
            }
        }
        
        public System.Guid FeedID {
            get {
                try {
                    return ((System.Guid)(base.GetGuid(base.GetOrdinal("FeedID"))));
                }
                catch (System.InvalidCastException e) {
                    throw new System.Data.StrongTypingException("StrongTyping_CananotAccessDBNull", e);
                }
            }
            set {
                base.SetGuid(base.GetOrdinal("FeedID"), value);
            }
        }
        
        public string Title {
            get {
                try {
                    return ((string)(base.GetString(base.GetOrdinal("Title"))));
                }
                catch (System.InvalidCastException e) {
                    throw new System.Data.StrongTypingException("StrongTyping_CananotAccessDBNull", e);
                }
            }
            set {
                base.SetString(base.GetOrdinal("Title"), value);
            }
        }
        
        public string Description {
            get {
                try {
                    return ((string)(base.GetString(base.GetOrdinal("Description"))));
                }
                catch (System.InvalidCastException e) {
                    throw new System.Data.StrongTypingException("StrongTyping_CananotAccessDBNull", e);
                }
            }
            set {
                base.SetString(base.GetOrdinal("Description"), value);
            }
        }
        
        public string Link {
            get {
                try {
                    return ((string)(base.GetString(base.GetOrdinal("Link"))));
                }
                catch (System.InvalidCastException e) {
                    throw new System.Data.StrongTypingException("StrongTyping_CananotAccessDBNull", e);
                }
            }
            set {
                base.SetString(base.GetOrdinal("Link"), value);
            }
        }
        
        public void Open() {
            System.Data.SqlServerCe.SqlCeCommand sqlCeSelectCommand;
            // Open a connection to the database
            // 
            sqlCeConnection = new System.Data.SqlServerCe.SqlCeConnection(this.resultSetConnectionString);
            sqlCeConnection.Open();
            // Create the command
            // 
            sqlCeSelectCommand = sqlCeConnection.CreateCommand();
            sqlCeSelectCommand.CommandText = "Item";
            sqlCeSelectCommand.CommandType = System.Data.CommandType.TableDirect;
            // Generate the ResultSet
            // 
            sqlCeSelectCommand.ExecuteResultSet(this.resultSetOptions, this);
        }
        
        public void MoveToRow(int Row) {
            base.ReadAbsolute(Row);
        }
        
        public void DeleteRecord() {
            base.Delete();
        }
        
        public bool IsFeedIDNull() {
            return base.IsDBNull(base.GetOrdinal("FeedID"));
        }
        
        public void SetFeedIDNull() {
            base.SetValue(base.GetOrdinal("FeedID"), System.DBNull.Value);
        }
        
        public bool IsTitleNull() {
            return base.IsDBNull(base.GetOrdinal("Title"));
        }
        
        public void SetTitleNull() {
            base.SetValue(base.GetOrdinal("Title"), System.DBNull.Value);
        }
        
        public bool IsDescriptionNull() {
            return base.IsDBNull(base.GetOrdinal("Description"));
        }
        
        public void SetDescriptionNull() {
            base.SetValue(base.GetOrdinal("Description"), System.DBNull.Value);
        }
        
        public bool IsLinkNull() {
            return base.IsDBNull(base.GetOrdinal("Link"));
        }
        
        public void SetLinkNull() {
            base.SetValue(base.GetOrdinal("Link"), System.DBNull.Value);
        }
        
        public void AddItemRecord(System.Guid ItemID, System.Guid FeedID, string Title, string Description, string Link) {
            System.Data.SqlServerCe.SqlCeUpdatableRecord newRecord = base.CreateRecord();
            newRecord["ItemID"] = ItemID;
            newRecord["FeedID"] = FeedID;
            newRecord["Title"] = Title;
            newRecord["Description"] = Description;
            newRecord["Link"] = Link;
            base.Insert(newRecord);
        }
        
        public void Bind(System.Windows.Forms.BindingSource bindingSource) {
            bindingSource.DataSource = this.ResultSetView;
        }
    }
}
namespace MobileReaderDataSetUtil {
    using System;
    using System.Data;
    
    
    public partial class DesignerUtil {
        
        public static bool IsDesignTime() {
            // Determine if this instance is running against .NET Framework by using the MSCoreLib PublicKeyToken
            System.Reflection.Assembly mscorlibAssembly = typeof(int).Assembly;
            if ((mscorlibAssembly != null)) {
                if (mscorlibAssembly.FullName.ToUpper().EndsWith("B77A5C561934E089")) {
                    return true;
                }
            }
            return false;
        }
        
        public static bool IsRunTime() {
            // Determine if this instance is running against .NET Compact Framework by using the MSCoreLib PublicKeyToken
            System.Reflection.Assembly mscorlibAssembly = typeof(int).Assembly;
            if ((mscorlibAssembly != null)) {
                if (mscorlibAssembly.FullName.ToUpper().EndsWith("969DB8053D3322AC")) {
                    return true;
                }
            }
            return false;
        }
    }
}

⌨️ 快捷键说明

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