本文整理汇总了C#中DataTypes类的典型用法代码示例。如果您正苦于以下问题:C# DataTypes类的具体用法?C# DataTypes怎么用?C# DataTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataTypes类属于命名空间,在下文中一共展示了DataTypes类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HandleVariableExcluded
private bool HandleVariableExcluded(DataTypes.Variables.VariableSave variable, DataTypes.RecursiveVariableFinder rvf)
{
string rootName = variable.GetRootName();
bool shouldExclude = false;
if (rootName == "Texture Top" || rootName == "Texture Left")
{
var addressMode = rvf.GetValue<TextureAddress>("Texture Address");
shouldExclude = addressMode == TextureAddress.EntireTexture;
}
if (rootName == "Texture Width" || rootName == "Texture Height")
{
var addressMode = rvf.GetValue<TextureAddress>("Texture Address");
shouldExclude = addressMode == TextureAddress.EntireTexture ||
addressMode == TextureAddress.DimensionsBased;
}
if (rootName == "Texture Width Scale" || rootName == "Texture Height Scale")
{
var addressMode = rvf.GetValue<TextureAddress>("Texture Address");
shouldExclude = addressMode == TextureAddress.EntireTexture ||
addressMode == TextureAddress.Custom;
}
return shouldExclude;
}
开发者ID:jiailiuyan,项目名称:Gum,代码行数:31,代码来源:SpritePropertyGridVariableExcluder.cs
示例2: OnLogTableCreated
private static void OnLogTableCreated(object sender, DataTypes.EventHandling.LogTableCreationEventArg e)
{
var p = e.Params;
m_LogTables[e.Id] = new Table(p.TableName, (Logger.DBAccess.Enums.GameSubTypeEnum)Enum.Parse(typeof(Logger.DBAccess.Enums.GameSubTypeEnum), p.Variant.ToString()), p.MinPlayersToStart, p.MaxPlayers, (Logger.DBAccess.Enums.BlindTypeEnum)Enum.Parse(typeof(Logger.DBAccess.Enums.BlindTypeEnum), p.Blind.ToString()), (Logger.DBAccess.Enums.LobbyTypeEnum)Enum.Parse(typeof(Logger.DBAccess.Enums.LobbyTypeEnum), p.Lobby.OptionType.ToString()), (Logger.DBAccess.Enums.LimitTypeEnum)Enum.Parse(typeof(Logger.DBAccess.Enums.LimitTypeEnum), p.Limit.ToString()), m_LogServer);
m_LogTables[e.Id].RegisterTable();
m_LogGamesStatus[e.Id] = false;
}
开发者ID:NLK511,项目名称:BluffinMuffin.Server,代码行数:7,代码来源:DbCommandLogger.cs
示例3: CreateAndAddInstanceFromClipboard
private static object CreateAndAddInstanceFromClipboard(string instanceType, DataTypes.ArrowElementSave currentArrowElement, string xmlSerializedString)
{
object newObject = null;
if (instanceType == typeof(AxisAlignedRectangleSave).Name)
{
AxisAlignedRectangleSave aars = FileManager.XmlDeserializeFromString<AxisAlignedRectangleSave>(
xmlSerializedString);
currentArrowElement.Rectangles.Add(aars);
newObject = aars;
}
else if (instanceType == typeof(CircleSave).Name)
{
CircleSave circleSave = FileManager.XmlDeserializeFromString<CircleSave>(
xmlSerializedString);
currentArrowElement.Circles.Add(circleSave);
newObject = circleSave;
}
else if (instanceType == typeof(SpriteSave).Name)
{
SpriteSave spriteSave = FileManager.XmlDeserializeFromString<SpriteSave>(
xmlSerializedString);
currentArrowElement.Sprites.Add(spriteSave);
newObject = spriteSave;
}
return newObject;
}
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:35,代码来源:CopyPasteCommands.cs
示例4: EhrExtractContent
public EhrExtractContent(string archetypeNodeId, DataTypes.Text.DvText name)
: base(archetypeNodeId, name)
{
// TODO: implement SetAttributeDictionary and CheckInvariant overrides
SetAttributeDictionary();
CheckInvariants();
}
开发者ID:nickvane,项目名称:OpenEHR,代码行数:7,代码来源:EhrExtractContent.cs
示例5: Rmessage
public Rmessage(Byte data)
{
Type = DataTypes.BYTESTREAM;//setting type (Bitstream) in object field
content = new Byte[8]; //create array with message and header of parameter
content[0] = 5; //setting type (Bitstream)
content[1] = 1; //setting length (1 byte)
content[4] = data; //copying data to send
}
开发者ID:0xbrock,项目名称:RserveLink,代码行数:8,代码来源:Rmessage.cs
示例6: ImpactScienceData
public ImpactScienceData(DataTypes dataType, float energy, String biome, double latitude, float amount, float xmitValue, float labBoost, String id, String dataname, bool triggered, uint flightID)
: base(amount, xmitValue, labBoost, id, dataname, triggered, flightID)
{
this.datatype = dataType;
kineticEnergy = energy;
this.biome = biome;
this.latitude = latitude;
}
开发者ID:Kerbas-ad-astra,项目名称:kerbal-impact,代码行数:8,代码来源:ImpactScienceData.cs
示例7: Musician
public Musician(DataTypes.MusicianData md, ContentManager cm, SpriteBatch sb)
{
texture = cm.Load<Texture2D>(md.Texture);
map = cm.Load<Dictionary<string, Rectangle>>(md.SpriteMap).Values.ToArray();
position = md.Position;
frameRate = md.FrameRate;
spriteBatch = sb;
}
开发者ID:calebperkins,项目名称:Ensembler,代码行数:8,代码来源:Musician.cs
示例8: ImageSet
public ImageSet(ImageCollection collection, int index, DataTypes type, object dataObject)
: this(collection, index)
{
this.DataType = type;
this.DataObject = dataObject;
this.Status = Statues.None;
}
开发者ID:RyuaNerin,项目名称:QIT,代码行数:8,代码来源:ImageSet.cs
示例9: GetBytes
internal static byte[] GetBytes(int size, DataTypes[] types, object[] data)
{
byte[] bytes = new byte[size];
int currentPlace = 0;
for (int i = 0; i < types.Length; ++i)
{
switch (types[i])
{
case DataTypes.Bool:
BitConverter.GetBytes((bool)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.DateTime:
BitConverter.GetBytes(((DateTime)data[i]).ToBinary()).CopyTo(bytes, currentPlace);
break;
case DataTypes.Byte:
bytes[currentPlace] = (byte)data[i];
break;
case DataTypes.Short:
BitConverter.GetBytes((short)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.UShort:
BitConverter.GetBytes((ushort)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.Int:
BitConverter.GetBytes((int)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.UInt:
BitConverter.GetBytes((uint)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.Long:
BitConverter.GetBytes((long)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.ULong:
BitConverter.GetBytes((ulong)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.Float:
BitConverter.GetBytes((float)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.Double:
BitConverter.GetBytes((double)data[i]).CopyTo(bytes, currentPlace);
break;
case DataTypes.Name:
string s = ((string)data[i]).PadRight(16);
encode.GetBytes(s).CopyTo(bytes, currentPlace);
break;
case DataTypes.Message:
string st = ((string)data[i]).PadRight(64);
encode.GetBytes(st).CopyTo(bytes, currentPlace);
break;
}
currentPlace += GetSize(types[i]);
}
return bytes;
}
开发者ID:MinedroidFTW,项目名称:MineFrog,代码行数:57,代码来源:Database.cs
示例10: inputCorrect
// INPUT CORRECT
// This method checks that the player's input corresponds to the expected input -
// That they are in the right place and that they are pressing the right thing.
public bool inputCorrect(DataTypes.InputType input)
{
if (stateMachine.CurrentNode == stateMachine.PlayerNode &&
(input.ToString() == stateMachine.PlayerEdge.NextNodeType.ToString() ||
((input.ToString()=="HIT" || input.ToString()=="SNARE"))||
stateMachine.CurrentEdge.NextNodeType.ToString()=="ROLL")){
return true;
} else return false;
}
开发者ID:AlexMaskill,项目名称:DissertationGame,代码行数:12,代码来源:InputManager.cs
示例11: OnLogGameCreated
private static void OnLogGameCreated(object sender, DataTypes.EventHandling.LogGameEventArg e)
{
if (m_LogGamesStatus[e.Id])
return;
m_LogGamesStatus[e.Id] = true;
m_LogGames[e.Id] = new Game(m_LogTables[e.Id]);
m_LogGames[e.Id].RegisterGame();
}
开发者ID:NLK511,项目名称:BluffinMuffin.Server,代码行数:9,代码来源:DbCommandLogger.cs
示例12: AuditDetails
public AuditDetails(string systemId, DataTypes.Text.DvCodedText changeType)
: this()
{
DesignByContract.Check.Require(!string.IsNullOrEmpty(systemId), "systemId must not be null or empty");
DesignByContract.Check.Require(changeType != null, "changeType must not be null");
this.systemId = systemId;
this.timeCommitted = new OpenEhr.RM.DataTypes.Quantity.DateTime.DvDateTime();
this.changeType = changeType;
}
开发者ID:nickvane,项目名称:OpenEHR,代码行数:10,代码来源:AuditDetails.cs
示例13: FeederAudit
public FeederAudit(FeederAuditDetails originatingSystemAudit,
AssumedTypes.List<DataTypes.Basic.DvIdentifier> originatingSystemItemIds,
DataTypes.Encapsulated.DvEncapsulated originalContent)
: this()
{
Check.Require(originatingSystemAudit != null);
this.originatingSystemAudit = originatingSystemAudit;
this.originatingSystemItemIds = originatingSystemItemIds;
this.originalContent = originalContent;
}
开发者ID:nickvane,项目名称:OpenEHR,代码行数:10,代码来源:FeederAudit.cs
示例14: Tile
/// <summary>
/// Constructs a new tile
/// </summary>
/// <param name="position">Initial position of the tile</param>
/// <param name="texture">Texture content to render</param>
/// <param name="collision">Collision type used for collision resolution</param>
public Tile(Vector2 position, Texture2D texture, DataTypes.CollisionType collision)
{
colliding = false;
this.position = position;
prevPosition = position;
this.texture = texture;
this.collisionType = collision;
this.forces = new List<Vector2>();
this.impulses = new List<Vector2>();
}
开发者ID:michaelrush,项目名称:SliderPlatformer,代码行数:16,代码来源:Tile.cs
示例15: StateMachine
public StateMachine(DataTypes.BitmapUnsafe bitmap, List<State> states)
{
_bitmap = bitmap;
_states = states;
startx = rand.Next(0, bitmap.Width);
starty = rand.Next(0, bitmap.Height);
startstate = states[rand.Next(0, states.Count)];
Reset();
}
开发者ID:felayga,项目名称:TuringRand,代码行数:11,代码来源:StateMachine.cs
示例16: Table
int rowSize; //Number of bytes in each row
#endregion Fields
#region Constructors
internal Table(string _path, DataTypes[] types, int size)
{
path = _path;
dataTypes = types;
rowSize = size;
if (!File.Exists(path))
File.Create(path);
GetRowCount();
}
开发者ID:MinedroidFTW,项目名称:MineFrog,代码行数:17,代码来源:Table.cs
示例17: Link
public Link(DataTypes.Text.DvText meaning, DataTypes.Text.DvText type,
DataTypes.Uri.DvEhrUri target)
: this()
{
Check.Require(meaning != null && type != null && target != null);
this.meaning = meaning;
this.type = type;
this.target = target;
CheckInvariants();
}
开发者ID:nickvane,项目名称:OpenEHR,代码行数:11,代码来源:Link.cs
示例18: FeederAuditDetails
/// <summary>
/// constructor
/// </summary>
/// <param name="systemId"></param>
/// <param name="location"></param>
/// <param name="provider"></param>
/// <param name="subject"></param>
/// <param name="time"></param>
/// <param name="versionId"></param>
public FeederAuditDetails(string systemId, Common.Generic.PartyIdentified location,
Common.Generic.PartyIdentified provider, Common.Generic.PartyProxy subject,
DataTypes.Quantity.DateTime.DvDateTime time, string versionId)
: this()
{
this.systemId = systemId;
this.location = location;
this.provider = provider;
this.subject = subject;
this.time = time;
this.versionId = versionId;
}
开发者ID:nickvane,项目名称:OpenEHR,代码行数:21,代码来源:FeederAuditDetails.cs
示例19: ExtractLocatable
protected ExtractLocatable(string archetypeNodeId, DataTypes.Text.DvText name)
: this()
{
Check.Require(!string.IsNullOrEmpty(archetypeNodeId), "archetype node id must not be null or empty");
this.archetypeNodeId = archetypeNodeId;
Check.Require(name != null, "name must not be null");
Check.Require(!string.IsNullOrEmpty(name.Value), "name value must not be null or empty");
this.name = name;
Check.Invariant(attributesDictionary != null, "Attributes diction must not be null");
}
开发者ID:nickvane,项目名称:OpenEHR,代码行数:12,代码来源:ExtractLocatable.cs
示例20: GenerateCSharpSignature
public void GenerateCSharpSignature(DataTypes types, LrpStream stream)
{
if (this.Direction == ParameterDirection.InOut)
{
stream.Write("ref ");
}
else if (this.Direction == ParameterDirection.Out)
{
stream.Write("out ");
}
stream.Write("{0} {1}", types.ToCSharpFullName(this.Type), this.Name);
}
开发者ID:ifzz,项目名称:FDK,代码行数:12,代码来源:Parameter.cs
注:本文中的DataTypes类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论