/// <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);
 }
Ejemplo n.º 2
0
    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);
     }
 }
Ejemplo n.º 4
0
 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; ;
     }   
 }
Ejemplo n.º 5
0
    public void Switch()
    {
        if (activeTurn)
        {
            Activate?.Invoke();
        }
        else
        {
            Deactivate?.Invoke();
        }

        activeTurn = !activeTurn;
    }
Ejemplo n.º 6
0
        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);
            }
        }
Ejemplo n.º 7
0
    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();
    }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        IEnumerable<Event> Handle(Deactivate cmd)
        {
            CheckIsActive();

            yield return new InventoryItemDeactivated();
        }
Ejemplo n.º 10
0
 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);
        }
Ejemplo n.º 12
0
 public void Process(Deactivate message)
 {
     IsActive = false;
 }
Ejemplo n.º 13
0
 public void Process(Deactivate message)
 {
 }
Ejemplo n.º 14
0
 private void Form_Deactivate(object sender, EventArgs e)
 {
     Deactivate?.Invoke(sender, e);
 }
Ejemplo n.º 15
0
 private void DeactivateCmd(Deactivate cmd)
 {
     Context.Stop(Self);
 }
Ejemplo n.º 16
0
 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;
     }
 }
Ejemplo n.º 17
0
 protected virtual void OnLostFocus(object sender, EventArgs e)
 {
     Deactivate?.Invoke(this, EventArgs.Empty);
     Leave?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 18
0
 void On(Deactivate q) => Activation.DeactivateOnIdle();
Ejemplo n.º 19
0
 void ToolbarButton_MouseLeave(object sender, MouseEventArgs e)
 {
     Deactivate.Begin();
     SetToolbarZIndex(0);
 }