public IntegerSlider(Core.VplControl hostCanvas) : base(hostCanvas) { AddOutputPortToNode("Number", typeof(int)); SliderExpanderInteger expander = new SliderExpanderInteger { Style = hostCanvas.FindResource("ExpanderSliderStyleInteger") as Style, SliderValue = 5, SliderMax = 10, SliderMin = 0, SliderStep = 1 }; var b2 = new Binding("Data") { Mode = BindingMode.OneWayToSource, Source = OutputPorts[0] }; expander.SetBinding(SliderExpanderInteger.SliderValueProperty, b2); Name = "Integer slider"; AddControlToNode(expander); }
protected override async void Write(Core.LogEventInfo logEvent) { var request = (HttpWebRequest) WebRequest.Create(ServerUrl); request.ContentType = "application/json; charset=utf-8"; request.Method = "POST"; var requestWriter = new StreamWriter(request.GetRequestStream()); requestWriter.Write("{ " + "\"version\": " + "\"" + "1.0" + "\",\n" + "\"host\": " + "\"" + AndroidId + "\",\n" + "\"short_message\": " + "\"" + logEvent.FormattedMessage + "\",\n" + "\"full_message\": " + "\"" + logEvent.FormattedMessage + "\",\n" + "\"timestamp\": " + "\"" + DateTime.Now.ToString(CultureInfo.InvariantCulture) + "\",\n" + "\"level\": " + "\"" + logEvent.Level.Ordinal.ToString(CultureInfo.InvariantCulture) + "\",\n" + "\"facility\": " + "\"" + "NLog Android Test" + "\",\n" + "\"file\": " + "\"" + Environment.CurrentDirectory + "AndroidApp" + "\",\n" + "\"line\": " + "\"" + "123" + "\",\n" + "\"Userdefinedfields\": " + "{}" + "\n" + "}"); requestWriter.Close(); LastResponseMessage = (HttpWebResponse) request.GetResponse(); }
public void Delete(Core.Business.DeviceInfo deviceInfo) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, deviceInfo.Id); sql.ExecuteSql(SqlDeleteDeviceInfo); }
public void Delete(Core.Business.OperateSort operateSort) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, operateSort.Id); sql.ExecuteSP("usp_DeleteOperateSort"); }
public void Delete(Core.Business.TeacherProjectItem teacherProjectItem) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, teacherProjectItem.Id); sql.ExecuteSql(SqlDeleteTeacherProjectItem); }
private static void InsertBinaryOperationMethod(Core core, ProtoCore.AST.Node root, Operator op, PrimitiveType r, PrimitiveType op1, PrimitiveType op2, int retRank = 0, int op1rank = 0, int op2rank = 0) { ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode(); funcDefNode.access = ProtoCore.DSASM.AccessSpecifier.kPublic; funcDefNode.IsAssocOperator = true; funcDefNode.IsBuiltIn = true; funcDefNode.Name = Op.GetOpFunction(op); funcDefNode.ReturnType = new ProtoCore.Type() { Name = core.TypeSystem.GetType((int)r), UID = (int)r, rank = retRank}; ProtoCore.AST.AssociativeAST.ArgumentSignatureNode args = new ProtoCore.AST.AssociativeAST.ArgumentSignatureNode(); args.AddArgument(new ProtoCore.AST.AssociativeAST.VarDeclNode() { memregion = ProtoCore.DSASM.MemoryRegion.kMemStack, access = ProtoCore.DSASM.AccessSpecifier.kPublic, NameNode = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kLHS), ArgumentType = new ProtoCore.Type { Name = core.TypeSystem.GetType((int)op1), UID = (int)op1, rank = op1rank} }); args.AddArgument(new ProtoCore.AST.AssociativeAST.VarDeclNode() { memregion = ProtoCore.DSASM.MemoryRegion.kMemStack, access = ProtoCore.DSASM.AccessSpecifier.kPublic, NameNode = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kRHS), ArgumentType = new ProtoCore.Type { Name = core.TypeSystem.GetType((int)op2), UID = (int)op2, rank = op2rank} }); funcDefNode.Signature = args; ProtoCore.AST.AssociativeAST.CodeBlockNode body = new ProtoCore.AST.AssociativeAST.CodeBlockNode(); ProtoCore.AST.AssociativeAST.IdentifierNode _return = BuildAssocIdentifier(core, ProtoCore.DSDefinitions.Keyword.Return, ProtoCore.PrimitiveType.kTypeReturn); ProtoCore.AST.AssociativeAST.IdentifierNode lhs = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kLHS); ProtoCore.AST.AssociativeAST.IdentifierNode rhs = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kRHS); body.Body.Add(new ProtoCore.AST.AssociativeAST.BinaryExpressionNode() { LeftNode = _return, Optr = ProtoCore.DSASM.Operator.assign, RightNode = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode() { LeftNode = lhs, RightNode = rhs, Optr = op } }); funcDefNode.FunctionBody = body; (root as ProtoCore.AST.AssociativeAST.CodeBlockNode).Body.Add(funcDefNode); }
public DoubleSlider(Core.VplControl hostCanvas) : base(hostCanvas) { AddOutputPortToNode("Number", typeof(double)); SliderExpanderDouble expander = new SliderExpanderDouble { Style = hostCanvas.FindResource("ExpanderSliderStyleDouble") as Style, SliderValue = 5, SliderMax = 10, SliderMin = 2, SliderStep = 0.01 }; var b2 = new Binding("Data") { Mode = BindingMode.OneWayToSource, Source = OutputPorts[0] }; expander.SetBinding(SliderExpanderDouble.SliderValueProperty, b2); Name = "Double slider"; AddControlToNode(expander); }
public Suggest(Request request, Core.Client.UrlBuilder urlBuilder) : base(request, urlBuilder) { log.Debug("Initialize new Suggest adapter."); Request.Action = RequestType.Suggest; }
public static ProtoCore.AST.AssociativeAST.IdentifierNode BuildAssocIdentifier(Core core, string name, ProtoCore.PrimitiveType type = ProtoCore.PrimitiveType.kTypeVar) { var ident = new ProtoCore.AST.AssociativeAST.IdentifierNode(); ident.Name = ident.Value = name; ident.datatype = TypeSystem.BuildPrimitiveTypeObject(type, 0); return ident; }
public void Delete(Core.Business.InstrumentPictureRepository instrumentPictureRepository) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, instrumentPictureRepository.Id); sql.ExecuteSP("usp_DeleteInstrumentPictureRepository"); }
/// <summary> /// Builds up a set of options the control can use (i.e. jQuery UI control supports). Which is /// then used in rendering the JavaScript required to initialise the control properties. /// </summary> /// <param name="options">Collection to add the identified options to</param> override protected internal void DiscoverOptions(Core.ScriptOptions options) { if (this.Disabled) { // BUG: There seems to be a bug in jQuery UI meaning disabling all the tabs // doesn't work, so disable each tab manually. The overall "disabled" flag // is kept as false so we use the List<int> entry point instead. this.DisabledArray.Clear(); for (int i=0; i < this.Tabs._Panes._Panes.Count(); i++) { this.DisabledArray.Add(i); } // Following line is left here for when the jQuery UI library is fixed. //options.Add(this.Disabled, "disable", this.Disabled.JsBool()); } if (this.DisabledArray != null && this.DisabledArray.Count() > 0) { options.Add("disabled", this.DisabledArray.JsArray()); } options.Add(!this.IsNullOrEmpty(this.Fx), "fx", this.Fx); options.Add(!this.IsNullEmptyOrDefault(this.Evt, DEFAULT_EVENT), "event", this.Evt.InDoubleQuotes()); options.Add(this.Cache, "cache", this.Cache.JsBool() ); options.Add(!this.IsNullOrEmpty(this.AjaxOptions), "ajaxOptions", this.AjaxOptions); options.Add(this.Collapsible, "collapsible", this.Collapsible.JsBool() ); // Cookie is a little bit different because it's an object, so just add it's options in options.Add(this.Cookie.Options.GetCookieScriptOption()); options.Add(!this.IsNullEmptyOrDefault(this.IdPrefix, DEFAULT_ID_PREFIX), "idPrefix", this.IdPrefix.InDoubleQuotes()); options.Add(!this.IsNullEmptyOrDefault(this.PanelTemplate, DEFAULT_PANEL_TEMPLATE), "panelTemplate", this.PanelTemplate.InDoubleQuotes()); options.Add(!this.IsNullEmptyOrDefault(this.Spinner, DEFAULT_SPINNER), "spinner", this.Spinner.InDoubleQuotes()); options.Add(!this.IsNullEmptyOrDefault(this.TabTemplate, DEFAULT_TAB_TEMPLATE), "tabTemplate", this.TabTemplate.InDoubleQuotes()); if (this.Tabs.Panes.HasSelectedTab() && this.Tabs.Panes.GetSelectedTab().Index > 0) { options.Add( this.Tabs.Panes.HasSelectedTab(), "selected", this.Tabs.Panes.GetSelectedTab().Index.ToString() ); } }
public void Delete(Core.Business.StudentPass studentPass) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@ID", SqlDbType.Int, studentPass.Id); sql.ExecuteSql(SqlDeleteStudentPass); }
public MessageReceivedEventArgs(Core.JabberConnection objConnection, Users.JabberContact objContact, string strSubject, string strBody) : base(objConnection, objContact) { Subject = strSubject; Body = strBody; }
public void Delete(Core.Business.ObjectStimulatedType objectStimulatedType) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, objectStimulatedType.Id); sql.ExecuteSP("usp_DeleteObjectStimulatedType"); }
public void Delete(Core.Business.MiniBlogComment miniBlogComment) { SqlServerUtility sql = new SqlServerUtility(connectionString); sql.AddParameter("@Id", SqlDbType.BigInt, miniBlogComment.Id); sql.ExecuteSP("USP_MiniBlogComment_Delete_By_Id"); }
public void Delete(Core.Business.TRGroup tRGroup) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, tRGroup.Id); sql.ExecuteSql(SqlDeleteTRGroup); }
public void Delete(Core.Business.Annex annex) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@ID", SqlDbType.UniqueIdentifier, annex.Id); sql.ExecuteSP("usp_DeleteAnnex"); }
public void Delete(Core.Business.Messages messages) { SqlServerUtility sql = new SqlServerUtility(connectionString); sql.AddParameter("@Id", SqlDbType.BigInt, messages.Id); sql.ExecuteSql(SqlDeleteMessages); }
//mengambil gambar dari kamera void GrabFrom(Core.BuildingBlocks.FrameGrabber fg) { if (fg != null) { fg.OnFrame += new Parsley.Core.BuildingBlocks.FrameGrabber.OnFrameHandler(_grabber_OnFrame); } }
public void Delete(Core.Business.ControlPermissions2 controlPermissions2) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, controlPermissions2.Id); sql.ExecuteSql(SqlDeleteControlPermissions2); }
public void Insert(Core.Business.Asset asset) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@AssetType", SqlDbType.NVarChar, asset.AssetType); sql.AddParameter("@AssetItemName", SqlDbType.NVarChar, asset.AssetItemName); sql.AddParameter("@UnitValue", SqlDbType.Decimal, asset.UnitValue); sql.AddParameter("@PurchasingDate", SqlDbType.DateTime, asset.PurchasingDate); sql.AddParameter("@RegisterDate", SqlDbType.DateTime, asset.RegisterDate); sql.AddParameter("@Num", SqlDbType.Int, asset.Num); SqlDataReader reader = sql.ExecuteSqlReader(SqlInsertAsset); if (reader != null && !reader.IsClosed && reader.Read()) { if (!reader.IsDBNull(0)) asset.Id = int.Parse(reader.GetDecimal(0).ToString()); reader.Close(); } else { if (reader != null && !reader.IsClosed) reader.Close(); } }
public void Delete(Core.Business.FavoritesComment favoritesComment) { SqlServerUtility sql = new SqlServerUtility(connectionString); sql.AddParameter("@Id", SqlDbType.BigInt, favoritesComment.Id); sql.ExecuteSqlReader(SqlDeleteFavoritesComment); }
public static int CompareString(StackValue s1, StackValue s2, Core core) { if (!StackUtils.IsString(s1) || !StackUtils.IsString(s2)) { return ProtoCore.DSASM.Constants.kInvalidIndex; } HeapElement he1 = ArrayUtils.GetHeapElement(s1, core); HeapElement he2 = ArrayUtils.GetHeapElement(s2, core); int len1 = he1.VisibleSize; int len2 = he2.VisibleSize; int len = len1 > len2 ? len2 : len1; int i = 0; for (; i < len; ++i) { if (he1.Stack[i].opdata != he2.Stack[i].opdata) { return (he1.Stack[i].opdata > he2.Stack[i].opdata) ? 1 : -1; } } if (len1 > len2) return 1; else if (len1 == len2) return 0; else return -1; }
public void Delete(Core.Business.UserAnswer userAnswer) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Key", SqlDbType.Int, userAnswer.Id); sql.ExecuteSql(SqlDeleteUserAnswer); }
/// <summary> /// Generates the Footprint Links for each aggregate, when a collection /// of aggregates are being returned /// </summary> /// <param name="aggregate">The aggregate for which the links are generated</param> /// <returns>Collection of links</returns> public IEnumerable<Models.Link> GenerateCollectionLinks(Core.Model.Aggregate aggregate) { var links = new List<Link>() { new Link() { Href = "/api/turbine/" + aggregate.Id, Rel = "self", Title = string.Empty, Type = "method=\"GET\"" }, new Link() { Href = "/api/windfarm/" + aggregate.Id + "/turbine/", Rel = "windfarm turbines", Title = string.Empty, Type = "method=\"GET\"" }, new Link() { Href = "/api/windfarm/" + aggregate.Id, Rel = "windfarm", Title = string.Empty, Type = "method=\"GET\"" } }; return links; }
public void Delete(Core.Business.PlanCourse planCourse) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, planCourse.Id); sql.ExecuteSql(SqlDeletePlanCourse); }
public void Delete(Core.Business.JointReviewSecondAudit jointReviewSecondAudit) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, jointReviewSecondAudit.Id); sql.ExecuteSP("usp_DeleteJointReviewSecondAudit"); }
public void Delete(Core.Business.Asset asset) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.Int, asset.Id); sql.ExecuteSql(SqlDeleteAsset); }
public void Delete(Core.Business.Subsidies subsidies) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, subsidies.Id); sql.ExecuteSP("usp_DeleteSubsidy"); }
public void Delete(Core.Business.SysSetting sysSetting) { SqlServerUtility sql = new SqlServerUtility(); sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, sysSetting.Id); sql.ExecuteSP("usp_DeleteSysSetting"); }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public TimeLine(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public ContentsRequest FindAssociations(Core core, EVisualClass type) { return(FindAssociations(this, new ContentsRequest(core, this, type))); }
public NavigationModules(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public NavigationModules(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public DataAccessPage(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public DataAccessPage(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public override void Execute() { var target = GetTarget(Q, DamageType.Magical); PredictionResult pred; if (target != null && target.IsTargetable && !target.HasBuffOfType(BuffType.SpellImmunity) && Settings.UseQ && !target.IsDead && Player.Instance.IsInRange(target, Q.Range)) { pred = Q.GetPrediction(target); if (Humanizer.QCastDelayEnabled) { if (pred.HitChancePercent >= Settings.QMinHitChance) { Core.DelayAction(() => { Q.Cast(pred.CastPosition); }, Humanizer.QRndmDelay ? new Random().Next(250, Humanizer.QCastDelay) : Humanizer.QCastDelay); } } else { if (pred.HitChancePercent >= Settings.QMinHitChance) { Q.Cast(pred.CastPosition); } } } if (Settings.WImmobileOnly) { if (target != null && target.IsTargetable && !target.HasBuffOfType(BuffType.SpellImmunity) && Settings.UseW && !target.IsDead && Player.Instance.IsInRange(target, W.Range) && IsImmobile(target)) { pred = W.GetPrediction(target); W.Cast(pred.CastPosition); } } else { if (target != null && target.IsTargetable && !target.HasBuffOfType(BuffType.SpellImmunity) && Settings.UseW && !target.IsDead && Player.Instance.IsInRange(target, W.Range)) { pred = W.GetPrediction(target); if (Settings.UseQBeforeW) { if (Q.IsOnCooldown) { W.Cast(pred.CastPosition); } } else { W.Cast(pred.CastPosition); } } } }
public static ContentsRequest FindAssociations(object target, Core core, EVisualClass type) { return(FindAssociations(target, new ContentsRequest(core, target, type))); }
/// <param name="factory">current used factory core</param> /// <param name="parentObject">object there has created the proxy</param> /// <param name="proxyShare">proxy share instead if com proxy</param> public IMsoAxisTitle(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare) { }
public TimeLine(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
public IMsoAxisTitle(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public _VBComponent_Old(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public ISlicerPivotTables(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
public _VBComponent_Old(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
/// <param name="factory">current used factory core</param> /// <param name="parentObject">object there has created the proxy</param> /// <param name="proxyShare">proxy share instead if com proxy</param> public ISlicerPivotTables(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public Spinner(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public IVGraphicItems(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public ISlicerPivotTables(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public _ReferencesEvents(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public IVGraphicItems(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public Hyperlink(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public _ReferencesEvents(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public AddIns(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
public Hyperlink(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public IMsoAxisTitle(Core factory, ICOMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }
/// <param name="factory">current used factory core</param> /// <param name="parentObject">object there has created the proxy</param> /// <param name="proxyShare">proxy share instead if com proxy</param> public Hyperlink(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare) { }
public IModelTableNameChange(Core factory, COMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
/// <param name="factory">current used factory core</param> /// <param name="parentObject">object there has created the proxy</param> /// <param name="proxyShare">proxy share instead if com proxy</param> public AddIns(Core factory, ICOMObject parentObject, COMProxyShare proxyShare) : base(factory, parentObject, proxyShare) { }
public DispIHTMLOptionButtonElement(Core factory, ICOMObject parentObject, object comProxy, NetRuntimeSystem.Type comProxyType) : base(factory, parentObject, comProxy, comProxyType) { }
///<param name="factory">current used factory core</param> ///<param name="parentObject">object there has created the proxy</param> ///<param name="comProxy">inner wrapped COM proxy</param> public IModelTableNameChange(Core factory, COMObject parentObject, object comProxy) : base(factory, parentObject, comProxy) { }