本文整理汇总了C#中ColumnTypes类的典型用法代码示例。如果您正苦于以下问题:C# ColumnTypes类的具体用法?C# ColumnTypes怎么用?C# ColumnTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ColumnTypes类属于命名空间,在下文中一共展示了ColumnTypes类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ColumnItem
public ColumnItem(string text, ColumnTypes controlType, object defaultValue, string categoryName)
{
Text = text;
ControlType = controlType;
DefaultValue = defaultValue;
CategoryName = categoryName;
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:7,代码来源:ColumnItem.cs
示例2: Column
/// <summary>
/// Initializes a new instance of the <see cref="Column" /> class.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="type">The type.</param>
/// <param name="null">if set to <c>true</c> [null].</param>
/// <param name="default">The default.</param>
public Column(string name, ColumnTypes type, bool @null, Default @default)
{
Name = name;
Type = type;
Default = @default;
Nullable = @null;
}
开发者ID:blehnen,项目名称:DotNetWorkQueue,代码行数:14,代码来源:Column.cs
示例3: GetColumnByType
public static AccountSettingsColumn GetColumnByType(this AccountSettings settings, ColumnTypes columnType)
{
#pragma warning disable 618
return settings.Columns
.FirstOrDefault(c => string.Compare(c.ColumnType.SystemName, columnType.ToString(), true) == 0);
#pragma warning restore 618
}
开发者ID:kblc,项目名称:Royalty,代码行数:7,代码来源:AccountSettings.cs
示例4: FieldDefinition
/// <summary>
/// Initializes a new instance of the <see cref="FieldDefinition"/> class.
/// </summary>
/// <param name="name">
/// The name.
/// </param>
/// <param name="type">
/// The type.
/// </param>
/// <param name="parentTable">
/// The parent table.
/// </param>
/// <param name="securityGuardValue">
/// The security guard value.
/// </param>
/// <param name="includeInResult">
/// if set to <c>true</c> [include in result].
/// </param>
/// <param name="isFilterable">
/// if set to <c>true</c> [is filterable].
/// </param>
/// <param name="nameValuesList">
/// The name values list.
/// </param>
/// <param name="isRichText">
/// if set to <c>true</c> [is rich text].
/// </param>
/// <param name="allowLocalizedData">
/// The allow localized data.
/// </param>
public FieldDefinition(string name, ColumnTypes type, TableDefinition parentTable, string securityGuardValue, bool includeInResult = true, bool isFilterable = true, Dictionary<string, object> nameValuesList = null, bool isRichText = false, bool allowLocalizedData = false)
{
this.SystemName = name;
this.ColumnType = type;
_parentTable = parentTable;
SecurityGuardValue = securityGuardValue;
IncludeInResult = includeInResult;
IsFilterable = isFilterable;
NameValuesList = nameValuesList;
IsRichText = isRichText;
AllowLocalizedData = allowLocalizedData;
}
开发者ID:mparsin,项目名称:Elements,代码行数:42,代码来源:FieldDefinition.cs
示例5: GetColumn
public static Column GetColumn(ColumnTypes columnType)
{
switch (columnType)
{
case ColumnTypes.DOWN:
return new DownColumn();
case ColumnTypes.UP:
return new UpColumn();
case ColumnTypes.FREE:
return new FreeColumn();
case ColumnTypes.ANNOUNCEMENT:
return new AnnouncementColumn();
default:
throw new YambException("");
}
}
开发者ID:Joop7,项目名称:yamb-game,代码行数:16,代码来源:ColumnFactory.cs
示例6: AreTypesCompatible
/// <summary>
/// Determines whether the specified question and answer types are compatible.
/// </summary>
/// <param name="questionType">
/// The question type.
/// </param>
/// <param name="answerType">
/// The answer type.
/// </param>
/// <returns>
/// <c>true</c> if the specified types are compatible; otherwise, <c>false</c>.
/// </returns>
public bool AreTypesCompatible(ColumnTypes questionType, ColumnTypes answerType)
{
switch (answerType)
{
case ColumnTypes.Integer:
return questionType == ColumnTypes.Integer || questionType == ColumnTypes.Reference;
case ColumnTypes.String:
return questionType == ColumnTypes.String || questionType == ColumnTypes.Frequency || questionType == ColumnTypes.AutoNumber || questionType == ColumnTypes.Label;
case ColumnTypes.Reference:
return questionType == ColumnTypes.Reference || questionType == ColumnTypes.Integer;
default:
return questionType == answerType;
}
}
开发者ID:mparsin,项目名称:Elements,代码行数:29,代码来源:ChecklistValidationHelper.cs
示例7: EnterDiceValue
public bool EnterDiceValue(IViewTableForm frmTableDisplay, IConfirmForm frmConfirm, ColumnTypes column, LayerTypes layer, FieldTypes field)
{
if (_currentDiceThrow == DiceThrow.FIRST && !_turnEnded)
{
frmTableDisplay.DisplayMsg(Color.Red, _msg[4]);
return false;
}
else
{
if (ValidEntering(frmConfirm, column))
{
try
{
YambTable.GetInstance().InputValue(column, layer, field, _diceRoller.Dices, _currentDiceThrow);
if (column == ColumnTypes.ANNOUNCEMENT)
{
AnnouncementActions(frmTableDisplay, field);
}
else
{
NextTurn();
frmTableDisplay.EndOfTurnActions();
}
if (YambTable.GetInstance().IsTableFull())
{
frmTableDisplay.GameFinished();
}
}
catch (YambException)
{
frmTableDisplay.DisplayMsg(Color.Red, _msg[5]);
return false;
}
}
else
{
return false;
}
}
return true;
}
开发者ID:Joop7,项目名称:yamb-game,代码行数:43,代码来源:Game.cs
示例8: MetricDefinition
/// <summary>
/// Initializes new instance of <see cref="T:Cebos.Veyron.Library.Process.Publisher.Definitions.MetricDefinition"/>.
/// </summary>
/// <param name="id">Metric's Id number.</param>
/// <param name="name">The name of the metric.</param>
/// <param name="guid">The <see cref="T:System.Guid"/> object that is used as unique identifier of the metric object.</param>
/// <param name="summaryType">Type of the summary.</param>
/// <param name="lockFilter">if set to <c>true</c> [lock filter].</param>
/// <param name="snapshotFrequency">The snapshot frequency.</param>
/// <param name="metricFieldSystemName">The system name of the field who's values used as metric measure.</param>
/// <param name="groupFieldOneSystemName">The system name of the field by which to group values.</param>
/// <param name="groupFieldTwoSystemName">The system name of the field by which to group values.</param>
/// <param name="groupFieldThreeSystemName">The system name of the field by which to group values.</param>
/// <param name="groupFieldFourSystemName">The system name of the field by which to group values.</param>
/// <param name="filterGuid">The unique identifier of the filter that used in metric.</param>
/// <param name="filterDefinition">The filter definition used to store overriden filter certainly filter with overriden UDP property.</param>
/// <param name="orderByMetricField">The system name of the field by which to sort values or value groups if any defined.</param>
/// <param name="orderByAscending">Whether to sorts values in ascending order.</param>
/// <param name="orderByMetricFieldType">The type of the field which is used as sort criteria.</param>
public MetricDefinition(
int id,
string name,
Guid guid,
SummaryTypes summaryType,
bool lockFilter,
string snapshotFrequency,
string metricFieldSystemName,
string groupFieldOneSystemName,
string groupFieldTwoSystemName,
string groupFieldThreeSystemName,
string groupFieldFourSystemName,
Guid filterGuid,
string filterDefinition,
string orderByMetricField,
bool? orderByAscending,
ColumnTypes orderByMetricFieldType)
{
Id = id;
Name = name;
Guid = guid;
SummaryType = summaryType;
LockFilter = lockFilter;
SnapshotFrequency = snapshotFrequency;
MetricFieldSystemName = metricFieldSystemName;
GroupFieldOneSystemName = groupFieldOneSystemName;
GroupFieldTwoSystemName = groupFieldTwoSystemName;
GroupFieldThreeSystemName = groupFieldThreeSystemName;
GroupFieldFourSystemName = groupFieldFourSystemName;
FilterGuid = filterGuid;
FilterDefinition = filterDefinition;
OrderByMetricField = orderByMetricField;
OrderByAscending = orderByAscending;
OrderByMetricFieldType = orderByMetricFieldType;
}
开发者ID:mparsin,项目名称:Elements,代码行数:56,代码来源:MetricDefinition.cs
示例9: GetLayerPointsByColumn
public int GetLayerPointsByColumn(ColumnTypes column, LayerTypes layer)
{
return Columns[column].GetLayerPoints(layer);
}
开发者ID:Joop7,项目名称:yamb-game,代码行数:4,代码来源:YambTable.cs
示例10: ColDef
protected ColumnDefinition ColDef(string name, ColumnTypes columnType, bool isPrimary)
{
return new ColumnDefinition() { Name = name, Type = columnType, IsPrimary = isPrimary };
}
开发者ID:NickyPerian,项目名称:Aurora,代码行数:4,代码来源:Migrator.cs
示例11: PropertyAttribute
public PropertyAttribute(ColumnTypes columnType)
{
this._columnType = columnType;
}
开发者ID:ben889,项目名称:BS.Components.Data,代码行数:4,代码来源:PropertyAttribute.cs
示例12: ExistColumn
protected abstract bool ExistColumn(string schema, string table, string column, ColumnTypes columnType);
开发者ID:whesius,项目名称:allors,代码行数:1,代码来源:SchemaTest.cs
示例13: GetLayerPointsByColumn
public int GetLayerPointsByColumn(ColumnTypes column, LayerTypes layer)
{
switch (column)
{
case ColumnTypes.DOWN:
return DownColumn.GetLayerPoints(layer);
case ColumnTypes.UP:
return UpColumn.GetLayerPoints(layer);
case ColumnTypes.FREE:
return FreeColumn.GetLayerPoints(layer);
case ColumnTypes.ANNOUNCEMENT:
return AnnouncementColumn.GetLayerPoints(layer);
default:
throw new YambException("");
}
}
开发者ID:Joop7,项目名称:yamb-game,代码行数:16,代码来源:Highscore.cs
示例14: ValidEntering
private bool ValidEntering(IConfirmForm frmConfirm, ColumnTypes column)
{
if (_currentDiceThrow == DiceThrow.FIRST && column == ColumnTypes.ANNOUNCEMENT)
{
return true;
}
else
{
string msg = GetMessage(column);
return frmConfirm.ShowMsg(msg);
}
}
开发者ID:Joop7,项目名称:yamb-game,代码行数:12,代码来源:Game.cs
示例15: AddField
private static void AddField(Collection<ICrossRefFieldViewModel> collection, ColumnTypes columnType = ColumnTypes.String)
{
var field = Mock.Create<ICrossRefFieldViewModel>();
Mock.Arrange(() => field.SystemName).Returns(Guid.NewGuid().ToString());
Mock.Arrange(() => field.Model.ColumnType).Returns(columnType);
collection.Add(field);
}
开发者ID:mparsin,项目名称:Elements,代码行数:7,代码来源:ProcessFieldCrossRefRequiredStepViewModelTests.cs
示例16: GetColumnTypeStringSymbol
public override string GetColumnTypeStringSymbol(ColumnTypes type)
{
switch (type)
{
case ColumnTypes.Double:
return "DOUBLE";
case ColumnTypes.Integer11:
return "INT(11)";
case ColumnTypes.Integer30:
return "INT(30)";
case ColumnTypes.UInteger11:
return "INT(11) UNSIGNED";
case ColumnTypes.UInteger30:
return "INT(30) UNSIGNED";
case ColumnTypes.Char40:
return "CHAR(40)";
case ColumnTypes.Char39:
return "CHAR(39)";
case ColumnTypes.Char38:
return "CHAR(38)";
case ColumnTypes.Char37:
return "CHAR(37)";
case ColumnTypes.Char36:
return "CHAR(36)";
case ColumnTypes.Char35:
return "CHAR(35)";
case ColumnTypes.Char34:
return "CHAR(34)";
case ColumnTypes.Char33:
return "CHAR(33)";
case ColumnTypes.Char32:
return "CHAR(32)";
case ColumnTypes.Char5:
return "CHAR(5)";
case ColumnTypes.Char1:
return "CHAR(1)";
case ColumnTypes.Char2:
return "CHAR(2)";
case ColumnTypes.String:
return "TEXT";
case ColumnTypes.String10:
return "VARCHAR(10)";
case ColumnTypes.String16:
return "VARCHAR(16)";
case ColumnTypes.String30:
return "VARCHAR(30)";
case ColumnTypes.String32:
return "VARCHAR(32)";
case ColumnTypes.String36:
return "VARCHAR(36)";
case ColumnTypes.String45:
return "VARCHAR(45)";
case ColumnTypes.String50:
return "VARCHAR(50)";
case ColumnTypes.String64:
return "VARCHAR(64)";
case ColumnTypes.String128:
return "VARCHAR(128)";
case ColumnTypes.String100:
return "VARCHAR(100)";
case ColumnTypes.String255:
return "VARCHAR(255)";
case ColumnTypes.String512:
return "VARCHAR(512)";
case ColumnTypes.String1024:
return "VARCHAR(1024)";
case ColumnTypes.String8196:
return "VARCHAR(8196)";
case ColumnTypes.Text:
return "TEXT";
case ColumnTypes.MediumText:
return "MEDIUMTEXT";
case ColumnTypes.LongText:
return "LONGTEXT";
case ColumnTypes.Blob:
return "BLOB";
case ColumnTypes.LongBlob:
return "LONGBLOB";
case ColumnTypes.Date:
return "DATE";
case ColumnTypes.DateTime:
return "DATETIME";
case ColumnTypes.Float:
return "FLOAT";
case ColumnTypes.TinyInt1:
return "TINYINT(1)";
case ColumnTypes.TinyInt4:
return "TINYINT(4)";
case ColumnTypes.UTinyInt4:
return "TINYINT(4) UNSIGNED";
case ColumnTypes.Binary32:
return "BINARY(32)";
case ColumnTypes.Binary64:
return "BINARY(64)";
default:
throw new DataManagerException("Unknown column type.");
}
}
开发者ID:BillBarnhill,项目名称:WhiteCore-Dev,代码行数:98,代码来源:MySQLDataManager.cs
示例17: GetColumnFor
public static AccountSettingsColumn GetColumnFor(this AccountSettings settings, ColumnTypes type)
{
return settings.Columns.FirstOrDefault(c => c.ColumnType.Type == type);
}
开发者ID:kblc,项目名称:Royalty,代码行数:4,代码来源:AccountSettingsExtensions.cs
示例18: GetColumnTypeStringSymbol
public abstract string GetColumnTypeStringSymbol(ColumnTypes type);
开发者ID:Gnu32,项目名称:Silverfin,代码行数:1,代码来源:DataManagerBase.cs
示例19: ExistColumn
public bool ExistColumn(string schema, string table, string column, ColumnTypes columnType)
{
using (var connection = new SQLiteConnection(this.ConnectionString))
{
connection.Open();
using (var command = connection.CreateCommand())
{
var cmdText = @"
pragma table_info(" + table + ")";
command.CommandText = cmdText;
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
var name = ((string)reader["name"]).Trim().ToLowerInvariant();
var type = ((string)reader["type"]).Trim().ToLowerInvariant();
if (name.Equals(column.Trim().ToLowerInvariant()))
{
switch (columnType)
{
case ColumnTypes.ObjectId:
return "integer".Equals(type);
case ColumnTypes.TypeId:
return "blob".Equals(type);
case ColumnTypes.CacheId:
return "integer".Equals(type);
case ColumnTypes.Binary:
return "blob".Equals(type);
case ColumnTypes.Boolean:
return "integer".Equals(type);
case ColumnTypes.Decimal:
return "text".Equals(type);
case ColumnTypes.Float:
return "real".Equals(type);
case ColumnTypes.Integer:
return "integer".Equals(type);
case ColumnTypes.String:
return "text".Equals(type);
case ColumnTypes.Unique:
return "text".Equals(type);
}
return true;
}
}
}
return false;
}
}
}
开发者ID:whesius,项目名称:allors,代码行数:53,代码来源:Profile.cs
示例20: Match
protected abstract bool Match(ColumnTypes columnType, string dataType);
开发者ID:whesius,项目名称:allors,代码行数:1,代码来源:Profile.cs
注:本文中的ColumnTypes类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论