Beispiel #1
0
        public void RemoveMood(MoodWrapper wrapper)
        {
            int index = Moods.IndexOf(wrapper);

            foreach (ActionWrapper action in Actions)
            {
                action.Nodes.RemoveAt(index);
            }
            Moods.RemoveAt(index);
            SetPositions();
        }
Beispiel #2
0
        private void AssignMood(MoodWrapper wrapper)
        {
            int index = Moods.IndexOf(wrapper);

            foreach (ActionWrapper action in Actions)
            {
                if (index >= 0)
                {
                    action.Nodes[index].SetMood(wrapper.Mood);
                }
            }
        }
Beispiel #3
0
        public void AddMood()
        {
            MoodWrapper newWrapper = new MoodWrapper(_currentID);

            Moods.Add(newWrapper);
            _currentID++;
            newWrapper.OnMoodChanged += AssignMood;
            foreach (ActionWrapper wrapper in Actions)
            {
                Node newNode = CreateNode();
                newNode.SetAction(wrapper.Action);
                wrapper.Nodes.Add(newNode);
            }
            SetPositions();
        }