本文整理汇总了C#中DataTypes类的典型用法代码示例。如果您正苦于以下问题:C# DataTypes类的具体用法?C# DataTypes怎么用?C# DataTypes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataTypes类属于命名空间,在下文中一共展示了DataTypes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例4: EhrExtractContent
public EhrExtractContent(string archetypeNodeId, DataTypes.Text.DvText name)
: base(archetypeNodeId, name)
{
// TODO: implement SetAttributeDictionary and CheckInvariant overrides
SetAttributeDictionary();
CheckInvariants();
}
示例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
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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>();
}
示例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();
}