public bool Combination(params int[] keyCodes) { Action = "combination"; ClearParams(); ParamInt.AddRange(keyCodes); return(SendRequest() == null ? false : true); }
public bool RightClick() { Action = "right_click"; ParamInt.Clear(); ParamStrings.Clear(); return(SendRequest() == null ? false : true); }
public bool Release(int key) { Action = "release"; ClearParams(); ParamInt.Add(key); return(SendRequest() == null ? false : true); }
public bool DoType(params int[] keyCodes) { Action = "type"; ClearParams(); ParamInt.AddRange(keyCodes); return(SendRequest() == null ? false : true); }
public bool Press(int key) { Action = "press"; ClearParams(); ParamInt.Add(key); return(SendRequest() == null ? false : true); }
public SqlCommand UpdateParamInt(ParamInt param) { return(command(string.Format(@" UPDATE ParamInt SET ParamValue = {1} WHERE ParamId = {0} ", param.ParamId, param.ParamValue))); }
public bool SetClipboard(string data) { Action = "set_clipboard"; ParamInt.Clear(); ParamStrings.Clear(); ParamStrings.Add(data); return(SendRequest() == null ? false : true); }
public bool MoveBy(int x, int y) { Action = "move_by"; ClearParams(); ParamInt.Add(x); ParamInt.Add(y); return(SendRequest() == null ? false : true); }
public bool LeftClick(int x, int y) { Action = "left_click"; ParamInt.Clear(); ParamStrings.Clear(); ParamInt.Add(x); ParamInt.Add(y); return(SendRequest() == null ? false : true); }
/// <summary> /// Drag mouse from a point to another point. /// This will move mouse to the start point, hold left click, then move mouse from the start point to the end point, /// then release the left click. /// </summary> /// <param name="x1"> x coordinate of the start point </param> /// <param name="y1"> y coordinate of the start point </param> /// <param name="x2"> x coordinate of the end point</param> /// <param name="y2"> y coordinate of the end point </param> /// <returns> true if success else false </returns> public bool Drag(int x1, int y1, int x2, int y2) { Action = "drag"; ClearParams(); ParamInt.Add(x1); ParamInt.Add(y1); ParamInt.Add(x2); ParamInt.Add(y2); return(SendRequest() == null ? false : true); }
public string DelVar(string nameSpace, string name) { Action = "del"; ParamInt.Clear(); ParamStrings.Clear(); ParamStrings.Add(nameSpace); ParamStrings.Add(name); JToken result = SendRequest(); if (result == null) { return(null); } return(result.Value <string>()); }
protected override void _Init() { this.input = new ParamConnection("Input", null); this.input.description = "The audio signal to apply the delay filter to."; this.genParams.Add(this.input); this.offset = new ParamTimeLen("Offset", 0.25f, ParamTimeLen.TimeLenType.Seconds, ParamTimeLen.WidgetTime); this.offset.description = "The duration of time between duplicated voices."; this.genParams.Add(this.offset); this.dampen = new ParamFloat("Dampen", "Attenuation", 1.0f, 0.0f, 1.0f); this.dampen.description = "A compounding frequency multiplier applied to the frequency of each voice generated."; this.genParams.Add(this.dampen); this.voiceCt = new ParamInt("Voices", "Voices", 2, 2, 8); this.voiceCt.description = "The number of copies to create."; this.genParams.Add(this.voiceCt); }
protected override void _Init() { this.input = new ParamConnection("Input", null); this.input.description = "The audio signal to apply a chorus effect to."; // this.phonicCt = new ParamInt("Voices", "Voices", 2, 2, 8); this.phonicCt.description = "The number of copies to create."; // this.dampen = new ParamFloat("Dampen", "Attenuation", 1.0f, 0.0f, 1.0f); this.dampen.description = "A compounding loudness multiplication factor for each voice generated."; // this.freqOff = new ParamFloat("Freq Offset", "Offset", -0.2f, -1.0f, 1.0f); this.freqOff.description = "A compounding frequency multiplier applied to the frequency of each voice generated."; this.genParams.Add(this.input); this.genParams.Add(this.phonicCt); this.genParams.Add(this.dampen); this.genParams.Add(this.freqOff); }
/// <summary> /// Get color of the pixel at a specific pixel location on screen. /// </summary> /// <param name="x"> x coordinate of the pixel </param> /// <param name="y"> y coordinate of the pixel </param> /// <returns>A tuple of three integers (RGB) </returns> public Tuple <int, int, int> GetColor(int x, int y) { Action = "get_color"; ClearParams(); ParamInt.Add(x); ParamInt.Add(y); JToken result = SendRequest(); if (result == null) { return(null); } JArray output = result.Value <JArray>(); if (output.Count != 3) { return(null); } return(new Tuple <int, int, int>(output[0].Value <int>(), output[1].Value <int>(), output[2].Value <int>())); }
private static iParam addParameter <T>(string paramName) { // create a new parameter and transfer the properties iParam param = null; Type paramType = typeof(T); if (paramType == typeof(ParamBool) || paramType == typeof(bool) || paramType == typeof(Boolean)) { param = new ParamBool(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamInt) || paramType == typeof(int)) { param = new ParamInt(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamDouble) || paramType == typeof(double)) { param = new ParamDouble(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamBoolArr) || paramType == typeof(bool[]) || paramType == typeof(Boolean[])) { param = new ParamBoolArr(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamIntArr) || paramType == typeof(int[])) { param = new ParamIntArr(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamDoubleArr) || paramType == typeof(double[])) { param = new ParamDoubleArr(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamBoolMat) || paramType == typeof(bool[][]) || paramType == typeof(Boolean[][])) { param = new ParamBoolMat(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamIntMat) || paramType == typeof(int[][])) { param = new ParamIntMat(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamDoubleMat) || paramType == typeof(double[][])) { param = new ParamDoubleMat(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamStringMat) || paramType == typeof(string[][]) || paramType == typeof(String[][])) { param = new ParamStringMat(paramName, "", null, "", "", new string[0]); } else if (paramType == typeof(ParamColor) || paramType == typeof(RGBColorFloat)) { param = new ParamColor(paramName, "", null, "", "", new string[0]); } else { // message logger.Error("Unknown parameter (generic) type '" + paramType.Name + "' for parameter paramName '" + paramName + "' in globals, discarded."); // return without adding parameter return(null); } // add the parameter to the list paramList.Add(param); return(param); }
public static void UpdateParamInt(ParamInt paramInt) { Run(DB.UpdateParamInt(paramInt)); }