/// <summary> /// Unselect this button /// </summary> public void Unselect() { this.isSelected = false; Deactivate.Begin(); buttonBorder.BorderThickness = new Thickness(0); buttonBorderRight.BorderThickness = new Thickness(0); buttonBorder.Background = new SolidColorBrush(); ButtonTextBlock.Foreground = new SolidColorBrush(Colors.Black); }
private void OnSelect() { Deactivate.Invoke(); border.GetComponent <Image>().enabled = true; EquipmentManager.character = character; EquipmentManager.armor.ImageSwitch(); EquipmentManager.weapon.ImageSwitch(); }
void ToolbarButton_MouseLeave(object sender, MouseEventArgs e) { if (!isSelected) { Deactivate.Begin(); buttonBorder.BorderThickness = new Thickness(0); buttonBorderRight.BorderThickness = new Thickness(0); buttonBorder.Background = new SolidColorBrush(); ButtonTextBlock.Foreground = new SolidColorBrush(Colors.Black); } }
private void end() { switch (action) { case Action.Take: takeState = Take.End; break; case Action.Activate: activateState = Activate.End; break; case Action.Deactivate: deactivateState = Deactivate.End; break; case Action.Release: releaseState = Release.End; break; case Action.Taste: tasteState = Taste.End; break; case Action.Smell: smellState = Smell.End; break; case Action.Move: moveState = Move.End; break; case Action.Rotate: rotateState = Rotate.End; break; case Action.Turn: turnState = Turn.End; break; case Action.HeadFocus: headFocusState = HeadFocus.End; break; case Action.HeadReset: headResetState = HeadReset.End; break; case Action.LookFor: lookForState = LookFor.End; break; case Action.Speak: speakState = Speak.End; break; case Action.Cancel: cancelState = Cancel.End; break; case Action.GetSenses: getSensesState = GetSenses.End; break; default: break; ; } }
public void Switch() { if (activeTurn) { Activate?.Invoke(); } else { Deactivate?.Invoke(); } activeTurn = !activeTurn; }
public async Task DeleteAccount(Deactivate request) { if (ModelState.IsValid) { var accounts = await GetActor <AccountCoordinator>(); accounts.Tell(new AccountCommands.DeactivateAccount(request.AccountId), ActorRefs.NoSender); } else { throw new HttpResponseException(HttpStatusCode.BadRequest); } }
public void Initialize() { button = GetComponent <Button>(); button.onClick.AddListener(OnSelect); border = new GameObject("border"); Image img = border.AddComponent(typeof(Image)) as Image; img.sprite = Resources.Load <Sprite>("Sprites/border"); border.transform.SetParent(this.gameObject.transform); RectTransform rec = border.GetComponent <RectTransform>(); rec.anchoredPosition = Vector2.zero; rec.localScale = Vector2.one; Deactivate += lambda = () => { border.GetComponent <Image>().enabled = false; }; Deactivate.Invoke(); }
public void Startup() { Form = new Form(); Form.Activated += (sender, e) => Activated?.Invoke(sender, e); Form.Deactivate += (sender, e) => Deactivate?.Invoke(sender, e); Form.FormClosed += (sender, e) => Closed?.Invoke(sender, e); RenderControl = new GlControl(); Form.SuspendLayout(); // // RenderControl // RenderControl.Animation = true; RenderControl.AnimationTimer = false; RenderControl.BackColor = System.Drawing.Color.DimGray; RenderControl.ColorBits = 24u; RenderControl.DepthBits = 0u; RenderControl.Dock = DockStyle.Fill; RenderControl.Location = new System.Drawing.Point(0, 0); RenderControl.MultisampleBits = 0u; RenderControl.Name = "RenderControl"; RenderControl.Size = new System.Drawing.Size(731, 428); RenderControl.StencilBits = 0u; RenderControl.TabIndex = 0; RenderControl.ContextCreated += RenderControl_ContextCreated; RenderControl.ContextDestroying += (sender, e) => ContextDestroying?.Invoke(sender, e); RenderControl.Render += (sender, e) => Render?.Invoke(sender, e); RenderControl.ContextUpdate += (sender, e) => Update?.Invoke(sender, e); RenderControl.SizeChanged += RenderControl_SizeChanged; Form.Controls.Add(RenderControl); Form.ResumeLayout(false); Form.Show(); WorldMatrix = Matrix.OrthoRH(-1000.0f, 1000.0f, -1000.0f, 1000.0f, -1000.0f, 1000.0f); //WorldMatrix = Matrix.Translation(0, 0, 0); }
IEnumerable<Event> Handle(Deactivate cmd) { CheckIsActive(); yield return new InventoryItemDeactivated(); }
internal virtual void OnDeactivate(Toplevel activated) { Deactivate?.Invoke(activated); }
/// <inheritdoc /> public async Task DeactivateAsync(bool activatedBefore) { await Xamarin.Forms.Application.Current.MainPage.DisplayAlert("Deactivating", "Deactivating", "OK"); Deactivate?.Invoke(this, activatedBefore); }
public void Process(Deactivate message) { IsActive = false; }
public void Process(Deactivate message) { }
private void Form_Deactivate(object sender, EventArgs e) { Deactivate?.Invoke(sender, e); }
private void DeactivateCmd(Deactivate cmd) { Context.Stop(Self); }
private void changeStatus(int value) { if (commandStatus != CommandStatus.Fail && commandStatus != CommandStatus.Success) { switch (action) { case Action.Take: if (takeState != Take.End) takeState+=value; break; case Action.Activate: if (activateState != Activate.End) activateState += value; break; case Action.Deactivate: if (deactivateState != Deactivate.End) deactivateState += value; break; case Action.Release: if (releaseState != Release.End) releaseState += value; break; case Action.Taste: if (tasteState != Taste.End) tasteState += value; break; case Action.Smell: if (smellState != Smell.End) smellState += value; break; case Action.Move: if (moveState != Move.End) moveState+=value; break; case Action.Rotate: if (rotateState != Rotate.End) rotateState+=value; break; case Action.Turn: if (turnState != Turn.End) turnState+=value; break; case Action.HeadFocus: if (headFocusState != HeadFocus.End) headFocusState+=value; break; case Action.HeadReset: if (headResetState != HeadReset.End) headResetState+=value; break; case Action.LookFor: if (lookForState != LookFor.End) lookForState += value; break; case Action.Speak: if (speakState != Speak.End) speakState += value; break; case Action.Cancel: if (cancelState != Cancel.End) cancelState += value; break; case Action.GetSenses: if (getSensesState != GetSenses.End) getSensesState += value; break; default: break; } commandStatus = CommandStatus.Running; } }
protected virtual void OnLostFocus(object sender, EventArgs e) { Deactivate?.Invoke(this, EventArgs.Empty); Leave?.Invoke(this, EventArgs.Empty); }
void On(Deactivate q) => Activation.DeactivateOnIdle();
void ToolbarButton_MouseLeave(object sender, MouseEventArgs e) { Deactivate.Begin(); SetToolbarZIndex(0); }