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


C# EventDB.ChangeEvent方法代码示例

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


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

示例1: ChangePrintArea

        // Change the course print area. If "removeParts" is true, and the course is an all parts,
        // then remove print descriptions for each part.
        public static void ChangePrintArea(EventDB eventDB, CourseDesignator courseDesignator, bool removeParts, PrintArea printArea)
        {
            printArea = (PrintArea) printArea.Clone();

            if (courseDesignator.IsAllControls) {
                Event e = eventDB.GetEvent();

                e = (Event) e.Clone();
                e.printArea = printArea;

                eventDB.ChangeEvent(e);
            }
            else {
                Course course = eventDB.GetCourse(courseDesignator.CourseId);

                course = (Course) course.Clone();

                if (courseDesignator.AllParts) {
                    course.printArea = printArea;

                    if (removeParts)
                        course.partPrintAreas = new Dictionary<int, PrintArea>();
                }
                else {
                    course.partPrintAreas[courseDesignator.Part] = printArea;
                }

                eventDB.ReplaceCourse(courseDesignator.CourseId, course);
            }
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:32,代码来源:ChangeEvent.cs

示例2: ChangePunchcardFormat

        // Set the punch card format for the event.
        public static void ChangePunchcardFormat(EventDB eventDB, PunchcardFormat punchcardFormat)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.punchcardFormat = (PunchcardFormat) punchcardFormat.Clone();

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:10,代码来源:ChangeEvent.cs

示例3: ChangeEventTitle

        // Change the event title. Seperate lines with "|".
        public static void ChangeEventTitle(EventDB eventDB, string newTitle)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.title = newTitle;

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:10,代码来源:ChangeEvent.cs

示例4: ChangeMapScale

        // Change the map scale.
        public static void ChangeMapScale(EventDB eventDB, float newScale)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.mapScale = newScale;

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:10,代码来源:ChangeEvent.cs

示例5: ChangeDescriptionLanguage

        // Change the description language
        public static void ChangeDescriptionLanguage(EventDB eventDB, string newLangId)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.descriptionLangId = newLangId;

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:10,代码来源:ChangeEvent.cs

示例6: ChangeCustomSymbolText

        // Change the custom system text for the event.
        public static void ChangeCustomSymbolText(EventDB eventDB, Dictionary<string, List<SymbolText>> customSymbolText, Dictionary<string, bool> customSymbolKey)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.customSymbolText = Util.CopyDictionary(customSymbolText);
            e.customSymbolKey = Util.CopyDictionary(customSymbolKey);

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:11,代码来源:ChangeEvent.cs

示例7: ChangeCourseAppearance

        // Set the course appearance for this event.
        public static void ChangeCourseAppearance(EventDB eventDB, CourseAppearance courseAppearance)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.courseAppearance = (CourseAppearance) courseAppearance.Clone();

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:10,代码来源:ChangeEvent.cs

示例8: ChangeAutoNumbering

        // Change the auto numbering options.
        public static void ChangeAutoNumbering(EventDB eventDB, int startCode, bool disallowInvertibleCodes)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.firstControlCode = startCode;
            e.disallowInvertibleCodes = disallowInvertibleCodes;

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:11,代码来源:ChangeEvent.cs

示例9: ChangeAllControlsProperties

        // Change the attributes of a all controls display.
        public static void ChangeAllControlsProperties(EventDB eventDB, float printScale, DescriptionKind descriptionKind)
        {
            Event e = eventDB.GetEvent();

            e = (Event) e.Clone();
            e.allControlsPrintScale = printScale;
            e.allControlsDescKind = descriptionKind;

            eventDB.ChangeEvent(e);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:11,代码来源:ChangeEvent.cs


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