本文整理汇总了C#中ControlType类的典型用法代码示例。如果您正苦于以下问题:C# ControlType类的具体用法?C# ControlType怎么用?C# ControlType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ControlType类属于命名空间,在下文中一共展示了ControlType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadLocalizationConfig
public static Dictionary<string, string> ReadLocalizationConfig(ControlType controlType)
{
string configPath = string.Format(configPathFormat, controlType.ToString(), RunTimeLocaliationTypeString);
Dictionary<string, string> dicNameValue = new Dictionary<string, string>();
if (File.Exists(configPath))
{
XmlDocument xd = new XmlDocument();
xd.Load(configPath);
XmlNodeList xnDataList = xd.SelectNodes("configuration/root/data");
foreach (XmlNode xn in xnDataList)
{
if (!dicNameValue.Keys.Contains(xn.Attributes["name"].Value))
{
dicNameValue.Add(xn.Attributes["name"].Value,xn.Attributes["value"].Value);
}
}
}
return dicNameValue;
}
示例2: cleanUpOnExit
public void cleanUpOnExit()
{
controlType = ControlType.None;
camera.enabled = false;
AudioListener aL = gameObject.GetComponent<AudioListener>();
aL.enabled = false;
}
示例3: RaiseEvent
protected void RaiseEvent(List<Frame> frames, Vector3 calculateDisplacementVector, long duration, ControlType controlType)
{
if(MovementDetected != null)
{
MovementDetected(this, new MovementEventArgs(calculateDisplacementVector, duration, TJointType.HandLeft, controlType));
}
}
示例4: SetController
public static void SetController(ControlType controllerToUse)
{
Controller = controllerToUse;
if (Controller == ControlType.PS) offset = 0;
if (Controller == ControlType.Xbox) offset = 1;
if (Controller == ControlType.Pro) offset = 2;
}
示例5: Decode
public void Decode(byte[] bytes)
{
using (var ms = new MemoryStream(bytes))
{
Type = (ControlType) dc.GetInt16(ms.ReadBytes(2), 0);
switch (Type)
{
case ControlType.STREAM_BEGIN:
case ControlType.STREAM_EOF:
case ControlType.STREAM_DRY:
case ControlType.STREAM_IS_RECORDED:
StreamID = dc.GetInt32(ms.ReadBytes(4), 0);
break;
case ControlType.SET_BUFFER:
StreamID = dc.GetInt32(ms.ReadBytes(4), 0);
BufferLength = dc.GetInt32(ms.ReadBytes(4), 0);
break;
case ControlType.PING_REQUEST:
case ControlType.PING_RESPONSE:
Time = dc.GetInt32(ms.ReadBytes(4), 0);
break;
case ControlType.SWFV_REQUEST:
break;
case ControlType.SWFV_RESPONSE:
Bytes = ms.ReadBytes(42);
break;
case ControlType.BUFFER_FULL:
case ControlType.BUFFER_EMPTY:
StreamID = dc.GetInt32(ms.ReadBytes(4), 0);
break;
}
}
}
示例6: MovementEventArgs
public MovementEventArgs(Vector3 displacement, long duration, TJointType jointType, ControlType controlType)
{
Displacement = displacement;
Duration = duration;
JointType = jointType;
ControlType = controlType;
}
示例7: FormItemContext
public FormItemContext(object bindedData, Type datatype, PropertyInfo propinfo, ControlType ctype)
{
BindedData = bindedData;
DataType = datatype;
PropertyInfo = propinfo;
ControlType = ctype;
}
示例8: SetControlType
void SetControlType()
{
ControlType controlType = this.controlType;
switch(this.touchType)
{
case TouchType.Click:
controlType = ControlType.Jump;
this.controlEventTime = 0;
break;
case TouchType.SweepLeft:
controlType = ControlType.TurnLeft;
this.controlEventTime = 0;
break;
case TouchType.SweepRight:
controlType = ControlType.TurnRight;
this.controlEventTime = 0;
break;
default:
if (this.controlEventTime > this.controlEventDelay)
{
controlType = ControlType.None;
}
this.controlEventTime += Time.deltaTime;
break;
}
this.controlType = controlType;
}
示例9: ConvertToWControl
internal static Wix.Control ConvertToWControl(this IWixControl srcControl, ControlType controlType)
{
var wControl = new Wix.Control { Type = controlType.ToString() };
wControl.CopyCommonPropertiesFrom(srcControl);
return wControl;
}
示例10: registerForInputEvents
/*
* Registers a listener for control events.
*/
public void registerForInputEvents(InputListener listener, ControlType type)
{
Control control = Controls[type];
if (!ListenerMap.ContainsKey(type))
ListenerMap[type] = new List<InputListener>();
ListenerMap[type].Add(listener);
}
示例11: Control
public Control(ControlType type)
{
if (instance == null)
{
instance = this;
this.type = type;
}
}
示例12: makeActive
public void makeActive()
{
controlType = ControlType.Full;
camera.enabled = true;
AudioListener aL = gameObject.GetComponent<AudioListener>();
aL.enabled = true;
justActivated = true;
}
示例13: cleanUpOnExit
public void cleanUpOnExit()
{
controlType = ControlType.None;
camera.enabled = false;
AudioListener aL = gameObject.GetComponent<AudioListener>();
aL.enabled = false;
Screen.lockCursor = false;
if (lineRenderer!=null) lineRenderer.enabled = false;
}
示例14: makeActive
public void makeActive()
{
camera.enabled = true;
camType = ControlType.Full;
justActivated = true;
camera.rect = new Rect(0f,0f,1f,1f);
AudioListener aL = gameObject.GetComponent<AudioListener>();
aL.enabled = true;
}
示例15: AddControl
/// <summary>
/// Añade un control a la lista a partir de la definición del valor
/// </summary>
public void AddControl(string strKey, ControlType intType, string strTitle, string strValue, bool blnRequired)
{
ControlProperty udtResult = new ControlProperty();
// Carga los datos
udtResult.LoadValue(strKey, intType, strTitle, strValue, blnRequired);
// Añade el control a la lista
lsrValues.Add(udtResult);
}