コード例 #1
0
        private void DrawWatchedStores()
        {
            var                  name   = string.Empty;
            IVariableStore       add    = null;
            VariableStoreControl remove = null;

            foreach (var watched in _watchedStores)
            {
                watched.Draw();

                if (watched.Selected != null)
                {
                    name = watched.SelectedName;
                    add  = watched.Selected;
                }

                if (watched.ShouldClose)
                {
                    remove = watched;
                }
            }

            if (add != null)
            {
                AddWatch(name, add);
            }

            if (remove != null)
            {
                RemoveWatch(remove);
            }
        }
コード例 #2
0
        private void AddWatch(string name, IVariableStore store)
        {
            var control = new VariableStoreControl();

            control.Setup(name, store, false, true);
            _watchedStores.Add(control);
        }
コード例 #3
0
 private void UpdateGlobalStore()
 {
     if (CompositionManager.Exists && (_globalStore == null || _globalStore.Store != CompositionManager.Instance.GlobalStore))
     {
         _globalStore = new VariableStoreControl();
         _globalStore.Setup(CompositionManager.GlobalStoreName, CompositionManager.Instance.GlobalStore, false, false);
     }
 }
コード例 #4
0
 private void PlayModeStateChanged(PlayModeStateChange state)
 {
     if (state == PlayModeStateChange.ExitingPlayMode)
     {
         _globalStore = null;
         _instructionStores.Clear();
         _watchedStores.Clear();
     }
 }
コード例 #5
0
        private void UpdateInstructionStores()
        {
            if (CompositionManager.Exists)
            {
                for (var i = 0; i < _instructionStores.Count; i++)
                {
                    if (!CompositionManager.TrackingState.Any(data => data.Key.Variables == _instructionStores[i].Store))
                    {
                        _instructionStores.RemoveAt(i--);
                    }
                }

                foreach (var instruction in CompositionManager.TrackingState)
                {
                    if (!_instructionStores.Any(control => control.Store == instruction.Key.Variables))
                    {
                        var control = new VariableStoreControl();
                        control.Setup(instruction.Key.name, instruction.Key.Variables, true, false);
                        _instructionStores.Add(control);
                    }
                }
            }
        }
コード例 #6
0
 private void RemoveWatch(VariableStoreControl control)
 {
     _watchedStores.RemoveAll(c => c == control);
 }