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


C# Enumerations类代码示例

本文整理汇总了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;
 }
开发者ID:randomgeekdom,项目名称:ForkTale,代码行数:7,代码来源:EnumerationAttribute.cs

示例2: ParameterChanged

 protected void ParameterChanged(Enumerations.ManipulationTypes ManipulationType)
 {
     if (DomainSharedModel.ImageManipulationItems.OnInitializeFilters == false)
     {
         DomainSharedModel.ImageManipulationItems.SaveFilter(this);
     }
 }
开发者ID:VictorHelios,项目名称:OpenCVBestPractice,代码行数:7,代码来源:ImageFilter.cs

示例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;
            }
        }
开发者ID:KingRider,项目名称:XrmToolBox,代码行数:36,代码来源:CodeControl.cs

示例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;
 }
开发者ID:vybeonllc,项目名称:dat_framework,代码行数:7,代码来源:RegularExpressionAttribute.cs

示例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);
         }
     }
 }
开发者ID:LexTheGreat,项目名称:EclipseSharp,代码行数:29,代码来源:Send.cs

示例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);
    }
开发者ID:SuperJura,项目名称:RPGGame,代码行数:32,代码来源:CreatePlayer.cs

示例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;
 }
开发者ID:gustt,项目名称:BananasBroadCast,代码行数:7,代码来源:UserContext.cs

示例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;
 }
开发者ID:vybeonllc,项目名称:dat_framework,代码行数:8,代码来源:SocialSecurityAttribute.cs

示例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;
        }
开发者ID:NORENBUCH,项目名称:XrmToolBox,代码行数:13,代码来源:ImageControl.cs

示例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);
 }
开发者ID:maorleger,项目名称:RepCRec,代码行数:17,代码来源:LockManagerTableEntry.cs

示例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;
 }
开发者ID:vybeonllc,项目名称:dat_framework,代码行数:9,代码来源:ZipCodeAttribute.cs

示例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();
        }
开发者ID:mohanmca,项目名称:WhatNEXT,代码行数:9,代码来源:SimpleTaskList.cs

示例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);
 }
开发者ID:dalinhuang,项目名称:myxx,代码行数:9,代码来源:bizSysInfo.cs

示例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));
 }
开发者ID:modulexcite,项目名称:dropthings,代码行数:9,代码来源:WidgetRepository.cs

示例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;
 }
开发者ID:maorleger,项目名称:RepCRec,代码行数:20,代码来源:Operation.cs


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