Beispiel #1
0
        void keyboardHook_KeyPress(object sender, KeyPressEventArgs e)
        {
            // MessageBox.Show("Key Press" + e.KeyChar.ToString());
            AlphaKey posEvent = new AlphaKey();

            posEvent.Update(e.KeyChar);
        }
Beispiel #2
0
 public void Update(AlphaKey pEvent)
 {
     prompt = PosContext.Instance.PosPrompt;
     if (prompt != null)
     {
         prompt.InputText = pEvent.InputText();
     }
 }
Beispiel #3
0
	public void SetKeys(ColorKey[] colorKeys, AlphaKey[] alphaKeys) {
		GradientColorKey[] actualColorKeys = null;
		GradientAlphaKey[] actualAlphaKeys = null;
		
		if (colorKeys != null)
			actualColorKeys = colorKeys.Select(key => new GradientColorKey(key.color, key.time)).ToArray();
		if (alphaKeys != null)
			actualAlphaKeys = alphaKeys.Select(key => new GradientAlphaKey(key.alpha, key.time)).ToArray();
		
		_gradient.SetKeys(actualColorKeys, actualAlphaKeys);
	}	
Beispiel #4
0
 public void SetKeys(ColorKey[] colorKeys, AlphaKey[] alphaKeys)
 {
     if (colorKeys != null) {
     Array colorKeyParam = (Array)Activator.CreateInstance(s_tyGradientColorKey.MakeArrayType(), new object[] { colorKeys.Length });
     for (int i = 0; i < colorKeys.Length; ++i)
         colorKeyParam.SetValue(Activator.CreateInstance(s_tyGradientColorKey, colorKeys[i].color, colorKeys[i].time), i);
     s_piColorKeys.SetValue(_gradient, colorKeyParam, null);
     }
     if (alphaKeys != null) {
     Array alphaKeyParam = (Array)Activator.CreateInstance(s_tyGradientAlphaKey.MakeArrayType(), new object[] { alphaKeys.Length });
     for (int i = 0; i < alphaKeys.Length; ++i)
         alphaKeyParam.SetValue(Activator.CreateInstance(s_tyGradientAlphaKey, alphaKeys[i].alpha, alphaKeys[i].time), i);
     s_piAlphaKeys.SetValue(_gradient, alphaKeyParam, null);
     }
 }
Beispiel #5
0
        public void KeyPressed(int key)
        {
            AlphaKey posEvent = new AlphaKey();

            posEvent.Engage(key);
        }