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

C# KeyType类代码示例

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

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



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

示例1: TryGetKeyInput

        /// <summary>
        /// Try and get the KeyInput which corresponds to the given Key and modifiers
        /// TODO: really think about this method
        /// </summary>
        internal bool TryGetKeyInput(Key key, ModifierKeys modifierKeys, out KeyInput keyInput)
        {
            // First just check and see if there is a direct mapping
            var keyType = new KeyType(key, modifierKeys);
            if (_cache.TryGetValue(keyType, out keyInput))
            {
                return true;
            }

            // Next consider only the shift key part of the requested modifier.  We can
            // re-apply the original modifiers later
            keyType = new KeyType(key, modifierKeys & ModifierKeys.Shift);
            if (_cache.TryGetValue(keyType, out keyInput))
            {
                // Reapply the modifiers
                keyInput = KeyInputUtil.ChangeKeyModifiers(keyInput, ConvertToKeyModifiers(modifierKeys));
                return true;
            }

            // Last consider it without any modifiers and reapply
            keyType = new KeyType(key, ModifierKeys.None);
            if (_cache.TryGetValue(keyType, out keyInput))
            {
                // Reapply the modifiers
                keyInput = KeyInputUtil.ChangeKeyModifiers(keyInput, ConvertToKeyModifiers(modifierKeys));
                return true;
            }

            return false;
        }
开发者ID:praveennet,项目名称:VsVim,代码行数:34,代码来源:KeyboardMap.cs


示例2: KeySequence

    public KeySequence(string name, KeyType[] keys, Element prim, Element sec) {
    	this.name = name;
        _keys = keys;
        Primary = prim;
        Secondary = sec;

    }
开发者ID:shingokko,项目名称:combocannon,代码行数:7,代码来源:KeySequence.cs


示例3: EntityKey

 public EntityKey(string value, KeyType type)
 {
     if (value == null) throw new ArgumentNullException("key");
     _value = value;
     _hashedValue = EntityBuilder.Fnv1Hash(_value);
     _type = type;
 }
开发者ID:nagyist,项目名称:wpfrealtime,代码行数:7,代码来源:EntityKey.cs


示例4: RainbowFolder

 public RainbowFolder(KeyType type, string key, Texture2D smallIcon, Texture2D largeIcon)
 {
     Type = type;
     Key = key;
     SmallIcon = smallIcon;
     LargeIcon = largeIcon;
 }
开发者ID:PhannGor,项目名称:unity3d-rainbow-folders,代码行数:7,代码来源:RainbowFolder.cs


示例5: Key

 public Key(double time, double value, KeyType inFunction, BaseTweenType baseTweenType)
 {
     Time = time;
     Value = value;
     InFunction = inFunction;
     BaseTweenType = baseTweenType;
 }
开发者ID:bluephoton,项目名称:wwt-windows-client,代码行数:7,代码来源:Key.cs


示例6: OnKeyEvent

 /// <inheritdoc/>>
 public bool OnKeyEvent(IWebBrowser browserControl, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey)
 {
     bool result = false;
     Debug.WriteLine(String.Format("OnKeyEvent: KeyType: {0} 0x{1:X} Modifiers: {2}", type, windowsKeyCode, modifiers));
     // TODO: Handle MessageNeeded cases here somehow.
     return result;
 }
开发者ID:klkn,项目名称:CefSharp,代码行数:8,代码来源:KeyboardHandler.cs


示例7: KeyEventArgs

 public KeyEventArgs(int scanCode, KeyType type, int value, int timeStamp)
 {
     ScanCode = scanCode;
     Type = type;
     Value = value;
     TimeStamp = timeStamp;
 }
开发者ID:nico-izo,项目名称:KOIB,代码行数:7,代码来源:KeyEventArgs.cs


示例8: Retrieve

		public static byte[] Retrieve (KeyType kt)
		{
			string key = null;
			
			switch (kt) {
				case KeyType.Validation:
					key = keyValidation;
					break;

				case KeyType.Encryption:
					key = keyEncryption;
					break;

				default:
					throw new ArgumentException ("Unknown key type.");
			}

			if (key == null)
				return null;
			
			object o = null;

			try {
				RegistryKey v = OpenRegistryKey (key, false);
				o = v.GetValue ("AutoGenKey", null);
			} catch (Exception) {
				return null;
			}

			if (o == null || o.GetType () != typeof (byte[]))
				return null;
			return (byte[]) o;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:33,代码来源:MachineKeyRegistryStorage.cs


示例9: KeyActionConfig

	public KeyActionConfig(KeyType type, int order, Action down, Action up)
	{
		Category = type;
        Order = order;
		KeyDownAction = down;
		KeyUpAction = up;
	}
开发者ID:RomainVivier,项目名称:Unity-KeyBinder,代码行数:7,代码来源:ActionConfig.cs


示例10: AddIconByKeyType

    public void AddIconByKeyType(KeyType keyType)
    {
        GameObject prefab = null;

        switch (keyType)
        {
            case KeyType.A:
                prefab = plantIcon;
                break;
            case KeyType.B:
                prefab = boneIcon;
                break;
            case KeyType.C:
                prefab = mineralIcon;
                break;
            case KeyType.D:
                prefab = fluidIcon;
                break;
        }

        if (prefab != null)
        {
            // set prefab position
            prefab.transform.position = new Vector3
            (
                transform.position.x + (_icons.Count - 1),
                transform.position.y,
                transform.position.z + (_icons.Count - 1)
            );
            
            GameObject newIcon = Instantiate(prefab);
            _icons.Add(newIcon);
        }
    }
开发者ID:shingokko,项目名称:combocannon,代码行数:34,代码来源:CannonContentsDisplay.cs


示例11: ArrowComponent

 public ArrowComponent(GameObject parent)
     : base(parent)
 {
     arrowKey = ArrowType.None;
     keyTimer = 0;
     keyPressed = KeyType.None;
 }
开发者ID:patpaquette,项目名称:SSB-clone,代码行数:7,代码来源:ArrowComponent.cs


示例12: ProtocolKeyAttribute

 public ProtocolKeyAttribute(string name, string defaultValue, KeyUsagePhase phase, KeySender sender, KeyType type)
 {
     _name = name;
     _default = defaultValue;
     _phase = phase;
     _sender = sender;
     _type = type;
 }
开发者ID:marinehero,项目名称:ThinkAway.net,代码行数:8,代码来源:ProtocolKeyAttribute.cs


示例13: KeyInfo

		public KeyInfo( Key key )
		{
			m_KeyVal = key.KeyValue;
			m_Description = key.Description;
			m_MaxRange = key.MaxRange;
			m_Link = key.Link;
			m_Type = (KeyType)key.ItemID;
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:8,代码来源:KeyRing.cs


示例14: Key

 /// <summary>
 /// Initializes a new instance of the <see cref="Key"/> class.
 /// </summary>
 public Key(char key)
 {
     keyType = KeyType.RegularKey;
     character = key;
     control = false;
     alt = false;
     shift = char.IsUpper(key);
 }
开发者ID:hj1980,项目名称:Mosa,代码行数:11,代码来源:Key.cs


示例15: GetKey

 static int GetKey(KeyType keyType, ushort length, byte dec)
 {
     var result = 0;
     result |= (int)keyType << 24;
     result |= (int)dec << 16;
     result |= length;
     return result;
 }
开发者ID:jishida,项目名称:BtrieveWrapper,代码行数:8,代码来源:ConverterDictionary.cs


示例16: OnPreKeyEvent

        public bool OnPreKeyEvent(IWebBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey, bool isKeyboardShortcut)
        {
            bool block = false;
            if (KeyCommand != null)
                block = KeyCommand(this, windowsKeyCode);

            return block;
        }
开发者ID:chances,项目名称:Animatum,代码行数:8,代码来源:ChromiumBrowserHandlers.cs


示例17: Key

 /// <summary>
 /// Initializes a new instance of the <see cref="Key"/> class.
 /// </summary>
 public Key()
 {
     keyType = KeyType.NoKey;
     character = (char)0x00;
     control = false;
     alt = false;
     shift = false;
 }
开发者ID:54616E6E6572,项目名称:Mosa,代码行数:11,代码来源:Key.cs


示例18: OnPreKeyEvent

 public bool OnPreKeyEvent(IWebBrowser browserControl, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode,
     CefEventFlags modifiers, bool isSystemKey, ref bool isKeyboardShortcut)
 {
     if (windowsKeyCode == (int)Keys.F12)
     {
         Program.Form.ChromiumBrowser.ShowDevTools();
     }
     return false;
 }
开发者ID:quyenbc,项目名称:ServiceStackVS,代码行数:9,代码来源:NativeHost.cs


示例19: Key

        public Key( KeyType type, uint LockVal, Item link )
            : base((int)type)
        {
            Weight = 1.0;

            m_MaxRange = 3;
            m_KeyVal = LockVal;
            m_Link = link;
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:9,代码来源:Key.cs


示例20: waiting

 private static void waiting(KeyType type)
 {
     keySemaphore = KeyType.NOTHING;
     do
     {
             Thread.Sleep(200);
     } while(keySemaphore != type);
     keySemaphore = KeyType.NOTHING;
 }
开发者ID:SergeyStaroletov,项目名称:Patterns14,代码行数:9,代码来源:ATM_Mainform.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# KeyValue类代码示例发布时间:2022-05-24
下一篇:
C# KeyRange类代码示例发布时间: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