当前位置: 首页>>代码示例>>C#>>正文


C# ColumnType类代码示例

本文整理汇总了C#中ColumnType的典型用法代码示例。如果您正苦于以下问题:C# ColumnType类的具体用法?C# ColumnType怎么用?C# ColumnType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ColumnType类属于命名空间,在下文中一共展示了ColumnType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetNativeSqlType

        public override string GetNativeSqlType(ColumnType type)
        {
            switch (type)
            {
                case ColumnType.ID:
                    return "integer primary key autoincrement";

                case ColumnType.ForeignKey:
                case ColumnType.Integer:
                    return "integer";

                case ColumnType.String:
                    return "text";

                case ColumnType.Bool:
                    return "bool";

                case ColumnType.Timestamp:
                    return "timestamp";

                case ColumnType.Date:
                    return "date";

                case ColumnType.Double:
                    return "double";

                default:
                    return null;
            }
        }
开发者ID:zippy1981,项目名称:GTools,代码行数:30,代码来源:Database.cs

示例2: Format_DBNullValue_NullDisplay

 public void Format_DBNullValue_NullDisplay(ColumnType columnType)
 {
     var factory = new CellFormatterFactory();
     var formatter = factory.GetObject(columnType);
     var text = formatter.Format(DBNull.Value);
     Assert.That(text, Is.EqualTo("(null)"));
 }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:7,代码来源:CellFormatterTest.cs

示例3: ColumnSchema

 /// <summary>
 /// Explicit constructor for a foreign key
 /// </summary>
 /// <param name="name">Name of the column</param>
 /// <param name="type">Type of the column</param>
 public ColumnSchema(string name, ColumnType type, string tableName, string columnName, string comment)
 {
     Name = name;
     Type = type;
     Reference = string.Format("{0}.{1}", tableName, columnName);
     Comment = comment;
 }
开发者ID:k4gdw,项目名称:GSharpTools,代码行数:12,代码来源:ColumnSchema.cs

示例4: Column

 /// <summary>
 /// Initializes a new instance of the <see cref="Column" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="title">The title.</param>
 /// <param name="type">The type.</param>
 /// <param name="pk">if set to <c>true</c> the column is a primary key.</param>
 public Column(string name, string title = null, ColumnType type = ColumnType.Text, bool pk = false)
 {
     this.Name = name;
     this.Title = (title == null) ? name : title;
     this.Type = type;
     this.PrimaryKey = pk;
 }
开发者ID:wwwiiilll,项目名称:CRUDTable,代码行数:14,代码来源:Column.cs

示例5: ColumnTypeToString

 public static string ColumnTypeToString(ColumnType ct)
 {
     switch (ct){
         case ColumnType.Boolean:
             return "C";
         case ColumnType.Categorical:
             return "C";
         case ColumnType.Color:
             return "C";
         case ColumnType.DateTime:
             return "T";
         case ColumnType.DashStyle:
             return "C";
         case ColumnType.Integer:
             return "N";
         case ColumnType.MultiInteger:
             return "M";
         case ColumnType.MultiNumeric:
             return "M";
         case ColumnType.Numeric:
             return "N";
         case ColumnType.Text:
             return "T";
         default:
             return "T";
     }
 }
开发者ID:JurgenCox,项目名称:compbio-base,代码行数:27,代码来源:TableModelImpl.cs

示例6: ColumnMappingField

 public ColumnMappingField(FieldInfo field, ColumnAttribute attribute)
 {
     this._Field = field;
     this._ColumnName = string.IsNullOrEmpty(attribute.ColumnName) ? field.Name : attribute.ColumnName;
     this._ColumnType = attribute.ColumnType;
     this._ColumnId = attribute.ColumnId;
 }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:7,代码来源:ColumnMappingField.cs

示例7: FilterIncrementallyWith

		/// <summary>
		/// Filter items in ImageListView incrementally. 
		/// This method optimizes on-the-fly filtering as user types in a search box.
		/// </summary>
		/// <param name="key">An item is visible only if it contains this string</param>
		private void FilterIncrementallyWith(string key, ColumnType attrType)
		{
			if (key.Length == mLastSearch.Length) return;

			if (mVisibleItems == null)
			{
				mVisibleItems = new LinkedList<ImageListViewItem>(mItems);
				mInvisibleItems = new LinkedList<ImageListViewItem>();
			}
			if (key.Length > mLastSearch.Length)
			{
				ToggleMatchedItems(mVisibleItems, mInvisibleItems, false, key, attrType);
			}
			else if (key.Length < mLastSearch.Length)
			{
				ToggleMatchedItems(mInvisibleItems, mVisibleItems, true, key, attrType);
			}
			mImageListView.Items.Clear(false);
			mImageListView.SuspendLayout();
			foreach (ImageListViewItem item in mVisibleItems)
			{
				mImageListView.Items.Add(item, mAdaptor);
			}
			mImageListView.ResumeLayout();
			mLastSearch = key;
		}
开发者ID:ericpony,项目名称:comic-gallery,代码行数:31,代码来源:ImageListViewFilter.cs

示例8: TableInfo

 public TableInfo(string name, string primaryKeyName, ColumnType? primaryKeyType, short? primaryKeySize)
 {
     Name = name;
       PrimaryKeyName = primaryKeyName;
       PrimaryKeyType = primaryKeyType;
       PrimaryKeySize = primaryKeySize;
 }
开发者ID:simonlaroche,项目名称:machine,代码行数:7,代码来源:TableInfo.cs

示例9: Create

        public static ColumnParser Create(ColumnType type, string format)
        {
            switch (type)
            {
                case ColumnType.Logger:
                    return new LoggerParser();

                case ColumnType.Level:
                    return new LevelParser();

                case ColumnType.Timestamp:
                    return new TimestampParser(format);

                case ColumnType.Thread:
                    return new ThreadParser();

                case ColumnType.Line:
                    return new LineParser();

                case ColumnType.Newline:
                    return new NewlineParser();

                case ColumnType.Message:
                    return new MessageParser();

                case ColumnType.Date:
                    return new DateParser(format, DateTimeKind.Local);

                case ColumnType.UtcDate:
                    return new DateParser(format, DateTimeKind.Utc);

                default:
                    throw new KeyNotFoundException(string.Format("Unable to find a parser for '{0}'", type));
            }
        }
开发者ID:Kittyfisto,项目名称:Tailviewer,代码行数:35,代码来源:ColumnParser.cs

示例10: ColumnData

 public ColumnData(String name, ColumnType type, String comparison, String method)
 {
     Name = name;
     Type = type;
     Comparison = comparison;
     TimingMethod = method;
 }
开发者ID:Gyoo,项目名称:LiveSplit.Splits,代码行数:7,代码来源:ColumnData.cs

示例11: AddColumn

 public void AddColumn(string colName, int width, ColumnType columnType, string description, bool persistent)
 {
     AddColumn(colName, width, columnType, description);
     if (persistent){
         AddPersistentColumn(colName, width, columnType, description, null);
     }
 }
开发者ID:JurgenCox,项目名称:compbio-base,代码行数:7,代码来源:VirtualDataTable2.cs

示例12: ValuedExpression

 public ValuedExpression(string expression, object value, ColumnType type, string tolerance)
     : base(expression)
 {
     Value = value;
     Type = type;
     Tolerance = tolerance;
 }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:7,代码来源:ValuedExpression.cs

示例13: FilterWith

		/// <summary>
		/// Filter out items in ImageListView according to given criterion.
		/// </summary>
		/// <param name="key">An item is visible only if it contains this string</param>
		internal void FilterWith(string key, ColumnType attrType)
		{
			if (mItems == null)
			{
				throw new InvalidOperationException("Method Snapshot() should be called before the first search.");
			}
			mImageListView.Items.Clear(false);
			if (key.Length == 0) // reset items
			{
				mImageListView.Items.AddRange(mItems, mAdaptor);
			}
			else
			{
				string uKey = key.ToUpperInvariant();
				mImageListView.SuspendLayout();
				foreach (ImageListViewItem item in mItems)
				{
					Boolean isMatched = false;
					switch (attrType)
					{
						case ColumnType.Name:
							isMatched = item.Text.Contains(uKey); break;
						default:
							throw new NotImplementedException();
					}
					if (isMatched) mImageListView.Items.Add(item, mAdaptor);
				}
				mImageListView.ResumeLayout();
			}
			mLastSearch = key;
		}
开发者ID:ericpony,项目名称:comic-gallery,代码行数:35,代码来源:ImageListViewFilter.cs

示例14: ColumnDefinition

 /// <summary>
 ///     The column definition.
 /// </summary>
 /// <param name="theName">The name of the column.</param>
 /// <param name="theDataType">The type of the column.</param>
 public ColumnDefinition(String theName, ColumnType theDataType)
 {
     Name = theName;
     DataType = theDataType;
     Count = -1;
     Low = High = Mean = Sd = Double.NaN;
 }
开发者ID:johannsutherland,项目名称:encog-dotnet-core,代码行数:12,代码来源:ColumnDefinition.cs

示例15: ColumnMappingProperty

 public ColumnMappingProperty(PropertyInfo Property, ColumnAttribute attribute)
 {
     this._Property = Property;
     this._ColumnName = string.IsNullOrEmpty(attribute.ColumnName) ? Property.Name : attribute.ColumnName;
     this._ColumnType = attribute.ColumnType;
     this._ColumnId = attribute.ColumnId;
 }
开发者ID:marcosalm,项目名称:Jetfuel-CSharp,代码行数:7,代码来源:ColumnMappingProperty.cs


注:本文中的ColumnType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。