• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Enumerations类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Enumerations的典型用法代码示例。如果您正苦于以下问题:C# Enumerations类的具体用法?C# Enumerations怎么用?C# Enumerations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Enumerations类属于命名空间,在下文中一共展示了Enumerations类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: AddCharacter

 public static void AddCharacter(String name, Int32 pclass, Enumerations.Gender gender)
 {
     using (var buffer = new DataBuffer()) {
         buffer.WriteInt32((Int32)Packets.Client.AddCharacter);
         buffer.WriteString(name);
         buffer.WriteInt32(pclass);
         buffer.WriteByte((Byte)gender);
         SendData(buffer);
     }
 }
开发者ID:LexTheGreat,项目名称:EclipseSharp,代码行数:10,代码来源:Send.cs


示例17: ChatMessageWorld

 public static void ChatMessageWorld(Int32 sender, String msg, Enumerations.MessageType type)
 {
     for (var i = 0; i < Data.Players.Count; i++) {
         if (Data.Players.ContainsKey(Data.Players.ElementAt(i).Key)) {
             var key = Data.Players.ElementAt(i).Key;
             if (Data.TempPlayers.ContainsKey(key)) {
                 if (Data.TempPlayers[key].InGame) Send.ChatMessage(key, sender, msg, type);
             }
         }
     }
 }
开发者ID:LexTheGreat,项目名称:EclipseSharp,代码行数:11,代码来源:Send.cs


示例18: GetWidgetList

 public List<Widget> GetWidgetList(string username, Enumerations.WidgetType widgetType)
 {            
     var userGuid = this.GetUserGuidFromUserName(username);
     var userRoles = this.userRepository.GetRolesOfUser(userGuid);
     var widgets = this.widgetRepository.GetAllWidgets(widgetType);
     if (userRoles.Count > 0)
         return widgets.Where(w => this.widgetsInRolesRepository.GetWidgetsInRolesByWidgetId(w.ID)
             .Exists(wr => userRoles.Exists(role => role.RoleId == wr.AspNetRole.RoleId))).ToList();
     else
         return widgets;
 }
开发者ID:modulexcite,项目名称:dropthings,代码行数:11,代码来源:Facade.Widget.cs


示例19: GetAbilitys

 public List<Ability> GetAbilitys(Enumerations.CharClass charClass, int level)
 {
     switch (charClass)
     {
         case Enumerations.CharClass.Warrior:
             return allWarriorAbilitys[level];
         case Enumerations.CharClass.Mage:
             return allMageAbilitys[level];
         default:
             return null;
     }
 }
开发者ID:SuperJura,项目名称:RPGGame,代码行数:12,代码来源:CodeAbilityDatabase.cs


示例20: Kill

 public static void Kill(Enumerations.Events.Kills enumCase)
 {
     switch (Manage.CurrentAnnouncer)
     {
         case Enumerations.SoundPacks.Portal2:
             Portal2.Kills(enumCase);
             break;
         case Enumerations.SoundPacks.StanlyParable:
             StanleyParable.Kills(enumCase);
             break;
     }
 }
开发者ID:MaddoPls,项目名称:Leaguesharp,代码行数:12,代码来源:PlayAbstractingLayer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Enums类代码示例发布时间:2022-05-24
下一篇:
C# Enumeration类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap