當前位置: 首頁>>代碼示例>>C#>>正文


C# Behavior.Save方法代碼示例

本文整理匯總了C#中Behavior.Save方法的典型用法代碼示例。如果您正苦於以下問題:C# Behavior.Save方法的具體用法?C# Behavior.Save怎麽用?C# Behavior.Save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Behavior的用法示例。


在下文中一共展示了Behavior.Save方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PlusMazeBehavioralTestTypeAndBehaviors

        public static void PlusMazeBehavioralTestTypeAndBehaviors()
        {
            var behavioralTestType = new BehavioralTestType { Name = "EPM", Description = "Elevated Plus Maze" };
            behavioralTestType.Save();

            var behavior = new Behavior
            {
                Name = "North Entry",
                DefaultKeyStroke = "1",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "South Entry",
                DefaultKeyStroke = "2",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "West Entry",
                DefaultKeyStroke = "3",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "East Entry",
                DefaultKeyStroke = "4",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Center Entry",
                DefaultKeyStroke = "5",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Incomplete Closed Entry",
                DefaultKeyStroke = "6",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.Instant
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Incomplete Open Entry",
                DefaultKeyStroke = "7",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.Instant
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Incomplete Center Entry",
                DefaultKeyStroke = "8",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.Instant
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Protected Head Dip",
                DefaultKeyStroke = "9",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.Instant
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Unprotected Head Dip",
                DefaultKeyStroke = "0",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.Instant
            };
            behavior.Save();
        }
開發者ID:kinoscope,項目名稱:kinoscope,代碼行數:95,代碼來源:SeedData.cs

示例2: _FstBehavioralTestTypeAndBehaviors

        private static void _FstBehavioralTestTypeAndBehaviors()
        {
            var behavioralTestType = new BehavioralTestType { Name = "FST", Description = "Forced Swimmend Test" };
            behavioralTestType.Save();

            var behavior = new Behavior
            {
                Name = "Climbing",
                DefaultKeyStroke = "1",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Swimming",
                DefaultKeyStroke = "2",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Floating",
                DefaultKeyStroke = "3",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Diving",
                DefaultKeyStroke = "4",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Head Swinging",
                DefaultKeyStroke = "5",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.Instant
            };
            behavior.Save();
        }
開發者ID:kinoscope,項目名稱:kinoscope,代碼行數:50,代碼來源:SeedData.cs

示例3: ObjectRecognitionBehavioralTestTypeAndBehaviors

        public static void ObjectRecognitionBehavioralTestTypeAndBehaviors()
        {
            var behavioralTestType = new BehavioralTestType { Name = "Object Recognition", Description = "Object Recognition" };
            behavioralTestType.Save();

            var behavior = new Behavior
            {
                Name = "Object A",
                DefaultKeyStroke = "1",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "Object B",
                DefaultKeyStroke = "2",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();

            behavior = new Behavior
            {
                Name = "General Area",
                DefaultKeyStroke = "3",
                BehavioralTestType = behavioralTestType,
                Type = Behavior.BehaviorType.State
            };
            behavior.Save();
        }
開發者ID:kinoscope,項目名稱:kinoscope,代碼行數:32,代碼來源:SeedData.cs


注:本文中的Behavior.Save方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。