本文整理汇总了C#中Enumerations类的典型用法代码示例。如果您正苦于以下问题:C# Enumerations类的具体用法?C# Enumerations怎么用?C# Enumerations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Enumerations类属于命名空间,在下文中一共展示了Enumerations类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EnumerationAttribute
public EnumerationAttribute(string name, Enumerations enumerations, string selectedEnumeration, bool canBeNull)
{
Name = name;
Enumerations = enumerations;
SelectedEnumeration = selectedEnumeration;
CanBeNull = canBeNull;
}
示例2: ParameterChanged
protected void ParameterChanged(Enumerations.ManipulationTypes ManipulationType)
{
if (DomainSharedModel.ImageManipulationItems.OnInitializeFilters == false)
{
DomainSharedModel.ImageManipulationItems.SaveFilter(this);
}
}
示例3: CodeControl
/// <summary>
/// Initializes a new instance of class CodeControl
/// </summary>
/// <param name="content">Base64 content of the web resource</param>
/// <param name="type">Web resource type</param>
public CodeControl(string content, Enumerations.WebResourceType type)
{
InitializeComponent();
textEditor = new TextEditor
{
ShowLineNumbers = true,
FontSize = 12,
FontFamily = new System.Windows.Media.FontFamily("Consolas"),
//Focusable = true,
//IsHitTestVisible = true
};
var wpfHost = new ElementHost
{
Child = textEditor,
Dock = DockStyle.Fill,
BackColorTransparent = true,
};
Controls.Add(wpfHost);
if (!string.IsNullOrEmpty(content))
{
// Converts base64 content to string
byte[] b = Convert.FromBase64String(content);
innerContent = System.Text.Encoding.UTF8.GetString(b);
originalContent = innerContent;
innerType = type;
}
}
示例4: RegularExpressionAttribute
public RegularExpressionAttribute(string friendlyName, string pattern, System.Text.RegularExpressions.RegexOptions options, bool escapeCharacters, Enumerations.Action action = Enumerations.Action.All)
: base(friendlyName, action)
{
Pattern = pattern;
Options = options;
EscapeCharacters = escapeCharacters;
}
示例5: ChatMessage
public static void ChatMessage(Int32 id, Int32 sender, String msg, Enumerations.MessageType type)
{
if (Data.TempPlayers.ContainsKey(sender) && Data.Players.ContainsKey(sender)) {
using (var buffer = new DataBuffer()) {
buffer.WriteInt32((Int32)Packets.Server.ChatMessage);
buffer.WriteByte((Byte)type);
if (Data.TempPlayers[sender].InGame) {
switch (type) {
case Enumerations.MessageType.System:
buffer.WriteString(String.Format("<SYSTEM> {0}", msg));
break;
case Enumerations.MessageType.Error:
buffer.WriteString(String.Format("<ERROR> {0}", msg));
break;
case Enumerations.MessageType.World:
buffer.WriteString(String.Format("[W] {0}: {1}", Data.Players[sender].Characters[Data.TempPlayers[sender].CurrentCharacter].Name, msg));
break;
case Enumerations.MessageType.Map:
buffer.WriteString(String.Format("[S] {0}: {1}", Data.Players[sender].Characters[Data.TempPlayers[sender].CurrentCharacter].Name, msg));
break;
case Enumerations.MessageType.Emote:
buffer.WriteString(String.Format("{0} {1}", Data.Players[sender].Characters[Data.TempPlayers[sender].CurrentCharacter].Name, msg));
break;
}
}
SendDataTo(id, buffer);
}
}
}
示例6: CreateWarrior
private static Player CreateWarrior(Player newPlayer, string playerName, Enumerations.Gender M_F)
{
newPlayer.PlayerName = playerName;
newPlayer.CharClass = Enumerations.CharClass.Warrior;
newPlayer.Class = new WarriorClass();
newPlayer.Gender = M_F;
newPlayer.IDPlayer = GetLastPlayerID();
newPlayer.PhysicalDMG = 15;
newPlayer.MagicDMG = 5;
newPlayer.MoveSpeed = 20;
newPlayer.JumpForce = 5;
newPlayer.PhysDMGMultiplication = 1;
newPlayer.MagicDMGMultiplication = 1;
newPlayer.CurrentSceneName = "LEVEL_1";
newPlayer.PosX = 179.5f;
newPlayer.PosY = 5.6f;
newPlayer.PosZ = 10.3f;
newPlayer.MaxHealth = 110;
newPlayer.CurrentHealth = 110;
newPlayer.MaxMana = 80;
newPlayer.CurrentMana = 80;
newPlayer.PlayerLvl = 1;
newPlayer.Experience = 550; //ZA DEBUG
newPlayer.PathToSave = Application.dataPath + "\\Saves\\" + newPlayer.PlayerName + "_" + newPlayer.IDPlayer + ".save";
return SerializePlayerToDat(newPlayer);
}
示例7: UserContext
public UserContext(string _nomeusuario, string _userid, Enumerations.TipoPerfil _tipoPerfil, string _computador)
{
this.NomeUsuario = _nomeusuario;
this.UserID = _userid;
this.TipoPerfil = _tipoPerfil;
this.NomeComputador = _computador;
}
示例8: SocialSecurityAttribute
public SocialSecurityAttribute(string friendlyName, bool isClearNumber, Enumerations.Action action = Enumerations.Action.All)
: base(friendlyName, Constants.RegularExpressionPatterns.SocialSecurity, System.Text.RegularExpressions.RegexOptions.None, false, action)
{
if (isClearNumber)
Pattern = Constants.RegularExpressionPatterns.SocialSecurity_Clear;
else
Pattern = Constants.RegularExpressionPatterns.SocialSecurity;
}
示例9: ImageControl
/// <summary>
/// Initializes a new instance of class ImageControl
/// </summary>
/// <param name="content">Base64 content of the web resource</param>
/// <param name="type">Web resource type</param>
public ImageControl(string content, Enumerations.WebResourceType type)
{
InitializeComponent();
innerType = type;
originalContent = content;
innerContent = content;
}
示例10: AddToActiveLocks
/// <summary>
/// Date: 10/16/2011
/// Adds a lock on behalf of a transaction to the active locks.
/// </summary>
/// <param name = "transactionId">The transaction id.</param>
/// <param name = "operationMode">The operation mode.</param>
/// <remarks>
/// Side effects: the new lock is added to the table entry
/// </remarks>
public void AddToActiveLocks(int transactionId, Enumerations.OperationMode operationMode)
{
Lock lockToAdd = new Lock(transactionId, operationMode);
Lock result =
ActiveLocks.Find(matching => matching.TransactionId == transactionId && matching.Mode == operationMode);
if (result == null)
ActiveLocks.Add(lockToAdd);
}
示例11: ZipCodeAttribute
public ZipCodeAttribute(string friendlyName, bool isClear, Enumerations.Action action = Enumerations.Action.All)
: base(friendlyName, Constants.RegularExpressionPatterns.ZipCode, System.Text.RegularExpressions.RegexOptions.None, false, action)
{
IsClear = isClear;
if (IsClear)
Pattern = Constants.RegularExpressionPatterns.ZipCode_Clear;
else
Pattern = Constants.RegularExpressionPatterns.ZipCode;
}
示例12: ExportTask
public byte[] ExportTask(List<TaskItem> taskItems, Enumerations.ContentType contentType)
{
var xmlSerializer = new XmlSerializer(typeof(List<TaskItem>));
MemoryStream memoryStream = new MemoryStream();
xmlSerializer.Serialize(memoryStream, taskItems);
return memoryStream.GetBuffer();
}
示例13: Mod
public void Mod(Enumerations.SysInfoType sysInfoType, string content)
{
SysInfo model = Get(sysInfoType);
model.Attach();
model.Content = content;
model.ModTime = DateTime.Now;
model.Detach();
Update(model);
}
示例14: GetAllWidgets
public List<Widget> GetAllWidgets(Enumerations.WidgetType widgetType)
{
return this.GetAllWidgets().Where(w => w.WidgetType == (int)widgetType).ToList();
//return AspectF.Define
// .CacheList<Widget, List<Widget>>(_cacheResolver, CacheKeys.WidgetKeys.WidgetsByType((int)widgetType),
// w => CacheKeys.WidgetKeys.Widget(w.ID))
// .Return<List<Widget>>(() =>
// _database.GetList<Widget, Enumerations.WidgetTypeEnum>(widgetType, CompiledQueries.WidgetQueries.GetAllWidgets_ByWidgetType));
}
示例15: Operation
/// <summary>
/// 10/17/2011
/// Initializes a new instance of the <see cref = "Operation" /> class.
/// </summary>
/// <param name = "mode">The operation mode.</param>
/// <param name = "transId">The ID of the transaction on whose behalf the operation is created</param>
/// <param name = "dataId">The index of the data item the operation operates on (or a sentinel value in case its a begin/commit/abort op)</param>
/// <param name = "newValue">The new value to write in case the operation is a write op.</param>
/// <param name = "ro">Whether the transaction issuing the operation is a read only transaction - used for MVCC</param>
/// <param name = "ts">The timestamp of the operation.</param>
public Operation(Enumerations.OperationMode mode, int transId, int dataId = -1, int newValue = -1,
bool ro = false, int ts = 0)
{
opMode = mode;
transactionNumber = transId;
dataItem = dataId;
this.newValue = newValue;
readOnly = ro;
timeStamp = ts;
}