当前位置: 首页>>代码示例>>C#>>正文


C# Calendar.AddEvent方法代码示例

本文整理汇总了C#中Calendar.AddEvent方法的典型用法代码示例。如果您正苦于以下问题:C# Calendar.AddEvent方法的具体用法?C# Calendar.AddEvent怎么用?C# Calendar.AddEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Calendar的用法示例。


在下文中一共展示了Calendar.AddEvent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CalendarFirstMethod_test_2

        public void CalendarFirstMethod_test_2()
        {
            // test of: "first" method in combination with time parameter of first method
            Calendar cal = new Calendar();
            GameObject gameObject = new GameObject();

            cal.AddEvent(2, gameObject, EventType.goDown);
            cal.AddEvent(3, gameObject, EventType.goDown);

            Event ev = cal.First(2);
            Assert.That(ev != null && ev.who == gameObject && ev.when == 2);
        }
开发者ID:MartyIX,项目名称:SoTh,代码行数:12,代码来源:CalendarTests.cs

示例2: CalendarFirstMethod_test_5

        public void CalendarFirstMethod_test_5()
        {
            Calendar cal = new Calendar();
            GameObject gameObject = new GameObject();

            cal.AddEvent(2, gameObject, EventType.goDown);
            cal.AddEvent(2, gameObject, EventType.goDown);

            Event ev = cal.First(2);
            Assert.That(cal.CountOfEvents == 1);
            ev = cal.First(2);
            Assert.That(cal.CountOfEvents == 0);
        }
开发者ID:MartyIX,项目名称:SoTh,代码行数:13,代码来源:CalendarTests.cs

示例3: CalendarFirstMethod_test_6

        public void CalendarFirstMethod_test_6()
        {
            Calendar cal = new Calendar();
            GameObject gameObject = new GameObject();

            cal.IsEnabledAddingEvents = false;
            cal.AddEvent(2, gameObject, EventType.goDown);

            Assert.That(cal.CountOfEvents == 0);
        }
开发者ID:MartyIX,项目名称:SoTh,代码行数:10,代码来源:CalendarTests.cs

示例4: CalendarFirstMethod_test_3

        public void CalendarFirstMethod_test_3()
        {
            Calendar cal = new Calendar();
            GameObject gameObject = new GameObject();

            cal.AddEvent(2, gameObject, EventType.goDown);

            Event ev = cal.First(1);
            Assert.That(ev == null); // no event is supposed to be returned
        }
开发者ID:MartyIX,项目名称:SoTh,代码行数:10,代码来源:CalendarTests.cs

示例5: CalendarFirstMethod_test_1

        public void CalendarFirstMethod_test_1()
        {
            Calendar cal = new Calendar();
            GameObject gameObject = new GameObject();

            cal.AddEvent(1, gameObject, EventType.goDown);

            Event ev = cal.First(2);
            Assert.That(ev != null && ev.who == gameObject && ev.when == 1);
        }
开发者ID:MartyIX,项目名称:SoTh,代码行数:10,代码来源:CalendarTests.cs


注:本文中的Calendar.AddEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。