public void AddPageLink(ref Panel div, string aPageUrl, Dictionary <object, object> dicUrlElement) { dicUrlElement.Add("page", 1); if (this._iPageIndex != _FirstPage) { dicUrlElement.Remove("page"); dicUrlElement.Add("page", 1); div.Controls.Add(Add("首页", aPageUrl, dicUrlElement)); dicUrlElement.Remove("page"); dicUrlElement.Add("page", this.iPageIndex - 1); div.Controls.Add(Add("上一页", aPageUrl, dicUrlElement)); } if (this._iPageIndex != this.sPageNum) { dicUrlElement.Remove("page"); dicUrlElement.Add("page", this.iPageIndex + 1); div.Controls.Add(Add("下一页", aPageUrl, dicUrlElement)); dicUrlElement.Remove("page"); dicUrlElement.Add("page", this.sPageNum); div.Controls.Add(Add("末页", aPageUrl, dicUrlElement)); } div.Controls.Add(BaseControls.GetLabelValue(string.Concat("总记录:", this.sRecNum))); div.Controls.Add(BaseControls.GetLabelValue(string.Concat("共", this.sPageNum, "页"))); }
private Label Add(string aPageName, string aPageUrl, Dictionary <object, object> dicUrlElement) { Label oLabel = BaseControls.GetLabelValue("", 50, 20); HyperLink oTmp = BaseControls.GetHyperLink(aPageName, aPageUrl, dicUrlElement); oLabel.Controls.Add(oTmp); return(oLabel); }
private void Awake() { controls = new BaseControls(); controls.Planning.Position.performed += ctx => mousePos = ctx.ReadValue <Vector2>(); controls.Planning.Place.performed += ctx => PlaceCurrent(); construction = terrain.GetComponent <ConstructionSite>(); }
public void SetControls(BaseControls controls) { if (current != null) current.OnDisable(); current = controls; current.OnEnable(); needsReset = true; }
void Awake() { currentMode = Mode.Plan; SelectCurrentMode(); // Sets up input system. controls = new BaseControls(); controls.Navigation.ModeShift.performed += ctx => ModeShift(ctx.ReadValue <float>()); }
private void BtnCloseWarnignClick(object sender, EventArgs e) { _timerSound.Stop(); _timerResendOrder.Stop(); Height = 0; Enabled = false; Visible = false; BaseControls.DeactivateFailedCloseOrderWarning(); }
private void Awake() { background = transform.Find("Background").GetComponent <RectTransform>(); tooltipTextbox = transform.Find("Text (TMP)").GetComponent <TextMeshProUGUI>(); Hide(); // Unity New Input System actions controls = new BaseControls(); // Track mouse position controls.Navigation.PointerLocation.performed += ctx => mousePos = ctx.ReadValue <Vector2>(); }
void Awake() { // Unity New Input System actions controls = new BaseControls(); // OrbitShift input toggles orbit mode controls.Navigation.OrbitShift.performed += ctx => ToggleOrbit(); // Movement inputs are processed in DefaultHandler (called by Update) controls.Navigation.Movement.performed += ctx => moveInput = ctx.ReadValue <Vector2>(); // Mouse position and delta are processed in MouseHandler (called by Update) controls.Navigation.PointerLocation.performed += ctx => mousePos = ctx.ReadValue <Vector2>(); controls.Navigation.PointerDelta.performed += ctx => mouseDelta = ctx.ReadValue <Vector2>(); // Starting and holding zoom inputs are processed in Update. Note that Zoom needs a "Release Only" interaction, which will perform a value of 0, to end zooming. controls.Navigation.Zoom.started += ctx => zoomAmount = ctx.ReadValue <float>(); controls.Navigation.Zoom.performed += ctx => zoomAmount = ctx.ReadValue <float>(); cam = GetComponent <Camera>(); }
private void TimerResendOrderTick(object sender, EventArgs e) { BaseControls.BtnOperationClick(BtnClosePosition, new EventArgs()); Data.SoundError.Play(); }