private void BtnDeleteStateChainStateClick(object sender, EventArgs e)
        {
            CurrentStateChain.StateChainStates.Remove(CurrentStateChainState);

            CurrentStateChainState = null;

            UpdateToCurrentStateChainState();

            SaveToProperty();
        }
 private void LbStatesSelectedValueChanged(object sender, EventArgs e)
 {
     if (lbStates.SelectedItem != null)
     {
         btnDeleteStateChainState.Enabled = true;
         CurrentStateChainState           = (StateChainState)lbStates.SelectedItem;
     }
     else
     {
         btnMoveUpStateChainState.Enabled = false;
         CurrentStateChainState           = null;
     }
 }
        private void BtnAddStateChainStateClick(object sender, EventArgs e)
        {
            var newStateChainState = new StateChainState {
                State = CurrentEntitySave.States.Count > 0 ? CurrentEntitySave.States[0].Name : ""
            };

            CurrentStateChain.StateChainStates.Add(newStateChainState);

            UpdateToCurrentStateChain();

            lbStates.SelectedItem = newStateChainState;

            SaveToProperty();
        }
 private void LbStatesSelectedValueChanged(object sender, EventArgs e)
 {
     if (lbStates.SelectedItem != null)
     {
         btnDeleteStateChainState.Enabled = true;
         CurrentStateChainState = (StateChainState)lbStates.SelectedItem;
     }
     else
     {
         btnMoveUpStateChainState.Enabled = false;
         CurrentStateChainState = null;
     }
 }
        private void BtnDeleteStateChainStateClick(object sender, EventArgs e)
        {
            CurrentStateChain.StateChainStates.Remove(CurrentStateChainState);

            CurrentStateChainState = null;

            UpdateToCurrentStateChainState();

            SaveToProperty();
        }
        private void BtnAddStateChainStateClick(object sender, EventArgs e)
        {
            var newStateChainState = new StateChainState {State = CurrentEntitySave.States.Count > 0 ? CurrentEntitySave.States[0].Name : ""};

            CurrentStateChain.StateChainStates.Add(newStateChainState);

            UpdateToCurrentStateChain();

            lbStates.SelectedItem = newStateChainState;

            SaveToProperty();
        }