public void ClearOverloadedTest() { //Arrange & Act Clear clear = new Clear("name", "address", "locality", "region"); //Assert Assert.AreEqual("fields=name,address,locality,region", HttpUtility.UrlDecode(clear.ToUrlQuery())); }
public void ClearIntegrationTest() { //Arrange Clear clear = new Clear("latitude", "longitude"); //Act var response = Factual.Clear("us-sandbox", "1d93c1ed-8cf3-4d58-94e0-05bbcd827cba", clear, new Metadata().User("test_driver_user")); //Assert AssertReceivedOkResponse(response); }
public void ClearIntegrationTest() { // Arrange Clear clear = new Clear("latitude", "longitude"); // Act var response = Factual.Clear("us-sandbox", "4e4a14fe-988c-4f03-a8e7-0efc806d0a7f", clear, new Metadata().User("test_driver_user")); // Assert AssertReceivedOkResponse(response); }
public void ClearDefaultTest() { //Arrange Clear clear = new Clear(); //Act clear.AddField("name"); clear.AddField("address"); clear.AddField("locality"); clear.AddField("region"); //Assert Assert.AreEqual("fields=name,address,locality,region", HttpUtility.UrlDecode(clear.ToUrlQuery())); }
public Database() { patientList = new List<Patient>(); doctorList = new List<Doctor>(); hospitalList = new List<Hospital>(); recordList = new List<Record>(); patientService = new PatientService(patientList); hospitalService = new HospitalService(hospitalList); doctorService = new DoctorService(doctorList); diagnosisRecord = new DiagnosisRecord(recordList, patientList, doctorList, hospitalList); viewRecord = new ViewRecord(); print = message => Console.WriteLine(message); print = delegate(string message) { }; clear = () => Console.Clear(); }
private void panel1_Click(object sender, EventArgs e) { Clear.Focus(); }
public void ChangeButton(string name, List<Object> o, Clear c, PropertyChanged p) { currentButton = name; Clear clear = c; EventHandler handler = SomethingHappened; if (handler != null) { handler(this, new MainArgs(o, clear, p)); } }
/// <summary> /// Realizar el cruce /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btCreateClear_Click(object sender, EventArgs e) { msnMessage.HideMessage(); string co = _user._usv_co; string listLiq = string.Empty; string listDoc = string.Empty; string clear = string.Empty; _lstDocTx = getListFromSes(); List <Documents_Trans> lstDocTxCheck = _lstDocTx.Where(x => x._check).ToList(); if (lstDocTxCheck.Count == 0) { msnMessage.LoadMessage("no ha seleccionado ningun items", UserControl.ucMessage.MessageType.Error); return; } DataTable dt_cruce = new DataTable(); dt_cruce.Columns.Add("Tip", typeof(string)); dt_cruce.Columns.Add("Monto", typeof(Double)); Int32 fvalidapedido = 0; DataTable dtpagos = new DataTable(); dtpagos.Columns.Add("Doc_Tra_Id", typeof(string)); foreach (Documents_Trans dTx in lstDocTxCheck) { if (dTx._conceptid.Equals("PAGOS")) { dt_cruce.Rows.Add('P', dTx._value); if (!string.IsNullOrEmpty(listDoc)) { listDoc += ","; } listDoc += dTx._docNo; dtpagos.Rows.Add(dTx._docNo); } if (dTx._conceptid.Equals("LIQUIDACIONES")) { dt_cruce.Rows.Add('L', dTx._value * -1); fvalidapedido += 1; if (fvalidapedido > 1) { msnMessage.LoadMessage("No se puede realizar cruce de pagos con 2 o más Pedidos" + " ,por favor seleccione solo 1 pedido.", UserControl.ucMessage.MessageType.Error); return; } if (!string.IsNullOrEmpty(listLiq)) { listLiq += ","; } listLiq += dTx._docNo; } } if (listLiq.Length == 0) { msnMessage.LoadMessage("no ha seleccionado ningun pedido para cruzar el pago", UserControl.ucMessage.MessageType.Error); return; } //validar para que solo haya un limite de pago y no seleccione varios pagos cuando en un solo op ya pago todo el pedido DataRow[] fila_L = dt_cruce.Select("Tip='L'"); Decimal monto_liq = Convert.ToDecimal(fila_L[0][1].ToString()); DataRow[] fila_P = dt_cruce.Select("Tip='P'"); Decimal _pagos = 0; Int32 _limite = 0; Int32 _cur = 0; for (Int32 i = 0; fila_P.Length > i; ++i) { _cur += 1; //si ya existe pagos seleccionados if (_cur > 1) { decimal _pago_cancelado = Convert.ToDecimal(fila_P[i][1].ToString()); if (_pago_cancelado > monto_liq) { msnMessage.LoadMessage("por favor solo seleccione el pago necesario para pagar su pedido", UserControl.ucMessage.MessageType.Error); return; } } _pagos += Convert.ToDecimal(fila_P[i][1].ToString()); if (_pagos > monto_liq) { if (_limite == 0) { _limite = 1; } else { msnMessage.LoadMessage("por favor solo seleccione el pago necesario para pagar su pedido", UserControl.ucMessage.MessageType.Error); return; } } } //************************************* // Cruce financiero de pagos y liquidaciones if (!string.IsNullOrEmpty(listLiq) && !string.IsNullOrEmpty(listDoc)) { // try { string vrefnc = ""; string vreffec = ""; string _validaref = string.Empty; _validaref = Clear.setvalidaclear(listLiq, ref vrefnc, ref vreffec); if (!(string.IsNullOrEmpty(_validaref))) { msnMessage.LoadMessage("No se puede realizar cruce de pagos; porque la fecha de referencia de la nota de credito N " + vrefnc + " pertenece a otro mes con fecha " + vreffec + " ,por favor anule este pedido y vuelva a generar otro pedido", UserControl.ucMessage.MessageType.Error); return; } string strIdPromotor = dwCustomers.SelectedValue.ToString(); clear = Clear.setPreClear(listLiq, dtpagos); // en este caso vamos hacer un update a la nota de credito de financiera de document_trans //Clear.sbupdateclearncredito(listLiq, clear); // if (!string.IsNullOrEmpty(clear)) { string[] prems = clear.Split('|'); string strpremio = prems[1].ToString(); string strpremio2 = prems[2].ToString(); string strmensaje = ""; string strmensajePremio = ""; if (strpremio != "N" && strpremio != "0") { string strIdLiquidacion = Clear.setCrearLiquidacionPremio(Convert.ToInt32(strIdPromotor), Convert.ToInt32(strpremio), "C"); strmensajePremio = "Premio generado en el pedido:" + strIdLiquidacion + " "; } if (strpremio2 != "N" && strpremio2 != "0") { string strIdLiquidacion = Clear.setCrearLiquidacionPremio(Convert.ToInt32(strIdPromotor), Convert.ToInt32(strpremio2), "P"); string cadena = ""; if (strmensajePremio != "") { cadena = "y"; } strmensajePremio = strmensajePremio + " " + cadena + " en el pedido:" + strIdLiquidacion + " "; } if (strmensajePremio != "") { strmensajePremio = " ( " + strmensajePremio + " ) "; } msnMessage.LoadMessage("El cruce de información fue grabado correctamente " + strmensajePremio + ", su pedido sera enviado marcación y posterior facturación; número del cruce: " + prems[0].ToString() + strmensaje, UserControl.ucMessage.MessageType.Information); //msnMessage.LoadMessage("El cruce de información fue grabado correctamente, su pedido sera enviado marcación y posterior facturación; número del cruce: " + prems[0].ToString() + strmensaje, UserControl.ucMessage.MessageType.Information); //if (strpremio != "N" && strpremio != "0") //{ // string strregalo = prems[2].ToString(); // ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "ConfirmacionPremio(" + strpremio + ", " + strIdPromotor + ",'" + strregalo + "'); ", true); //} //procedimiento envio de correo al usuario admin //DataTable dt = Clear.fgetcorreoenvio(); //if (dt.Rows.Count > 0) //{ // for (Int32 i = 0; i <= dt.Rows.Count - 1; i++) // { // sbenviarcorreo(dt.Rows[i]["email"].ToString()); // } //} //////////////////////////////////// // Async Log_Transaction.registerUserInfo(_user, "CREATE CLEAR:" + clear); } else { throw new InvalidCastException(); } refreshGrid(); } catch (InvalidCastException ic) { msnMessage.LoadMessage("Error ocurrido realizando el cruce financiero; por favor intente de nuevo; detalle: " + ic.Message, UserControl.ucMessage.MessageType.Error); } catch (Exception ex) { msnMessage.LoadMessage("Error ocurrido realizando el cruce financiero; por favor intente de nuevo; detalle: " + ex.Message, UserControl.ucMessage.MessageType.Error); } } // Cruce financiero de documentos else if (!string.IsNullOrEmpty(listDoc)) { clear = Clear.setClearingDoc(co, listDoc); try { if (!string.IsNullOrEmpty(clear)) { msnMessage.LoadMessage("El cruce de información fue grabado correctamente; número del cruce: " + clear, UserControl.ucMessage.MessageType.Information); // Async Log_Transaction.registerUserInfo(_user, "CREATE CLEAR:" + clear); } else { throw new InvalidCastException(); } refreshGrid(); } catch (InvalidCastException ic) { msnMessage.LoadMessage("Error ocurrido realizando el cruce financiero; por favor intente de nuevo; detalle: " + ic.Message, UserControl.ucMessage.MessageType.Error); } catch (Exception ex) { msnMessage.LoadMessage("Error ocurrido realizando el cruce financiero; por favor intente de nuevo; detalle: " + ex.Message, UserControl.ucMessage.MessageType.Error); } } else { msnMessage.LoadMessage("Por favor, debe seleccionar los documentos que formaran el cruce financiero.", UserControl.ucMessage.MessageType.Error); } }
private void Update(EvaluationContext context) { var resourceManager = ResourceManager.Instance(); var device = resourceManager.Device; Size2 size = Resolution.GetValue(context); bool generateMips = GenerateMips.GetValue(context); var withDepthBuffer = WithDepthBuffer.GetValue(context); var clear = Clear.GetValue(context); var clearColor = ClearColor.GetValue(context); var reference = TextureReference.GetValue(context); if (size.Width == 0 || size.Height == 0) { size = context.RequestedResolution; } if (size.Width <= 0 || size.Height <= 0 || size.Width > MaximumTexture2DSize || size.Height > MaximumTexture2DSize) { Log.Warning("Invalid texture size: " + size); return; } _sampleCount = Multisampling.GetValue(context).Clamp(1, 32); UpdateTextures(device, size, TextureFormat.GetValue(context), withDepthBuffer ? Format.R32_Typeless : Format.Unknown, generateMips); var deviceContext = device.ImmediateContext; // Save settings in context var prevRequestedResolution = context.RequestedResolution; var prevViewports = deviceContext.Rasterizer.GetViewports <RawViewportF>(); var prevTargets = deviceContext.OutputMerger.GetRenderTargets(2, out var prevDepthStencilView); var prevObjectToWorld = context.ObjectToWorld; var prevWorldToCamera = context.WorldToCamera; var prevCameraToClipSpace = context.CameraToClipSpace; var keepCameraBypass = context.BypassCameras; context.BypassCameras = false; deviceContext.Rasterizer.SetViewport(new SharpDX.Viewport(0, 0, size.Width, size.Height, 0.0f, 1.0f)); deviceContext.OutputMerger.SetTargets(_multiSampledDepthBufferDsv, _multiSampledColorBufferRtv); // Clear if (clear || !_wasClearedOnce) { try { deviceContext.ClearRenderTargetView(_multiSampledColorBufferRtv, new Color(clearColor.X, clearColor.Y, clearColor.Z, clearColor.W)); if (_multiSampledDepthBufferDsv != null) { deviceContext.ClearDepthStencilView(_multiSampledDepthBufferDsv, DepthStencilClearFlags.Depth, 1.0f, 0); } _wasClearedOnce = true; } catch { Log.Error($"{Parent.Symbol.Name}: Error clearing actual render target.", SymbolChildId); } } // Set default values for new sub tree context.RequestedResolution = size; context.SetDefaultCamera(); if (TextureReference.IsConnected) { reference.ColorTexture = ColorTexture; reference.DepthTexture = DepthTexture; } // Render Command.GetValue(context); // Restore context context.BypassCameras = keepCameraBypass; context.ObjectToWorld = prevObjectToWorld; context.WorldToCamera = prevWorldToCamera; context.CameraToClipSpace = prevCameraToClipSpace; context.RequestedResolution = prevRequestedResolution; deviceContext.Rasterizer.SetViewports(prevViewports); deviceContext.OutputMerger.SetTargets(prevDepthStencilView, prevTargets); if (_sampleCount > 1) { try { device.ImmediateContext.ResolveSubresource(_multiSampledColorBuffer, 0, _resolvedColorBuffer, 0, _resolvedColorBuffer.Description.Format); if (withDepthBuffer) { ResolveDepthBuffer(); } } catch (Exception e) { Log.Error("resolving render target buffer failed:" + e.Message); } } if (generateMips) { deviceContext.GenerateMips(DownSamplingRequired ? _resolvedColorBufferSrv : _multiSampledColorBufferSrv); } // Clean up ref counts for RTVs for (int i = 0; i < prevTargets.Length; i++) { prevTargets[i]?.Dispose(); } prevDepthStencilView?.Dispose(); ColorBuffer.Value = ColorTexture; ColorBuffer.DirtyFlag.Clear(); DepthBuffer.Value = DepthTexture; DepthBuffer.DirtyFlag.Clear(); }
private void ClearAll() { Clear.AllTextBoxesAndComboBoxes(this.editVendors_panel); this.editDeleteVendorsVaslidation.RestartValidation(); }
protected override void PerformAs(IPerformer actor) { actor.Perform(Clear.TheContentsOf(TicketList.AgiilQueryText)); actor.Perform(Enter.TheText(queryText).Into(TicketList.AgiilQueryText)); actor.Perform(Navigate.ToAnotherPageByClicking(TicketList.PerformAgiilQueryButton)); }
public void AddStages() { _ServiceStage.AddStage(); Clear.ExecuteChanged(); }
//clear form private void btn_clear_Click(object sender, EventArgs e) { supplierId = 0; Clear.ClearFormFields(this); }
static void Clear(GL_Graphics graphics, ISystemOpenGL.Context context, RenderTarget target, Clear flags, Color color, float depth, int stencil, RectInt viewport) { // update the viewport var meta = graphics.GetContextMeta(context); { viewport.Y = target.RenderHeight - viewport.Y - viewport.Height; if (meta.Viewport != viewport) { GL.Viewport(viewport.X, viewport.Y, viewport.Width, viewport.Height); meta.Viewport = viewport; } } // we disable the scissor for clearing meta.ForceScissorUpdate = true; GL.Disable(GLEnum.SCISSOR_TEST); // clear var mask = GLEnum.ZERO; if (flags.HasFlag(Framework.Clear.Color)) { GL.ClearColor(color.R / 255f, color.G / 255f, color.B / 255f, color.A / 255f); mask |= GLEnum.COLOR_BUFFER_BIT; } if (flags.HasFlag(Framework.Clear.Depth)) { GL.ClearDepth(depth); mask |= GLEnum.DEPTH_BUFFER_BIT; } if (flags.HasFlag(Framework.Clear.Stencil)) { GL.ClearStencil(stencil); mask |= GLEnum.STENCIL_BUFFER_BIT; } GL.Clear(mask); GL.BindFramebuffer(GLEnum.FRAMEBUFFER, 0); }
protected override void DrawCore(RenderContext context, RenderDrawContext drawContext) { var viewport = drawContext.CommandList.Viewport; using (drawContext.PushRenderTargetsAndRestore()) { // Render Shadow maps shadowMapRenderer?.Draw(drawContext); if (VRSettings.Enabled && VRSettings.VRDevice != null) { var isFullViewport = (int)viewport.X == 0 && (int)viewport.Y == 0 && (int)viewport.Width == drawContext.CommandList.RenderTarget.ViewWidth && (int)viewport.Height == drawContext.CommandList.RenderTarget.ViewHeight; if (!isFullViewport) { return; } using (drawContext.PushRenderTargetsAndRestore()) { //make sure we don't use any default targets! drawContext.CommandList.SetRenderTargets(null, null); PrepareRenderTargets(drawContext, new Size2(VRSettings.VRDevice.ActualRenderFrameSize.Width / 2, VRSettings.VRDevice.ActualRenderFrameSize.Height)); //also prepare the final VR target var vrFullSurface = PushScopedResource(drawContext.GraphicsContext.Allocator.GetTemporaryTexture2D( TextureDescription.New2D(VRSettings.VRDevice.ActualRenderFrameSize.Width, VRSettings.VRDevice.ActualRenderFrameSize.Height, 1, PixelFormat.R8G8B8A8_UNorm_SRgb, TextureFlags.ShaderResource | TextureFlags.RenderTarget))); //draw per eye using (context.SaveViewportAndRestore()) using (drawContext.PushRenderTargetsAndRestore()) { drawContext.CommandList.SetViewport(new Viewport(0.0f, 0.0f, VRSettings.VRDevice.ActualRenderFrameSize.Width / 2.0f, VRSettings.VRDevice.ActualRenderFrameSize.Height)); drawContext.CommandList.SetRenderTargets(currentDepthStencil, currentRenderTargets.Count, currentRenderTargets.Items); ViewCount = 2; for (var i = 0; i < 2; i++) { using (context.PushRenderViewAndRestore(VRSettings.RenderViews[i])) { // Clear render target and depth stencil Clear?.Draw(drawContext); ViewIndex = i; DrawView(context, drawContext); drawContext.CommandList.CopyRegion(ViewOutputTarget, 0, null, vrFullSurface, 0, VRSettings.VRDevice.ActualRenderFrameSize.Width / 2 * i); } } if (VRSettings.VRDevice.SupportsOverlays) { foreach (var overlay in VRSettings.Overlays) { if (overlay != null && overlay.Texture != null) { overlay.Overlay.UpdateSurface(drawContext.CommandList, overlay.Texture); } } } VRSettings.VRDevice.Commit(drawContext.CommandList, vrFullSurface); } } //draw mirror to backbuffer (if size is matching and full viewport) if (VRSettings.CopyMirror) { if (VRSettings.VRDevice.MirrorTexture.Size != drawContext.CommandList.RenderTarget.Size) { VRSettings.MirrorScaler.SetInput(0, VRSettings.VRDevice.MirrorTexture); VRSettings.MirrorScaler.SetOutput(drawContext.CommandList.RenderTarget); VRSettings.MirrorScaler.Draw(drawContext); } else { drawContext.CommandList.Copy(VRSettings.VRDevice.MirrorTexture, drawContext.CommandList.RenderTarget); } } } else { PrepareRenderTargets(drawContext, new Size2((int)viewport.Width, (int)viewport.Height)); ViewCount = 1; ViewIndex = 0; using (drawContext.PushRenderTargetsAndRestore()) { drawContext.CommandList.SetRenderTargets(currentDepthStencil, currentRenderTargets.Count, currentRenderTargets.Items); // Clear render target and depth stencil Clear?.Draw(drawContext); DrawView(context, drawContext); } } } // Clear intermediate results currentRenderTargets.Clear(); currentRenderTargetsNonMSAA.Clear(); currentDepthStencil = null; currentDepthStencilNonMSAA = null; }
/// <summary> /// defines all of the actions /// </summary> public void DefineActions() { Click click = new Click(); Clear clear = new Clear(); Close close = new Close(); Exit exit = new Exit(); Next_Tab next_tab = new Next_Tab(); Previous_Tab previous_tab = new Previous_Tab(); WindowsCtrlTab wtab = new WindowsCtrlTab(); Idle idle = new Idle(); Next_Selection nextSelection = new Next_Selection(); Previous_Selection previousSelection = new Previous_Selection(); Scroll_Down scrollDown = new Scroll_Down(); Scroll_Up scrollUp = new Scroll_Up(); MousePress mousePress = new MousePress(); MouseRelease mouseRelease = new MouseRelease(); MultipleSelection multipleSelection = new MultipleSelection(); Maximize maximize = new Maximize(); Minimize minimize = new Minimize(); Lock locking = new Lock(); Unlock unlocking = new Unlock(); Undo undo = new Undo(); Redo redo = new Redo(); Open open = new Open(); //defining the click actions QlikMove.StandardHelper.ActionCore.Action clickAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.SIMPLE_SELECTION, new ActionPart[1] { click }); this.AddAction(clickAction); //defining the mouse press actions QlikMove.StandardHelper.ActionCore.Action mousePressedAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.MOUSE_PRESS, new ActionPart[1] { mousePress }); this.AddAction(mousePressedAction); //defining the mouse release actions QlikMove.StandardHelper.ActionCore.Action mouseReleasedAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.MOUSE_RELEASE, new ActionPart[1] { mouseRelease }); this.AddAction(mouseReleasedAction); //defining the exit action QlikMove.StandardHelper.ActionCore.Action exitAction = new StandardHelper.ActionCore.Action(ActionName.EXIT, new ActionPart[1] { exit }); this.AddAction(exitAction); //defining the next action QlikMove.StandardHelper.ActionCore.Action nextAction = new StandardHelper.ActionCore.Action(ActionName.NEXT_TAB, new ActionPart[1] { next_tab }); this.AddAction(nextAction); //defining the previous action QlikMove.StandardHelper.ActionCore.Action previousAction = new StandardHelper.ActionCore.Action(ActionName.PREVIOUS_TAB, new ActionPart[1] { previous_tab }); this.AddAction(previousAction); //defining the menu action QlikMove.StandardHelper.ActionCore.Action tabsAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.MENU, new ActionPart[1] { wtab }); this.AddAction(tabsAction); //defining the idle action QlikMove.StandardHelper.ActionCore.Action idleAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.IDLE, new ActionPart[1] { idle }); this.AddAction(idleAction); //defining the next selection action QlikMove.StandardHelper.ActionCore.Action nextSelectionAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.NEXT_SELECTION, new ActionPart[1] { nextSelection }); this.AddAction(nextSelectionAction); //defining the previous selection action QlikMove.StandardHelper.ActionCore.Action previousSelectionAction = new QlikMove.StandardHelper.ActionCore.Action(ActionName.PREVIOUS_SELECTION, new ActionPart[1] { previousSelection }); this.AddAction(previousSelectionAction); //defining the scrolling down action QlikMove.StandardHelper.ActionCore.Action scrollDownAction = new StandardHelper.ActionCore.Action(ActionName.SCROLL_DOWN, new ActionPart[1] { scrollDown }); this.AddAction(scrollDownAction); //defining the scrolling up action QlikMove.StandardHelper.ActionCore.Action scrollUpAction = new StandardHelper.ActionCore.Action(ActionName.SCROLL_UP, new ActionPart[1] { scrollUp }); this.AddAction(scrollUpAction); //defining the multiple selection action QlikMove.StandardHelper.ActionCore.Action multipleSelectionAction = new StandardHelper.ActionCore.Action(ActionName.MULTIPLE_SELECTION, new ActionPart[1] { multipleSelection }); this.AddAction(multipleSelectionAction); //defining the maximize action QlikMove.StandardHelper.ActionCore.Action maximizeAction = new StandardHelper.ActionCore.Action(ActionName.MAX, new ActionPart[1] { maximize }); this.AddAction(maximizeAction); //defining the minimize action QlikMove.StandardHelper.ActionCore.Action minimizeAction = new StandardHelper.ActionCore.Action(ActionName.MIN, new ActionPart[1] { minimize }); this.AddAction(minimizeAction); //defining the clear action QlikMove.StandardHelper.ActionCore.Action clearAction = new StandardHelper.ActionCore.Action(ActionName.CLEAR, new ActionPart[1] { clear }); this.AddAction(clearAction); //defining the undo action QlikMove.StandardHelper.ActionCore.Action undoAction = new StandardHelper.ActionCore.Action(ActionName.UNDO, new ActionPart[1] { undo }); this.AddAction(undoAction); //defining the redo action QlikMove.StandardHelper.ActionCore.Action redoAction = new StandardHelper.ActionCore.Action(ActionName.REDO, new ActionPart[1] { redo }); this.AddAction(redoAction); //defining the locking action QlikMove.StandardHelper.ActionCore.Action lockingAction = new StandardHelper.ActionCore.Action(ActionName.LOCK, new ActionPart[1] { locking }); this.AddAction(lockingAction); //defining the unlocking action QlikMove.StandardHelper.ActionCore.Action unlockingAction = new StandardHelper.ActionCore.Action(ActionName.UNLOCK, new ActionPart[1] { unlocking }); this.AddAction(unlockingAction); //defining the close action QlikMove.StandardHelper.ActionCore.Action closeAction = new StandardHelper.ActionCore.Action(ActionName.CLOSE, new ActionPart[1] { close }); this.AddAction(closeAction); //defining the open action QlikMove.StandardHelper.ActionCore.Action openAction = new StandardHelper.ActionCore.Action(ActionName.OPEN, new ActionPart[1] { open }); this.AddAction(openAction); LogHelper.logInput("Actions defined", LogHelper.logType.INFO, this); }
public static void Initialize() { Main = MainMenu.AddMenu("ZLP Malzahar", "ZLP_Malzahar"); Main.AddLabel("Made by Zaloopa"); Main.AddSeparator(); Main.AddGroupLabel("Humanizer"); Main.Add("human", new CheckBox("Use Spell Humanizer")); MinDelay = Main.Add("min", new Slider("Min. Delay (ms)", 1, 0, 1000)); MaxDelay = Main.Add("max", new Slider("Max. Delay (ms)", 249, 0, 1000)); Main.AddGroupLabel("Q Hit Chance"); Main.Add("hit", new ComboBox("Hit Chance", 1, "Low", "Medium", "High")); Combo = Main.AddSubMenu("Combo & Harass"); { Combo.AddGroupLabel("Combo"); Combo.Add("Qc", new CheckBox("Use Q")); Combo.Add("Wc", new CheckBox("Use W")); Combo.Add("Ec", new CheckBox("Use E")); Combo.Add("Rc", new CheckBox("Use R")); Combo.AddGroupLabel("Harass"); Combo.Add("Qh", new CheckBox("Use Q")); Combo.Add("Wh", new CheckBox("Use W")); Combo.Add("Eh", new CheckBox("Use E")); HarassMana = Combo.Add("HarassMP", new Slider("Don't use spells if MP below {0}%", 40)); } Clear = Main.AddSubMenu("Lane & Jungle Clear"); { Clear.AddGroupLabel("Lane Clear"); Clear.Add("Qlc", new CheckBox("Use Q")); Clear.Add("Wlc", new CheckBox("Use W")); Clear.Add("Elc", new CheckBox("Use E")); LaneMana = Clear.Add("lcmp", new Slider("Don't use spells if MP below {0}%", 40)); Clear.AddGroupLabel("Jungle Clear"); Clear.Add("Qjc", new CheckBox("Use Q")); Clear.Add("Wjc", new CheckBox("Use W")); Clear.Add("Ejc", new CheckBox("Use E")); JungleMana = Clear.Add("jcmp", new Slider("Don't use spells if MP below {0}%", 40)); Clear.AddGroupLabel("Last Hit"); Clear.Add("Qlh", new CheckBox("Use Q")); Clear.Add("Elh", new CheckBox("Use E")); LastMana = Clear.Add("lhmp", new Slider("Don't use spells if MP below {0}%", 25)); } Misc = Main.AddSubMenu("Misc Settings"); { Misc.AddGroupLabel("Kill Steal"); Misc.Add("Q", new CheckBox("Use Q")); Misc.Add("E", new CheckBox("Use E")); Misc.Add("R", new CheckBox("Use R", false)); Misc.Add("ignite", new CheckBox("Use Ignite")); Misc.AddGroupLabel("Other Options"); Misc.Add("int", new CheckBox("Auto Q on interruptable spell", false)); } Draw = Main.AddSubMenu("Drawings"); { Draw.Add("draw", new CheckBox("Enable Drawings")); Draw.AddSeparator(); Draw.Add("Q", new CheckBox("Draw Q")); Draw.Add("W", new CheckBox("Draw W", false)); Draw.Add("E", new CheckBox("Draw E")); Draw.Add("R", new CheckBox("Draw R", false)); Draw.Add("ignite", new CheckBox("Draw Ignite", false)); Draw.AddSeparator(); Draw.Add("damage", new CheckBox("Damage Indicator")); } }
public async Task ClearAsync(Clear clear) { await _batch.ClearRectAsync(clear.X, clear.Y, clear.Width, clear.Height); }
public Form1() { //InitializeComponent(); // This is what we're going to attach the SDL2 window to gamePanel = new Panel(); gamePanel.Size = new Size(640, 480); gamePanel.Location = new Point(80, 10); // Make the WinForms window Size = new Size(800, 600); FormClosing += new FormClosingEventHandler(WindowClosing); Button button = new Button(); button.Text = "Whatever"; button.Location = new Point( (Size.Width / 2) - (button.Size.Width / 2), gamePanel.Location.Y + gamePanel.Size.Height + 10 ); button.Click += new EventHandler(ClickedButton); Controls.Add(button); Controls.Add(gamePanel); // IGNORE MEEEEE random = new Random(); SDL.SDL_Init(SDL.SDL_INIT_VIDEO); gameWindow = SDL.SDL_CreateWindow( String.Empty, 0, 0, gamePanel.Size.Width, gamePanel.Size.Height, SDL.SDL_WindowFlags.SDL_WINDOW_BORDERLESS | SDL.SDL_WindowFlags.SDL_WINDOW_OPENGL ); glContext = SDL.SDL_GL_CreateContext(gameWindow); glViewport = (Viewport)Marshal.GetDelegateForFunctionPointer( SDL.SDL_GL_GetProcAddress("glViewport"), typeof(Viewport) ); glClearColor = (ClearColor)Marshal.GetDelegateForFunctionPointer( SDL.SDL_GL_GetProcAddress("glClearColor"), typeof(ClearColor) ); glClear = (Clear)Marshal.GetDelegateForFunctionPointer( SDL.SDL_GL_GetProcAddress("glClear"), typeof(Clear) ); glViewport(0, 0, gamePanel.Size.Width, gamePanel.Size.Height); glClearColor(1.0f, 0.0f, 0.0f, 1.0f); glClear(0x4000); SDL.SDL_GL_SwapWindow(gameWindow); // Get the Win32 HWND from the SDL2 window SDL.SDL_SysWMinfo info = new SDL.SDL_SysWMinfo(); SDL.SDL_GetWindowWMInfo(gameWindow, ref info); IntPtr winHandle = info.info.win.window; // Move the SDL2 window to 0, 0 SetWindowPos( winHandle, Handle, 0, 0, 0, 0, 0x0401 // NOSIZE | SHOWWINDOW ); // Attach the SDL2 window to the panel SetParent(winHandle, gamePanel.Handle); ShowWindow(winHandle, 1); // SHOWNORMAL }
internal void Invoke(IActorFacade <IUserInfo> actor, IInnovatorTestRunSettings settings) { //a actor.ChecksThat(ServerLogState.ServerFileInfo("VersionServer.xml"), Is.Empty); //c actor.AttemptsTo(Open.Application.By(settings.ClientUrl), Actions.Chains.WaitChains.Wait.ForLoginPageLoading); //c.i actor.ChecksThat(TextContent.Of(LoginPageElements.InnovatorVersion), Is.EqualTo(logonFormLabel)); //c.ii actor.ChecksThat(HtmlAttribute.Of(LoginPageElements.UserNameInputField).Named("placeholder"), Is.EqualTo(usernameTip)); actor.ChecksThat(HtmlAttribute.Of(LoginPageElements.PasswordInputField).Named("placeholder"), Is.EqualTo(passwordTip)); //d, e actor.AttemptsTo(LogIn.ToInnovator.As(actor.ActorInfo)); CheckLoginIsSuccessful(actor); actor.ChecksThat(Page.Url, Is.EqualTo(string.Concat(settings.ClientUrl, "/"))); //f actor.AttemptsTo(Select.UserMenuItem.ByPath(UserMenuItems.AboutId)); //f.i var dialogContainer = PageElements.DialogsContainer; actor.ChecksThat(Visibility.Of(ArasDialogElements.Dialog(dialogContainer)), Is.True); //f.ii actor.ChecksThat( TextContent.Of(AboutDialogElements.VersionAndBuildNumber(dialogContainer)), x => Assert.AreEqual( FormattableString.Invariant( $"Aras Innovator Version {settings.InnovatorVersion.GetDescription()} Build: {settings.BuildNumber}"), x.Replace(" ", " ")) ); //g actor.AttemptsTo(Click.On(AboutDialogElements.OkButton(dialogContainer))); //h actor.AttemptsTo( Open.NavigationPanel, Pin.NavigationPanel ); //i actor.AttemptsTo( Open.SearchPanel.OfTocItemWithPath("Administration/Variable").ByLoupeIcon, Search.Simple.InMainGrid.With(searchData) ); //i.i CheckVariableValue(actor, "VersionBuild", settings.BuildNumber); CheckServicePackVersion(actor, settings); CheckVariableValue(actor, "VersionMinor", "0"); CheckVariableValue(actor, "VersionServiceUpdate", "0"); //j actor.AttemptsTo(LogOut.FromInnovator); //j.i actor.ChecksThat(Displayed.Of(LoginPageElements.InfoContentDescription), Is.True); actor.ChecksThat(TextContent.Of(LoginPageElements.InfoContentDescription), Is.EqualTo(loggedOutLabel)); //k actor.AttemptsTo(Click.On(LoginPageElements.LoginAgainButton)); //k.i var link = LoginPageElements.ArasLink; actor.AttemptsTo( Wait.UntilTargetIsPresent(LoginPageElements.LoginButton), Wait.UntilTargetIsClickable(link)); //l.i actor.ChecksThat(ServerLogState.ServerFileInfo("VersionServer.xml"), Is.Not.Empty); //m var initialTabHandle = actor.AsksFor(Page.WindowHandle); var newTabHandle = actor.AttemptsTo(Open.NewBrowserTab.ByClickOnLink(link)); actor.AttemptsTo(Switch.ToBrowserTab.WithHandle(newTabHandle)); actor.AttemptsTo(Wait.UntilQuestionIsAnswered(Page.Url, url => url != "about:blank")); //m.i actor.ChecksThat(Page.Url, x => StringAssert.StartsWith(ArasUrl, x)); //n actor.AttemptsTo(Close.BrowserTab.Current.ByButton, Switch.ToBrowserTab.WithHandle(initialTabHandle)); //o actor.AttemptsTo( Enter.TheNewValue(actor.ActorInfo.LoginName).Into(LoginPageElements.UserNameInputField), Enter.TheNewValue(string.Empty).Into(LoginPageElements.PasswordInputField)); actor.ChecksThat(JsScriptResult.For(opacityQuerySelectorScript), Is.EqualTo("0")); actor.AttemptsTo(CoreSelect.TheText(actor.ActorInfo.DatabaseName) .Into(LoginPageElements.DatabaseSelectField)); //p actor.AttemptsTo(Click.On(LoginPageElements.LoginButton)); //p.i CheckLoginFailed(actor); //q actor.AttemptsTo( Enter.TheNewValue(userName).Into(LoginPageElements.UserNameInputField), Enter.TheNewValue(actor.ActorInfo.Password).Into(LoginPageElements.PasswordInputField), CoreSelect.TheText(actor.ActorInfo.DatabaseName).Into(LoginPageElements.DatabaseSelectField) ); //r actor.AttemptsTo(Click.On(LoginPageElements.LoginButton)); //r.i CheckErrorMessage(actor, authFailedMessage); //s actor.AttemptsTo(Enter.TheNewValue("Admin").Into(LoginPageElements.UserNameInputField)); //t actor.AttemptsTo(Clear.TheValueOf(LoginPageElements.PasswordInputField)); //u actor.AttemptsTo(Set.NewValue("true").ForHtmlAttribute("data-tooltip-show") .OfTarget(LoginPageElements.PasswordFieldTooltip)); actor.AttemptsTo(Wait.UntilQuestionIsAnswered(JsScriptResult.For(opacityQuerySelectorScript), a => a.ToString() == "1")); actor.ChecksThat(HtmlAttribute.Of(LoginPageElements.PasswordFieldTooltip).Named("data-tooltip-show"), Is.EqualTo("true")); actor.ChecksThat(HtmlAttribute.Of(LoginPageElements.PasswordFieldTooltip).Named("data-tooltip"), x => Assert.IsTrue(x.StartsWith(capsIsOnMessage, false, CultureInfo.CurrentCulture))); actor.ChecksThat(JsScriptResult.For(opacityQuerySelectorScript), Is.EqualTo("1")); //v actor.AttemptsTo(Set.NewValue("false").ForHtmlAttribute("data-tooltip-show") .OfTarget(LoginPageElements.PasswordFieldTooltip)); actor.ChecksThat(HtmlAttribute.Of(LoginPageElements.PasswordFieldTooltip).Named("data-tooltip-show"), Is.EqualTo("false")); actor.ChecksThat(Visibility.Of(LoginPageElements.DatabaseSelectField), Is.True); actor.ChecksThat(Visibility.Of(LoginPageElements.LoginButton), Is.True); actor.AttemptsTo(Wait.UntilQuestionIsAnswered(JsScriptResult.For(opacityQuerySelectorScript), a => a.ToString() == "0")); //w actor.AttemptsTo(LogIn.ToInnovator.As(actor.ActorInfo)); CheckLoginIsSuccessful(actor); }
static void Encode(BinaryWriter writer, Clear o) { EncodeID(writer, typeof(Clear)); writer.Write((int)o.Mode); }
public void OnClear() { Clear.Invoke(); carrentCount = 0; }
//edit supplier private void btn_edit_Click(object sender, EventArgs e) { if (supplierId.HasValue && supplierId.Value > 0) { Supplier supplier = new Supplier(); supplier.Id = (int)supplierId; supplier.CompanyName = txt_name.Text; supplier.Address = txt_address.Text; supplier.Telephone = txt_telephone.Text; //Datagrid Selected row DataGridViewRow selectedRow = data_supplier_list.Rows[gridIndex]; if (supplier.validate(currentTel)) { String sqlString = "UPDATE suppliers SET company_name=@name, address=@address, telephone=@telephone WHERE id=@id"; using (SqlCommand cmmnd = new SqlCommand(sqlString, DB.connection)) { //sql bind param list cmmnd.Parameters.Add("@name", SqlDbType.VarChar).Value = supplier.CompanyName; cmmnd.Parameters.Add("@address", SqlDbType.Text).Value = supplier.Address; cmmnd.Parameters.Add("@telephone", SqlDbType.VarChar).Value = supplier.Telephone; cmmnd.Parameters.Add("@id", SqlDbType.Int).Value = supplierId; try { //Open DB Connection DB.connection.Open(); //Executing SQL Query cmmnd.ExecuteNonQuery(); //Updating patient row data selectedRow.Cells["companyName"].Value = supplier.CompanyName; selectedRow.Cells["address"].Value = supplier.Address; selectedRow.Cells["telephone"].Value = supplier.Telephone; supplierId = 0; MessageBox.Show("Supplier Updated successful"); Clear.ClearFormFields(this); } catch (SqlException ex) { throw new Exception(ex.Message); } finally { DB.connection.Close(); } } } else { MessageBox.Show(supplier.getError()); } } else { MessageBox.Show("Please select a supplier to edit"); } }
/// <summary> /// Creates a new instance of <see cref="EnterNewValue"/> /// </summary> /// <param name="target">The target</param> /// <param name="value">The value to enter into the target</param> public EnterNewValue(ITarget target, string value) : base(t => t.And(Clear.TheValueOf(target)).And(Enter.TheValue(value).Into(target))) { Target = target ?? throw new ArgumentNullException(nameof(target)); Value = value; }
protected override void DrawCore(RenderContext context, RenderDrawContext drawContext) { var viewport = drawContext.CommandList.Viewport; using (drawContext.PushRenderTargetsAndRestore()) { // Render Shadow maps shadowMapRenderer?.Draw(drawContext); if (VRSettings.Enabled && VRSettings.VRDevice != null) { var isFullViewport = (int)viewport.X == 0 && (int)viewport.Y == 0 && (int)viewport.Width == drawContext.CommandList.RenderTarget.ViewWidth && (int)viewport.Height == drawContext.CommandList.RenderTarget.ViewHeight; if (!isFullViewport) { return; } var hasPostEffects = PostEffects != null; // When we have post effect we need to bind a different framebuffer for each view to be sure effects impinge on the other view. Texture vrFullSurface; using (drawContext.PushRenderTargetsAndRestore()) { var currentRenderTarget = drawContext.CommandList.RenderTarget; var vrFullFrameSize = VRSettings.VRDevice.ActualRenderFrameSize; var desiredRenderTargetSize = !hasPostEffects ? vrFullFrameSize : new Size2(vrFullFrameSize.Width / 2, vrFullFrameSize.Height); if (hasPostEffects || desiredRenderTargetSize.Width != currentRenderTarget.Width || desiredRenderTargetSize.Height != currentRenderTarget.Height) { drawContext.CommandList.SetRenderTargets(null, null); // force to create and bind a new render target } PrepareRenderTargets(drawContext, desiredRenderTargetSize); //prepare the final VR target vrFullSurface = viewOutputTarget; if (hasPostEffects) { var frameSize = VRSettings.VRDevice.ActualRenderFrameSize; var renderTargetDescription = TextureDescription.New2D(frameSize.Width, frameSize.Height, 1, PixelFormat.R8G8B8A8_UNorm_SRgb, TextureFlags.ShaderResource | TextureFlags.RenderTarget); vrFullSurface = PushScopedResource(drawContext.GraphicsContext.Allocator.GetTemporaryTexture2D(renderTargetDescription)); } //draw per eye using (context.SaveViewportAndRestore()) using (drawContext.PushRenderTargetsAndRestore()) { ViewCount = 2; bool isWindowsMixedReality = false; for (var i = 0; i < 2; i++) { // For VR GraphicsPresenter such as WindowsMixedRealityGraphicsPresenter var graphicsPresenter = drawContext.GraphicsDevice.Presenter; if (graphicsPresenter.LeftEyeBuffer != null) { isWindowsMixedReality = true; MSAALevel = MultisampleCount.None; currentRenderTargets.Clear(); if (i == 0) { currentRenderTargets.Add(graphicsPresenter.LeftEyeBuffer); } else { currentRenderTargets.Add(graphicsPresenter.RightEyeBuffer); } } drawContext.CommandList.SetRenderTargets(currentDepthStencil, currentRenderTargets.Count, currentRenderTargets.Items); if (!hasPostEffects && !isWindowsMixedReality) // need to change the viewport between each eye { var frameSize = VRSettings.VRDevice.ActualRenderFrameSize; drawContext.CommandList.SetViewport(new Viewport(i * frameSize.Width / 2, 0, frameSize.Width / 2, frameSize.Height)); } else if (i == 0) // the viewport is the same for both eyes so we set it only once { drawContext.CommandList.SetViewport(new Viewport(0.0f, 0.0f, VRSettings.VRDevice.ActualRenderFrameSize.Width / 2.0f, VRSettings.VRDevice.ActualRenderFrameSize.Height)); } using (context.PushRenderViewAndRestore(VRSettings.RenderViews[i])) { // Clear render target and depth stencil if (hasPostEffects || i == 0) // need to clear for each eye in the case we have two different render targets { Clear?.Draw(drawContext); } ViewIndex = i; DrawView(context, drawContext, i, 2); if (hasPostEffects) // copy the rendered view into the vr full view framebuffer { drawContext.CommandList.CopyRegion(viewOutputTarget, 0, null, vrFullSurface, 0, VRSettings.VRDevice.ActualRenderFrameSize.Width / 2 * i); } } } if (VRSettings.VRDevice.SupportsOverlays) { foreach (var overlay in VRSettings.Overlays) { if (overlay != null && overlay.Texture != null) { overlay.Overlay.UpdateSurface(drawContext.CommandList, overlay.Texture); } } } VRSettings.VRDevice.Commit(drawContext.CommandList, vrFullSurface); } } //draw mirror to backbuffer (if size is matching and full viewport) if (VRSettings.CopyMirror) { CopyOrScaleTexture(drawContext, VRSettings.VRDevice.MirrorTexture, drawContext.CommandList.RenderTarget); } else if (hasPostEffects) { CopyOrScaleTexture(drawContext, vrFullSurface, drawContext.CommandList.RenderTarget); } } else { PrepareRenderTargets(drawContext, new Size2((int)viewport.Width, (int)viewport.Height)); ViewCount = 1; ViewIndex = 0; //var sssMaterialIndexRenderTarget = GenerateSSSMaterialIndexRenderTarget(context, viewport); using (drawContext.PushRenderTargetsAndRestore()) { drawContext.CommandList.SetRenderTargets(currentDepthStencil, currentRenderTargets.Count, currentRenderTargets.Items); // Clear render target and depth stencil Clear?.Draw(drawContext); DrawView(context, drawContext, 0, 1); } } } // Clear intermediate results currentRenderTargets.Clear(); currentRenderTargetsNonMSAA.Clear(); currentDepthStencil = null; currentDepthStencilNonMSAA = null; }
private void butClear_Click(object sender, EventArgs e) { // Limpa os dados Clear.Tile((byte)scrlTile.Value); }
public static void SetupMenu() { SpellList.Add(SpellOption.Q); SpellList.Add(SpellOption.W); SpellList.Add(SpellOption.E); SpellList.Add(SpellOption.R); RyzeMenu = MainMenu.AddMenu("Ryze", "Ryze"); MainMenu.OnClose += Setup; // Combo Menu ------------------------------------------------------------------------------------------------------------------- ComboM = RyzeMenu.AddSubMenu("Combo"); // Use in Combo ComboM.Add("Q", new CheckBox("Use Q")); ComboM.Add("W", new CheckBox("Use W")); ComboM.Add("E", new CheckBox("Use E")); ComboM.Add("R", new CheckBox("Use R")); ComboM.Add("Combo", new ComboBox("Combo Modus", 0, "EW", "EQ")); // Combo Settings ComboM.AddSeparator(); ComboM.Add("QPred", new Slider("QPrediction Hitchance", 80, 0, 100)); // Q Hit Chance // Drawings Menu ---------------------------------------------------------------------------------------------------------------- Drawings = RyzeMenu.AddSubMenu("Drawings", "Drawings"); Drawings.AddLabel("Draw Skill Range:"); foreach (var Item in SpellList) { Drawings.Add(Item.Slot.ToString(), new CheckBox("Draw " + Item.Slot.ToString() + " Range")); } Drawings.AddSeparator(); Drawings.AddLabel("Mark Enemys:"); Drawings.Add("DrawKillable", new CheckBox("Mark Killable Enemys", true)); Drawings.Add("DrawKillable", new CheckBox("Draw Enemys Attack Range", false)); // Main Menu ------------------------------------------------------------------------------------------------------------------- RyzeMenu.AddLabel("Activate Script", 25); RyzeMenu.Add("Activate", new CheckBox("Activate Script", true)); RyzeMenu.AddSeparator(); RyzeMenu.AddLabel("Delay between Spells:"); RyzeMenu.Add("DelayMin", new Slider("Minimum Delay", 20, 0, 1000)); RyzeMenu.Add("DelayMax", new Slider("Maximum Delay", 120, 0, 1000)); RyzeMenu.AddSeparator(); RyzeMenu.AddLabel("Automatic Killsteal Mode", 25); RyzeMenu.Add("Steal", new CheckBox("Killsteal", false)); RyzeMenu.AddLabel("Kill Steal Spells", 25); RyzeMenu.Add("StealQ", new CheckBox("Use Q For KS", true)); RyzeMenu.Add("StealE", new CheckBox("Use E For KS", true)); RyzeMenu.AddSeparator(); RyzeMenu.AddLabel("Auto Stack Tear"); RyzeMenu.Add("AutoStack", new KeyBind("AutoStackTear", false, KeyBind.BindTypes.PressToggle, 'Y')); // Clear Mode Clear = RyzeMenu.AddSubMenu("ClearMode", "ClearMode"); Clear.AddLabel("Use Spells in ClearMode"); Clear.Add("UseQ", new CheckBox("Use Q", true)); Clear.Add("UseE", new CheckBox("Use E", true)); Clear.Add("UseW", new CheckBox("Use W", false)); Clear.AddSeparator(); Clear.AddLabel("Clear Mode Minimum Mana"); Clear.Add("Mana", new Slider("Minimum Mana", 20, 0, 100)); // Flee Mode -------------------------------------------------------------------------------------------------------------------- Flee = RyzeMenu.AddSubMenu("FleeMode", "FleeMode"); Flee.AddLabel("The Flee Mode will Port you to the furthest Tower in Range."); Flee.AddLabel("If no Tower is in Range it will Port in Direction of your Base"); Flee.AddSeparator(); Flee.Add("Zhonyas", new CheckBox("Use Zhonyas")); Flee.Add("Seraphen", new CheckBox("Use Seraphen")); // Auto Shield ------------------------------------------------------------------------------------------------------------------ AutoShield = RyzeMenu.AddSubMenu("AutoShield", "AutoShield"); AutoShield.AddLabel("Automatic Shield if you get attacked and get low Life"); AutoShield.Add("Active", new CheckBox("Activate AutoShield Mode", true)); AutoShield.AddSeparator(); AutoShield.AddLabel("Use Items:", 25); AutoShield.Add("Zhonyas", new CheckBox("Use Zhonyas", true)); AutoShield.Add("Seraphen", new CheckBox("Use Seraphen", true)); AutoShield.AddSeparator(); AutoShield.Add("Prozent", new Slider("Use Shield at % HP", 20, 0, 100)); }
void CreateToolbar(FlexChart chart) { _ts = new ToolStrip(); _ts.GripStyle = ToolStripGripStyle.Hidden; var btnShow = new ToolStripButton("<"); btnShow.ToolTipText = "Show/hide toolbar"; btnShow.Click += (s, e) => { if (_ts.Dock == DockStyle.Top) { btnShow.Text = ">"; _ts.Dock = DockStyle.None; for (var i = 1; i < _ts.Items.Count; i++) { _ts.Items[i].Visible = false; } } else { btnShow.Text = "<"; _ts.Dock = DockStyle.Top; for (var i = 1; i < _ts.Items.Count; i++) { _ts.Items[i].Visible = true; } UpdateVisibility(); } }; _ts.Items.Add(btnShow); // -- btnEl = new ToolStripSplitButton(); foreach (var dt in new DrawingType[] { DrawingType.Marker, DrawingType.Line, DrawingType.Rectangle, DrawingType.Text, DrawingType.Ellipse, DrawingType.None, DrawingType.MovingAverage, DrawingType.Fibonacci }) { if (dt == DrawingType.None) { btnEl.DropDownItems.Add(new ToolStripSeparator()); } else { var item = btnEl.DropDownItems.Add(dt.ToString()); item.Image = GetIcon(item.Text.ToLower()); } } btnEl.DropDownItemClicked += (s, e) => { _options.DrawingType = (DrawingType)Enum.Parse(typeof(DrawingType), e.ClickedItem.Text); if (Add != null) { Add.Invoke(this, EventArgs.Empty); } }; btnEl.Text = "Add"; btnEl.Image = GetIcon("add"); AddSplitButton(btnEl); _ts.Items.Add(new ToolStripSeparator()); btnRemove = new ToolStripButton("", GetIcon("remove")) { ToolTipText = "Delete selected drawing" }; btnRemove.Click += (s, e) => { if (Remove != null) { Remove.Invoke(this, EventArgs.Empty); } }; _ts.Items.Add(btnRemove); btnClear = new ToolStripButton("", GetIcon("clear")) { ToolTipText = "Delete all drawings" }; btnClear.Click += (s, e) => { if (Clear != null) { Clear.Invoke(this, EventArgs.Empty); } }; _ts.Items.Add(btnClear); UpdateVisibility(); chart.Controls.Add(_ts); }
void Start() { instance = this; HideDialoge(); }
private void clearDeleteUser_Click(object sender, EventArgs e) { Clear.AllTextBoxesAndComboBoxes(this.deleteUser_groupBox); }
void Start() { //a = false; feverGauge = GameObject.Find("clear").GetComponent <Clear>(); //b = false; }
private void clearUserToRole_btn_Click(object sender, EventArgs e) { Clear.AllTextBoxesAndComboBoxes(this.userToRole_groupBox); }
public void createDrawble(string text) { string command = extractCommand(text); switch (command) { case "draw": { Draw.Execute(text, control); OnChangeViewList(); break; } case "connect": { Connect.Execute(text, control); break; } case "rotate": { //requires object info, because to rotate you must redraw the object with new rotation. OnClear(); Rotate.Execute(text, control); OnChangeViewList(); break; } case "clear": { Clear.Execute(); //clears the borad and redraws it with a delegate OnClear(); //Update the List // clears it OnChangeViewList(); break; } case "delete": { // only clears the Canvas not thing stored OnClear(); Delete.Execute(text, control); //Update the List // clears it OnChangeViewList(); break; } case "edit": { // only clears the Canvas not thing stored OnClear(); Delete.Execute(text, control); //Update the List // clears it OnChangeViewList(); break; } } }
private void ClearAll() { Clear.AllTextBoxesAndComboBoxes(this.createUser_groupBox); Clear.AllTextBoxesAndComboBoxes(this.deleteUser_groupBox); Clear.AllTextBoxesAndComboBoxes(this.userToRole_groupBox); }
public MainArgs(List<Object> param, Clear clearScreen, PropertyChanged sender) { this.param = param; clear = clearScreen; Sender = sender; }
private void clearCreateNewUser_btn_Click(object sender, EventArgs e) { Clear.AllTextBoxesAndComboBoxes(this.createUser_groupBox); }
public void ChangeButton(string name, List<Object> o, Clear c) { ChangeButton(name, o, c, null); }
private static void OnGalioLoad(EventArgs args) { if (Player.Instance.ChampionName == "Galio") { if (Player.Instance.ChampionName != "Galio") { return; } } Q = new Spell.Skillshot(SpellSlot.Q, 825, SkillShotType.Circular, 250, 500, 400); W = new Spell.Chargeable(SpellSlot.W, 275, 450, 0); E = new Spell.Skillshot(SpellSlot.E, 600, SkillShotType.Linear, 250, 300, 150) { AllowedCollisionCount = 1 }; R = new Spell.Skillshot(SpellSlot.R, 4000, SkillShotType.Circular); menu = MainMenu.AddMenu("Galio", "Galio"); // prediction = menu.AddSubMenu("-> Prediction"); prediction.AddLabel("--> Prediction <--"); prediction.Add("Qhit", new Slider("HitChance --> Q", 75, 1, 100)); prediction.Add("Ehit", new Slider("HitChance --> E", 50, 1, 100)); prediction.AddSeparator(); prediction.AddLabel("Change combo? Not recommended"); prediction.Add("HitBox", new ComboBox("Combos", 0, "Q -> E -> W -> R", "W Rage -> Q -> E")); prediction.AddSeparator(); prediction.AddLabel("The 2nd combo is still not working trying to solve the problem"); // Combo = menu.AddSubMenu("-> Combo"); Combo.AddLabel("--> Combo < --"); Combo.Add("Qc", new CheckBox("Q -> Combo")); Combo.Add("Wc", new CheckBox("W -> Combo")); Combo.Add("Ec", new CheckBox("E -> Combo")); Combo.Add("Rc", new CheckBox("R -> Combo", false)); Combo.AddSeparator(); Combo.AddLabel("[R] Settings"); Combo.Add("CorretCurso", new Slider("How would you like to use Uti?", 800, 1, 2000)); Combo.Add("UtiEnemy", new Slider("Minimum of Enemies", 2, 1, 5)); // Harass = menu.AddSubMenu("-> Harass"); Harass.AddLabel("--> Harass < --"); Harass.Add("Hq", new CheckBox("Q -> Harass")); Harass.Add("He", new CheckBox("E -> Harass", false)); Harass.AddSeparator(); Harass.AddLabel("Harass Mana"); Harass.Add("Hqm", new Slider("Mana -> [Q]", 50, 1, 100)); Harass.Add("Hem", new Slider("Mana -> [E]", 70, 1, 100)); // Clear = menu.AddSubMenu("-> Clear"); Clear.AddLabel("--> LaneClear and JungleClear < --"); Clear.Add("Lq", new CheckBox("Q -> LaneClear")); Clear.Add("Jq", new CheckBox("Q -> JungleClear")); Clear.AddSeparator(); Clear.AddLabel("-> Clear Mana <-"); Clear.Add("Lqm", new Slider("Mana [Q]", 50, 1, 100)); Clear.AddLabel("Jungle"); Clear.Add("Jqm", new Slider("Mana [Q]", 50, 1, 100)); // Automatic = menu.AddSubMenu("-> Automatic"); Automatic.AddLabel("--> Automatic < --"); Automatic.Add("Ruti", new CheckBox("R -> Ally")); Automatic.Add("Re", new CheckBox("R -> Automatic")); // Drawings = menu.AddSubMenu("-> Drawing"); Drawings.AddLabel("--> Drawing < --"); Drawings.Add("Dq", new CheckBox("Q -> Drawing")); Drawings.Add("Dw", new CheckBox("W -> Drawing")); Drawings.Add("De", new CheckBox("E -> Drawing")); Drawings.Add("Dr", new CheckBox("R -> Drawing")); Drawing.OnDraw += OnDrawing; Game.OnTick += OnTick; }