コード例 #1
0
ファイル: BehavioralTest.cs プロジェクト: dbaltas/kinoscope
        public virtual List <Behavior> GetBehaviors()
        {
            List <Behavior> behaviors = new List <Behavior>();

            BehavioralTestType behavioralTestType = BehavioralTestType;

            foreach (Behavior behavior in Behavior.All())
            {
                if (behavior.BehavioralTestType == behavioralTestType)
                {
                    ResearcherBehaviorKeyStroke researcherBehaviorKeyStroke
                        = Researcher.Current.ResearcherBehaviorKeyStrokes.FirstOrDefault(
                              (item) => item.Behavior.Id == behavior.Id
                              );

                    if (researcherBehaviorKeyStroke != null)
                    {
                        behavior.KeyStroke = researcherBehaviorKeyStroke.KeyStroke;
                    }

                    behaviors.Add(behavior);
                }
            }

            return(behaviors);
        }
コード例 #2
0
 public virtual void AddResearcherBehaviorKeyStroke(ResearcherBehaviorKeyStroke researcherBehaviorKeyStroke)
 {
     researcherBehaviorKeyStroke.Researcher = this;
     ResearcherBehaviorKeyStrokes.Add(researcherBehaviorKeyStroke);
 }