當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。