void keyboardHook_KeyPress(object sender, KeyPressEventArgs e) { // MessageBox.Show("Key Press" + e.KeyChar.ToString()); AlphaKey posEvent = new AlphaKey(); posEvent.Update(e.KeyChar); }
public void Update(AlphaKey pEvent) { prompt = PosContext.Instance.PosPrompt; if (prompt != null) { prompt.InputText = pEvent.InputText(); } }
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); }
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); } }
public void KeyPressed(int key) { AlphaKey posEvent = new AlphaKey(); posEvent.Engage(key); }