Ejemplo n.º 1
0
 private void resetInputGroupsExpandedState(InputGroups groups)
 {
     if (sensationHasChanged_ || inputGroupsExpandedState_.Count == 0)
     {
         inputGroupsExpandedState_.Clear();
         foreach (var group in groups)
         {
             inputGroupsExpandedState_[group.Name] = false;
         }
     }
 }
Ejemplo n.º 2
0
        private void AddInputsSection()
        {
            AddInputsHeader();

            InputGroups inputGroups = GetInputGroupsOfCurrentSensation();

            resetInputGroupsExpandedState(inputGroups);

            foreach (var inputGroup in inputGroups)
            {
                AddInputGroup(inputGroup);
            }
        }
Ejemplo n.º 3
0
        public Script(Script script)
        {
            Id          = script.Id;
            Runner      = script.Runner;
            InputGroups = script.InputGroups.Select(g => new InputGroup(g, false)).ToObservableCollection();  // don't reset the group ID or input IDs. we're copying the script to run it.

            // update input object references within any display conditions
            Input[] allInputs = InputGroups.SelectMany(group => group.Inputs).ToArray();
            foreach (InputGroup inputGroup in InputGroups)
            {
                inputGroup.UpdateDisplayConditionInputs(allInputs);
            }

            ScheduledRunTime = script.ScheduledRunTime;
            RunTime          = script.RunTime;
            PreviousDatum    = script.PreviousDatum;
            CurrentDatum     = script.CurrentDatum;
            ExpirationDate   = script.ExpirationDate;
        }
Ejemplo n.º 4
0
 public void Init(ExecutionContext executionContext)
 {
     SqlCommandContext = executionContext.GetSqlCommandContext();
     InputGroups.AddAll(GetExecuteGroups(executionContext.GetExecutionUnits()));
     CacheCommands();
 }
 private static bool IsKeyPressed(InputGroups inputGroups, Controls control) => Game.IsControlPressed((int)inputGroups, (Control)control);